SwiftBackgroundLocation 0.1.4

SwiftBackgroundLocation 0.1.4

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release May 2017
SwiftSwift Version 3.1
SPMSupports SPM

Maintained by Roman Barzyczak.



SwiftBackgroundLocation

SwiftBackground is the right choice to work easily and efficiently with Location Manager when your app is terminated or killed. It’s based on region monitoring. Demo how it works (blue is normal tracking, red line is region based tracking):

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Just add in your app delegate:

    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
    }

Requirements

Installation

SwiftBackgroundLocation is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "SwiftBackgroundLocation"

Author

yoman07, [email protected]

License

SwiftBackgroundLocation is available under the MIT license. See the LICENSE file for more info.