Integrate iOS SDK
This document covers installation and initialization steps for your native iOS application
Installation
There are two ways you can install SuprSend SDK into your app.
Using Cocoapods
Step 1: Add the below pods to your pod file.
pod 'SuprsendCore'
pod 'SuprSendSdk'
Step 2: Install pods in the project using the below command in the terminal.
pod install
Manual Integration
Follow the below steps to do manual integration of SuprSend SDK in the iOS application.
- Download 2 zip files: SuprSendSdk.xcframework.zip and SuprsendCore.xcframework.zip and unzip them.
- Move them to your project folder.
- Select your project target and move to the section Frameworks, Libraries, and Embedded Content
- Click on the + button --> Add Other --> Add Files
- Navigate to your project folder and select SuprSendSdk.xcframework and SuprsendCore.xcframework.
Initialization
- Add the below lines of code in your AppDelegate.swift.
import SuprSendSdk
// inside application didFinishLaunchingWithOptions method
let suprSendConfiguration = SuprSendSDKConfiguration(withKey: "<your_workspace_key>", secret:"<your_workspace_secret>")
SuprSend.shared.configureWith(configuration: suprSendConfiguration, launchOptions: launchOptions)
- Replace <your_workspace_key> and <your_workspace_secret> with your project workspace key and workspace secret, which you can find in the SuprSend dashboard.
Updated 12 months ago