The Apptimize SDK allows application developers to run A/B tests and consume feature flags in their applications. Apptimize’s client-side SDK is used in conjunction with the Apptimize Dashboard, which provides a web-based interface for managing experiments and feature flags.
This repository is here to support installation using Swift Package Manager and Carthage.
Important Note
Versions before 3.4.19 are not supported by Swift Package Manager or Carthage. If support requires you to try an older release use CocoaPods or see the change log for links to earlier releases.
Carthage Users
Carthage is currently not working due to an issue with binary xcframework support which is required for using Apptimize. This PR is expected to fix the issue.
Development Requirements
- XCode 11.4.1+
- Swift 5+ (if you are using Swift)
Supported Deployment Targets
- iOS 11.0+
- macOS 10.15+
- tvOS 11.0+
- watchOS 5.0+
- Open your project in XCode.
- From the File menu, select Swift Packages > Add package dependency...
- Select the project(s) to which you want to add Apptimize.
- Add the package url
https://github.com/urbanairship/apptimize-ios-kit
and click next. - Specify the version requirement.
Apptimize is distributed as an XCFramework and that requires that you are running a cocoapods version 1.10.0 or newer. To update you simply need to install the gem again.
$ [sudo] gem install cocoapods
-
Install CocoaPods according to the official documentation.
-
If you have not already done so, run
pod init
to create a newPodfile
. -
Once you have created your
Podfile
, addpod Apptimize
to import Apptimize as a dependency. -
Ensure that you specify the minimum deployment target version info at the top of your
Podfile
.e.g.
platform :ios, '11.0'
. -
Run
pod install
from the command line.
Apptimize.xcframework
is compatible with use_frameworks!
for other dynamic and Swift dependencies.
-
Install carthage. See the carthage quick start guide for more information.
-
Add a reference to Apptimize to your
Cartfile
binary https://sdk.apptimize.com/ios/apptimize.json
-
Run
carthage update --use-xcframeworks
-
Download the latest version of the SDK can be downloaded from the SDK Download and Documentation page or download directly.
-
Unzip the downloaded file.
-
Drag the decompressed
Apptimize.xcframework
into the project that will use Apptimize. -
Add the file to your Frameworks and Libraries and select Embed & Sign for each target that will be calling Apptimize.
For further information see the official documentation.