Skip to content

AppAmbit: Getting Started with iOS

This guide walks you through setting up the AppAmbit iOS SDK in your application, focusing on AppAmbit Analytics and Crash Reporting.

1. Prerequisites

The following requirements must be met to use the AppAmbit SDK:

  • The iOS project is set up in Xcode 13 or later.
  • You are targeting devices running iOS 12.0 or later.
  • You are not using any other libraries that offer crash reporting functionality.
  • If you are using CocoaPods to integrate AppAmbit, you need CocoaPods version 1.10 or later.

2. Creating Your App in the AppAmbit Portal

  1. Visit AppAmbit.com.
  2. Sign in or create an account. Navigate to "Apps" and click on "New App".
  3. Provide a name for your app. Optionally, upload an image via drag-and-drop.
  4. Select the appropriate release type and iOS.
  5. Click "Create" to generate your app.
  6. Retrieve the App Key from the app Info page.

3. Adding AppAmbit iOS SDK modules

You can install the Android SDK from either:

Cocoapods (recommended) — easiest to keep up-to-date

GitHub → Releases — direct download of tagged artifacts

CocoaPods

Add this to your Podfile:

pod 'AppAmbitSdk'
# or specify version
pod 'AppAmbitSdk', '~> 0.0.8'

Then run:

pod install

This will install the newly defined pod and open the .xcworkspace project.

Warning

If you see an error like [!] Unable to find a specification for AppAmbitSdk when running pod install, run pod repo update to get the latest pods from the Cocoapods repository, and then run pod install.

4. Initialize iOS SDK

Add SDK imports so you can use it in your startup code

Swift

import AppAmbit;

Objective-C

#import "AppAmbitSdk/AppAmbitSdk-Swift.h"

Add the following initialization line in your code, replace the <YOUR-APPKEY> for your real apikey

Swift

AppAmbit.start(appKey: "<YOUR-APPKEY>")

Objective-C

[AppAmbit startWithAppKey:@"<YOUR-APPKEY>"];

Warning

It is not recommended to insert the secret apikey directly into the code.