Adding the dependency
Cocaopods
Add the following dependencies to your Podfile
, in addition to the Core module, and optionally the IPS and CoreBluetooth modules:
pod 'CrowdConnectedGeo’, '1.6.1'
Swift Package Manager (SPM)
Open your project in Xcode and navigate to File -> Swift Packages -> Add Package Dependency and add the following package, in addition to the core module, and optionally the IPS and CoreBluetooth modules:
https://github.com/crowdconnected/crowdconnected-geo-ios
Carthage
In your Cartfile
file add the following dependency, in addition to the core module, and optionally the IPS and CoreBluetooth modules:
binary "https://crowdconnected-public-maven.s3.eu-west-1.amazonaws.com/iOSSources/crowdconnected-geo-sources" == 1.6.1
Run the following command in terminal:
carthage update --use-xcframeworks --no-use-binaries
On your application targets’ General settings tab, in the Embedded Binaries section, drag and drop the following xcframework (in addition to the core module, and optionally the IPS and CoreBluetooth modules) from the Carthage/Build folder on disk.
CrowdConnectedGeo.xcframework
Starting the library
Add the Geo module to your imports, then follow the instructions in the Base integration guide.
import CrowdConnectedGeo
import CrowdConnectedCore
Then before you start the library, following the Base Integration Guide, activate the Geo module
CrowdConnectedGeo.activate()
CrowdConnected.shared.start(appKey: "YOUR_APP_KEY", token: "YOUR_TOKEN", secret: "YOUR_SECRET") { deviceId, error in
// If the completion returns a non-nil Error, then the SDK has failed to start and is not functional.
// Otherwise, the completion will provide a valid device ID and a nil Error
}