Installation
Add the Clippr SDK to your iOS project using Swift Package Manager or CocoaPods.
Swift Package Manager (Recommended)
Using Xcode
- Open your project in Xcode
- Go to File → Add Packages...
- Enter the repository URL:
https://github.com/nexlabstudio/clippr-ios.git - Select version
0.0.4or later - Click Add Package
Using Package.swift
Add the dependency to your Package.swift:
dependencies: [
.package(url: "https://github.com/nexlabstudio/clippr-ios.git", from: "0.0.4")
]
Then add ClipprSDK to your target:
targets: [
.target(
name: "YourApp",
dependencies: ["ClipprSDK"]
)
]
CocoaPods
Add to your Podfile:
pod 'ClipprSDK', '~> 0.0.4'
Then run:
pod install
Verify Installation
Import the SDK and initialize it:
import ClipprSDK
// In your App init or AppDelegate
Clippr.initialize(apiKey: "YOUR_API_KEY", debug: true)
With debug: true, you should see initialization logs in the console.
Platform Configuration
Add Associated Domains
Universal Links require the Associated Domains capability:
- In Xcode, select your target
- Go to Signing & Capabilities
- Click + Capability
- Add Associated Domains
- Add your domain:
applinks:yourapp.clppr.xyz
Replace yourapp with your app's subdomain from the Clippr dashboard.
Verify AASA File
Clippr automatically hosts your Apple App Site Association (AASA) file. Verify it's accessible:
curl https://yourapp.clppr.xyz/.well-known/apple-app-site-association
Expected response:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "TEAMID.com.yourcompany.yourapp",
"paths": ["*"]
}
]
}
}
App Tracking Transparency (Optional)
If you want to use IDFA for deterministic matching, add the usage description to your Info.plist:
<key>NSUserTrackingUsageDescription</key>
<string>We use this identifier to improve your experience and measure campaign effectiveness.</string>
The SDK will automatically request tracking permission and use the IDFA if granted.
Troubleshooting
Package Resolution Failed
If SPM fails to resolve the package:
- Try File → Packages → Reset Package Caches
- Clean build folder: Product → Clean Build Folder
- Restart Xcode
Associated Domains Not Working
- Verify your Team ID is correct in the Clippr dashboard
- Check the AASA file is accessible (see above)
- Ensure the Associated Domains capability is enabled in your Apple Developer account
- Delete the app and reinstall (Associated Domains are cached)
Linker Errors with CocoaPods
If you see linker errors:
pod deintegrate
pod install
Then clean and rebuild.
Next Steps
- Quick Start - Initialize and handle your first deep link
- Universal Links - Deep dive into Universal Links setup