SwiftBackgroundLocation 0.1.4

SwiftBackgroundLocation 0.1.4

测试已测试
语言语言 SwiftSwift
许可协议 MIT
发布最后发布2017年5月
SwiftSwift版本3.1
SPM支持SPM

Roman Barzyczak 维护。



SwiftBackgroundLocation

SwiftBackground 是您在应用终止或被杀死时与 Location Manager 轻松高效工作的正确选择。它基于区域监控。演示如何工作(蓝色为正常跟踪,红色线为基于区域的跟踪)

例子

要运行示例项目,克隆仓库,然后首先从 Example 目录运行 pod install

只需在您的应用代理中添加

    var backgroundLocationManager = BackgroundLocationManager()
    
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
        
         backgroundLocationManager.startBackground() { result in
                if case let .Success(location) = result {
                    LocationLogger().writeLocationToFile(location: location)
                }
        }

        return true
    }

要求

安装

SwiftBackgroundLocation 通过 CocoaPods 提供。要安装,只需将以下行添加到您的 Podfile

pod "SwiftBackgroundLocation"

作者

yoman07, [email protected]

许可协议

SwiftBackgroundLocation 在 MIT 许可协议下可用。有关更多信息,请参阅 LICENSE 文件。