AWSLocations
This is Swift Library for Locations.
Installation
CocoaPods
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like AWSPlacePicker
in your projects.
First, add the following line to your Podfile:
pod 'AWSLocations'
Second, install AWSLocations
into your project:
pod install
Important
Please make sure you have added location privacy keys in info plist that is
<key>NSLocationUsageDescription</key>
<string></string>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
Usage
Import Library into View Controller Where you want to use utilities
import AWSLocations
Than start using
AWSLocationsUtils.shared.trackLocationChanges { (loc) in
print(loc)
}
You can customize settings
// Please make sure this need to be set in AppDelegate Before accessing AWSLocationsUtils.shared object
AWSLocationsUtils.distanceFilter = 25.0
AWSLocationsUtils.alwaysRequired = true
License
AWSLocations
is distributed under the terms and conditions of the [MIT license]