GeoSpark iOS SDK enables you to track your user location in both online and offline states. The SDK enables you to track location in foreground, background and terminated app state. Our SDK tracks location with minimal battery drain with optimal location hits.
Here are the steps involved in integrating GeoSpark's iOS SDK with your app:
https://youtu.be/J1125-c-Z4g Install SDK
Open Xcode , click on create a new Xcode project -> Select the Single View App.
Open terminal, go to project folder and run pod init.
Open podfile, add pod GeoSpark and run pod install in your terminal.
Once pod installed, import GeoSpark into your AppDelegate file.
To configure the location services, add following entries to the Info.plist file.
Then, in your project settings, go to Capabilities > Background Modes and turn on background fetch, location updates and remote-notifications.
Register for remote notification and get the device token from the following method didRegisterForRemoteNotificationsWithDeviceToken.
Initialize SDK Sign up here to create an account with GeoSpark. Post signup, you can create your first project from the dashboard screen.
Once you have created your project, you can add applications with required details.
You can get the publishable key from your project settings page which has to be used while integrating the SDK with your application.
Initialize SDK in didFinishLaunchingWithOptions method of your Application class.
The SDK needs a UserID object to identify the device. The SDK has a convenience method, createUser to create a user which returns User ID.
Start Location Tracking
To enable motion and location, call requestMotion and requestLocation methods. Calling this method will show alert asking for location permission and motion permission.
StartTracking the user location and start viewing your user's location data on the dashboard.
Your Application is successfully integrated with GeoSpark iOS SDK.