Adding the dependency
Cocaopods
Add the following dependencies to your Podfile
, in addition to the Core module, and any other optional modules:
pod 'CrowdConnectedIPS', '1.4.0'
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 any other optional modules:
https://github.com/crowdconnected/crowdconnected-ips-ios
Carthage
In your Carfile
file add the following dependency, in addition to the core module, and any other optional modules:
binary "https://crowdconnected-public-maven.s3.eu-west-1.amazonaws.com/iOSSources/crowdconnected-ips-sources" == 1.3.0
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 any other optional modules) from the Carthage/Build folder on disk.
CrowdConnectedIPS.xcframework
Starting the library
Add the IPS module to your imports.
import CrowdConnectedIPS
import CrowdConnectedCore
Then before you start the library, following the Base Integration Guide, activate the IPS module
CrowdConnectedIPS.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
}