Docs

SDK Installation

Sign in or Register for Apptimize. You’ll see a welcome page that asks for the name and platform of your app. After entering all your info, you’ll see these installation instructions again.

You have three options for installing the iOS SDK: zero-line installation, CocoaPods, or Segment.

Zero-line Installation

The SDK switched from static to dynamic at version 2.18.0.  Please remove the SDK from your project and follow the installation instructions below to upgrade.

    1. After you’re signed in, you’ll be able to download the Apptimize iOS SDK. Unzip it, then drag and drop Apptimize.framework into your project. You’ll probably want to check the Copy items if needed option.
      AddFramework
    2. Select the project and go to the General tab.  Drag the Apptimize.framework from the project browser into the Embedded Binaries section at the bottom of the page.
      AddEmbedded
    3. Open your project’s Info.plist (typically found in the Supporting Files folder), navigate to the Editor menu, and choose Add Item. If Add Item is grayed out, make sure to click the main window.
      AddEditorItemMake sure to name your new entry ApptimizeAppKey.
      AddApptimizeAppKey
      Add your application key, which is a 31 character key that can be found on the installation instructions while logged in or in your app settings.SetApptimizeAppKey
    4. In order to release on the App Store, you will need to strip all simulator architectures from the framework.  In the Build Phases of your project target, click the + sign and select New Run Script Phase
      ios_addrunscript
      Be sure the new run script is below the Embed Frameworks build phase. Next, add the following code to the newly created Run Script:

      cd "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Apptimize.framework/"
      if [[ ! "${SDKROOT}" == *Simulator* ]]; then
      lipo Apptimize -verify_arch i386 && lipo -remove i386 -remove x86_64 Apptimize -output Apptimize || echo "Simulator architectures already stripped"
      else
      lipo Apptimize -verify_arch i386 || { echo "Simulator architectures missing - clean and rebuild for simulator!"; exit 1; }
      fi

      Your final build phases should look similar to this:
      ios_script2

    5. Build your app to make sure that SDK was installed correctly. Verify that the SDK is loading by running your app and checking the XCode console for the message Apptimize: Version 2.x.x.

You’ve finished the Apptimize zero-line installation and are ready to configure your first A/B experiment!

Setup an Experiment

CocoaPods Installation

Refer to CocoaPod’s Getting Started Guide for detailed instructions.

        1. Once you have created your Podfile, insert this line of code:
          pod 'Apptimize'

          Screenshot of CocoaPods Installation showing terminal commands and text in Podfile.

          Once you have done so, re-run pod install from the command line.  Apptimize.framework is compatible with use_frameworks! for other dynamic and swift dependencies.

        2. Open your project’s Info.plist (typically found in the Supporting Files folder), navigate to the Editor menu, and choose Add Item.
          AddEditorItem
          Your new entry should be called ApptimizeAppKey.
          AddApptimizeAppKey
          Add your application key, which is a 31 character key that can be found on the installation instructions while logged in or in your app settings.
          SetApptimizeAppKey
        3. Build your app to make sure that SDK was installed correctly. Verify that the SDK is loading by running your app and checking the XCode console for the message Apptimize: Version 2.x.x.

You’ve finished the Apptimize CocoaPods installation and are ready to configure your first A/B experiment!

Setup an Experiment

Segment

You can install our iOS SDK via our Segment integration. You might want to use this option if you’re already tracking similar data with other services as you only need to send that data to Segment once and will show up in Apptimize and other integrations with the flip of a switch.

Get started by signing up for a Segment account if you haven’t already and follow the installation instructions. Once you’ve installed Segment, flip the Apptimize switch on the Segment dashboard, enter in your Apptimize app key and you’re ready to go!

Setup an Experiment

Join the Best-in-Class Mobile Growth Platform