iOS SDK
Guide for installing the Qonversion SDK for iOS
Prerequisites
XCode 9.2 or higher
Target of iOS 9 or higher
Installation
CocoaPods
Install CocoaPods (put
sudo gem install cocoapod
in terminal).Run
pod init
in project's directory if you do not have a Podfile.In the Podfile, add
pod 'Qonversion', '~> 2.0.0'
in your main target.Run
pod install
.From now on, open your project with the
.xcworkspace
.
Carthage
Qonversion supports Carthage to package your dependencies as a framework. To integrate SDK into your Xcode project using Carthage, specify it in your Cartfile
:
github "qonversion/qonversion-ios-sdk"
Run carthage update
to build the framework and drag the built Qonversion.framework
into your Xcode project.
Set up Qonversion
1. Import the Qonversion module in your AppDelegate
:
import Qonversion
// import FBSDKCoreKit // For Facebook Ads integration
// import Amplitude_iOS // For Amplitude integration
2. Get your application key and configure Qonversion in your app inapplication:didFinishLaunchingWithOptions:
method.
To get the key, go to the settings in your Qonversion account and copy the Application Access Key:

Configure Qonversion with the key obtained above inapplication:didFinishLaunchingWithOptions:
method:
Qonversion.launch(withKey: "projectKey")
If you want to use your custom user id for third-party integrations:
Qonversion.setUserID("yourSideUserID")
Provide Shared Secret
1. Log in to your App Store Connect account. Go to "My Apps" and select the App.
2. Open your App in AppStore Connect and perform these steps to copy Shared Secret:

3. Provide this Shared Secret to your qonversion.io account:

100% Done!
From now on, Qonversion will track subscription events independent from a user's device.
Next Steps
Complete Facebook Ads integration to automatically feed relevant data to Facebook Ads Campaigns from Qonversion or AppsFlyer integration
Configure Product Center for building your subscription infrastructure without server code.
Last updated
Was this helpful?