Example: Basic Code to use Split SDK
- 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:
- Update Splits names when calling getSplitTreatment in:
- There are two Split SDK Wrapper libraries, used for each factory instance:
- The app will initialize Split Factory when the app starts, a treatment is sent when the button is clicked.