Installing the Mailchimp Mobile SDK for iOS
At a glance
This article walks you through the process of installing and configuring the Mailchimp SDK for iOS.
Optional: To build the SDK from source code, run
bundle exec fastlane create_binary_framework.
What you’ll need
Deployment target iOS 11.0 or above
Xcode version 11 or above
Ruby 2.4 or above (for fastlane)
Obtain the SDK Key
Before you begin, you'll need to obtain a Mobile SDK key so you can access and configure the SDK.
Go to the Your API Keys section of your Mailchimp account and click on Your Mobile SDK Client
If a key exists, copy it to your clipboard and skip to “Add the XCFramework”
If you need to create a new key, click Create A Key
Select an audience, and then name your key descriptively
Click Create Key
Note: The Mobile SDK key does not provide access to the Mailchimp Marketing API but should still be considered private and kept safe.
Option 1. Cocoapods
For the latest version of our SDK, add the following to your project’s Podfile:
Option 2. Manual
Clone this repository.
bundle exec fastlane create_binary_frameworkto build the Swift binary framework for iOS and iOS Simulator.
Add the XCFramework.
Click on the Project navigator, select your app’s target, go to the General tab, scroll down to Frameworks, Libraries, and Embedded Content. Drag the Mailchimp.xcframework from this repo into this section.
Initialize the SDK
The initialize method has three different fields.
SDK Key (Required): The SDK key gives you access to your audience.
Debug Mode (Optional): Debug Mode enables additional debug only functionality such as extra logging. This is off by default.
Auto Tagging (Optional): Auto Tagging automatically tags contacts with information such as Device Type and Platform. This is on by default.