SDK Installation (iOS)
Detour provides a native iOS SDK (Detour) for deferred links, universal links, and custom scheme links.
Before installation, make sure your app is created in the Detour Dashboard and you have:
appIDfrom API configuration- publishable
apiKeyfrom API configuration - iOS link integration snippets from App configuration
Requirements
- iOS
13+ - Swift
5.5+
Install with Swift Package Manager
In Xcode:
- Open your project.
- Go to
File > Add Package Dependencies... - Enter repository URL:
https://github.com/software-mansion-labs/ios-detour
- Add product
Detourto your app target.
Or in Package.swift:
.package(url: "https://github.com/software-mansion-labs/ios-detour", from: "1.1.0")
Install with CocoaPods
In your Podfile:
platform :ios, '13.0'
target 'YourAppTarget' do
use_frameworks!
pod 'Detour', '1.1.0'
end
Then run:
pod install
Prepare app configuration
import Detour
let detourConfig = DetourConfig(
apiKey: "<YOUR_DETOUR_API_KEY>",
appID: "<YOUR_DETOUR_APP_ID>",
shouldUseClipboard: true,
linkProcessingMode: .all
)
Configure link capabilities
Add both integration pieces from Dashboard/App config:
- custom URL scheme in
Info.plist(CFBundleURLTypes) - associated domains in entitlements (
applinks:<your-domain>)
Without those entries, iOS will not dispatch runtime links to your app.