⚠ The repository is migrated to Synerise iOS SDK! ⚠
The Synerise iOS SDK is no longer live on this address. All new releases will only be published on the new Synerise iOS SDK. After June 20, 2024 this repository will no longer be maintained.
Synerise SDK for iOS.
⚠️ For versions higher than 4.17.0, please refer to this repository: Synerise iOS SDK
Most up-to-date documentation is available at Developer Guide - Mobile SDK.
- Access to workspace
- A Profile API Key
- Xcode 15 and iOS SDK 17
- iOS 9.0+ minimum deployment target
- Valid architectures: arm64 devices and arm64, x86_64 simulators
CocoaPods is a dependency manager for Cocoa projects.
- You can install it with the following command:
gem install cocoapods
- Once you have CocoaPods installed you should add below code into your Podfile in Xcode:
platform :ios, '14.0'
use_frameworks!
target YOUR_PROJECT_TARGET do
pod 'SyneriseSDK'
end
- To install the Synerise SDK, run the following command in the directory of your Xcode app project:
pod install
- When you want to upload to the latest version, execute the following command:
pod update
Swift Package Manager (SPM) is a dependency manager built into Xcode.
- Go to Xcode project’s settings and navigate to the Package Dependencies tab.
- Click on the add button below the packages list.
- Enter the URL of Synerise SDK repository (https://github.com/Synerise/ios-sdk) in the search text field.
- Under the Dependency Rule section, select the SDK version. Finally, click Add Package.
- Select the package that best suits your needs and click Add Package.
Carthage is a simple, decentralized dependency manager for iOS projects.
- You can install it with the following command:
brew install carthage
- Once you have CocoaPods installed you should add following line to your Cartfile:
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 dragSyneriseSDK.framework
to the "Embedded Binaries" section in Xcode. Make sureCopy items if needed
is selected and clickFinish
.
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, [email protected]. If you need support please feel free to contact us.