- You need an API key. You can request an API key here.
- From iOS 10, set "NSLocationAlwaysUsageDescription" and "NSLocationWhenInUseUsageDescription" in the Info.plist file.
- From iOS 11, set "NSLocationAlwaysAndWhenInUseUsageDescription" and "NSLocationWhenInUseUsageDescription" in the Info.plist file.
- Add Vectaury dependance to Podfile
pod "Vectaury"
- In your shell, run
pod install
- Download the Setting.bundle file : Setting.bundle
- Add the Settings.bundle file to your project and target the application (if you already have a Settings.bundle file, skip this step and follow this instruction )
- Download the framework
- Version 1.5
- Extract the zip and link the binary with the library.
if you already have a Settings.bundle in your project, you just need to copy language folder and add in your root.plist file :
<dict>
<key>StringsTable</key>
<string>Root</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>FooterText</key>
<string>Txt</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>Privacy</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>DataVectaury</string>
<key>Key</key>
<string>io.vectaury.userOptInOut</string>
<key>DefaultValue</key>
<true/>
</dict>
</array>
</dict>
- Import Vectaury
- Init SDK with
initWithApiKey:withLaunchOptions:withPush:
function on :
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {}
Ask the user to share their location data (popup) with the +requestAuthorization:
function.
Put this line where it makes the most sense for your app user experience. This will trigger a permission request popup. If you already asked thoses permissions elsewhere in your app, you don't need to call it (if you do, it will have no impact).
Enable Background Mode You need to tick the box "Location updates" in the "Capabilities" of your target.
- Start to collect location data with
+startLocation
function
...
import Vectaury
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
...
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
Vectaury.initWithApiKey("key", withLaunchOptions: launchOptions, withPush: false)
//Optional : request authorization using vectaury SDK
Vectaury.requestAuthorization()
Vectaury.startLocation()
return true
}
...
}
- Fix wording on opt-in pop-up
- New system of location data collecting
- Optimization of batterie use
- Setting.bundle : The user can opt-out Vectaury data sharing from the app settings
- New algorithm of location data collecting
- Opt-in banner display option
- Educational popup display option
- Link to settings banner display option
- Fix Bug on Blue Bar
- New algorithm of location data collecting