Install the iOS SDK
The SDK is a Swift package, CrmSdk, with no dependencies of its own.
In Xcode
Section titled “In Xcode”- File › Add Package Dependencies…
- Paste the package’s address into the search field:
https://github.com/MichalTDev/crm-ios.git - Under Dependency Rule, choose Up to Next Major Version from
0.2.0. - Add the
CrmSdklibrary to your app’s target.
In Package.swift
Section titled “In Package.swift”If your app, or a module of it, is itself a package:
dependencies: [ .package(url: "https://github.com/MichalTDev/crm-ios.git", from: "0.2.0"),],targets: [ .target( name: "MyApp", dependencies: [.product(name: "CrmSdk", package: "crm-ios")] ),]Then import CrmSdk where you use it.
Your app’s key
Section titled “Your app’s key”Copy your app’s key (app_…) from the App key card on Settings › your app › Developers › Install. The Install app_test_…, see Test mode).
Versions
Section titled “Versions”Each release is a tag. The package’s CHANGELOG.md lists the releases, and each one says the oldest PurrCRM it needs. To move to a newer release, use File › Packages › Update to Latest Package Versions in Xcode, or change from: in Package.swift.
Against an older PurrCRM, the SDK goes without what that version does not have, and the rest works as before. An older SDK against a newer PurrCRM ignores what it does not know.
Every request says which SDK sent it and its version (X-Crm-Sdk-Kind: ios, X-Crm-Sdk: 0.2.0); crmSdkVersion holds the version in code. Your team can set the oldest version they want people on (Settings › your app › General › Money › Advanced › Oldest SDK); your app reads it as crm.publicApp.value?.minSdkVersion to suggest an update. PurrCRM refuses no version for it. It is one number for every SDK, so compare it with crmSdkVersion only if your team set it with the iOS SDK in mind.
Requirements
Section titled “Requirements”- iOS 13 or later.
- Swift 6 tools: Xcode 16 or later. The package is built in the Swift 6 language mode; your app may use either mode.
- The package brings no Firebase, analytics or crash reporter of its own. For pushes your app adds Firebase Messaging itself (Push).
The privacy manifest
Section titled “The privacy manifest”The package ships its own privacy manifest (PrivacyInfo.xcprivacy), which Xcode gathers into your app’s privacy report when you archive. It declares:
- No tracking, and no tracking domains.
- Data collected, all linked to the user and none of it for tracking: the user’s id and customer support (for the app’s functionality), product interaction (analytics and the app’s functionality), and a device id (the push token, for the app’s functionality).
- One required-reason API:
UserDefaults, reasonCA92.1(the SDK keeps its own state there, read and written by the app only).
Your app’s own privacy manifest and its App Store privacy answers still list what your app collects with it. The SDK keeps no token on the phone: tokens stay in memory.