Setting-up your iOS App Configurations
In order to work with a driving app on iOS, you need make certain configuration level changes to your app. Please follow the following steps to configure your app and ensure that it works smoothly with Kruzr SDK.
Allowing background location updates for your app
On the project screen, click
Capabilities
.Turn
Background Modes
on.Select
Location Updates
Disable Bitcode for your app. The Kruzr SDK does not support Bitcode. The following steps will help you with that.
On the Project Settings screen, select the relevant Target for your app.
Click Build Settings.
Search the options for Enable Bitcode. Ensure it is set to "No".
Add the following keys to your
Info.plist
, Set its value to your custom text that tells the user why you want them to allow location services for the application.NSLocationAlwaysUsageDescription
NSLocationAlwaysAndWhenInUseUsageDescription
NSLocationWhenInUseUsageDescription
.
These keys should be used based on your use case. Description text for these keys can be anything which best suits your needs. Sample example of notification text is as follows:
<APP_NAME> requires location permission to auto detect driving activity, provide live traffic updates and enhance your safety. You can turn off location data anytime in your phone’s device settings.
9. Add the key NSMotionUsageDescription to your Info.plist. Set its value to your custom text that tells the user why you want them to allow motion services for the application. Sample example is provided below:
<APP_NAME> requires motion permission to figure out if you are driving, walking, cycling or in rest.
Note:
If APP_NAME is not set for your app, please set it with your app name following the below steps:
Go to your main project build settings.
In the user defined values add a new key as APP_NAME and set it’s value as your app name.
Congratulations! You iOS environment and app is now configured to initialize and start consuming the Kruzr SDK. Let's see how to initialize Kruzr SDK within your iOS app in the next section!
Last updated
Was this helpful?