iOS via SPM
The Glimr SDK Lite focuses on location data from devices in foreground.
Installation
You can add the Glimr SDK via SPM by searching for this package name:
https://github.com/KatalysatorAB/glimr-sdk-swift
If you want to use the Glimr Swift SDK, just add Glimr
in the target pop up during the SPM installation.
Note:
If you are still using GLGeoRealtime
which is based on an Objective-C code base you can uncheck the Glimr
checkbox and add the package. As of XCode 13.3 beta the binaryTarget
of the GLGeoRealtime
target cannot be found but you can still just drag the GLGeoRealtimeStatic.xcframework
from the SPM dependencies into your Link Binary With Libraries
area in the target of your app and it will compile.
Info.plist
<key>NSLocationWhenInUseUsageDescription</key>
<string>This uses location data</string>
Device Capabilities (entitlements)
Example
import Glimr
...
guard let token = UUID(uuidString: "<API_TOKEN>") else {
return
}
let audienceManager = GLAudienceManager(apiToken: token)
print ("TAGS \(audienceManager.cachedTags(format: .map))")
audienceManager.glimrTagsWithCompletion() { tags, error in
print (tags)
print (error)
}
Questions?
Please reach out to us on [email protected]!
Updated almost 3 years ago