Example: Basic Code to use Split SDK 2.3.0
Environment:
- Xcode 10.2.1 Project
- Swift 4.0 language
- Cocopod to add the SplitSDK library.
How to use:
- The iOS Split SDK uses the api key as the folder name in Application storage cache, to make sure the cache is completely separated for each Factory object, use different API Key per each. Split API Keys page allow creating multiple API Keys for the same environment.
- Update your relevant Split API Keys and user keys in:
SplitSDK/SplitSDK/AppDelegate.swift
- Update Splits names when calling getSplitTreatment in:
SplitSDK/SplitSDK/ViewController.swift
- There are two Split SDK Wrapper libraries, used for each factory instance:
SplitSDK/SplitSDK/SplitWrapper.swift
SplitSDK/SplitSDK/SplitWrapper2.swift
- The app will initialize Split Factory when the app starts, a treatment is sent when the button is clicked.
Comments
0 comments
Please sign in to leave a comment.