Synerise SDK for iOS.
Most up-to-date documentation is available at Developer Guide - Mobile SDK.
CocoaPods is a dependency manager for Cocoa projects.
gem install cocoapods
platform :ios, '14.0'
use_frameworks!
target YOUR_PROJECT_TARGET do
pod 'SyneriseSDK'
end
pod install
pod update
Swift Package Manager (SPM) is a dependency manager built into Xcode.
Carthage is a simple, decentralized dependency manager for iOS projects.
brew install carthage
github "synerise/ios-sdk"
To install the Synerise SDK, run the following command in the directory of your Xcode app project:
carthage update --use-xcframeworks --platform ios
Go to your Xcode project's "General" settings. Open <YOUR_XCODE_PROJECT_DIRECTORY>/Carthage/Build/iOS
in Finder and drag SyneriseSDK.framework
to the "Embedded Binaries" section in Xcode. Make sure Copy items if needed
is selected and click Finish
.
You will need to import the Synerise SDK header into the files that contain code relating to Synerise SDK.
Swift:
import SyneriseSDK
Objective-C:
<SyneriseSDK/SyneriseSDK.h>
In Objective-C, you can either include it in your AppName-Prefix.pch file.
First of all, you need to initialize Synerise iOS SDK and provide Profile API Key
.
To get Profile API Key
, please sign in to your Synerise account and visit https://app.synerise.com/settings/apikeys.
Then, generate new API Key
for Profile
audience.
Swift:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
let clientApiKey = "YOUR_PROFILE_API_KEY"
Synerise.initialize(clientApiKey: clientApiKey)
}
Objective-C:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
static NSString *clientApiKey = @"YOUR_PROFILE_API_KEY";
[SNRSynerise initializeWithClientApiKey:clientApiKey];
}
Changelog can be found here.
Synerise, developer@synerise.com. If you need support please feel free to contact us.