CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| License | Custom |
| ReleasedLast Release | Jan 2018 |
Maintained by Tiendeo.
| Depends on: | |
| Alamofire | ~> 4.5 |
| AWSKinesis | ~> 2.6.2 |
| AWSCognito | ~> 2.6.2 |
| ReachabilitySwift | >= 0 |
| Governor | ~> 0.1.2 |
Tiendeo Geotracking SDK for iOS is a framework for user location tracking.
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate Tiendeo Geotracking into your Xcode using CocoaPods, specify it in you Podfile:
platform :ios, '9.0'
use_frameworks!
target '<Your Target Name>' do
pod 'Geotracking', '~> 0.0.8'
end
Then, run the following command:
$ pod install
If you prefer not to use any of the aforementioned dependency managers, you can integrate Tiendeo Geotracking into your project manually as a Embedded Framework.
In your app Capabilities switch on Background Modes and check Location updates option.
In your app .plist add the keys:
Privacy - Location When In Use Usage DescriptionPrivacy - Location Always Usage DescriptionPrivacy - Location Always and When In Use Usage Description (for iOS 11)Add the following code in your didFinishLaunchingWithOptions method:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
Geotracking.sharedInstance.startIfNeededWithApplication(application, launchOptions: launchOptions)
return true
}
To start the Geotracking engine, add the following line to your code:
Geotracking.sharedInstance.start(userId: userId)
where userId is an stable unique ID for the user.
Before start tracking the user will be prompted for location permissions the first time start method is called.
Set GeotrackingDelegate and implement geotrackingDidFail(with error: NSError) method if want to manage possible errors.
To check if everything is running, you can check if the console had an output like this:
Geotracking :: location saved
This framework links iOS AdSupport.framework to obtain advertisingIdentifier.