Installation instructions for Marketo Mobile SDK.  The steps below are required to send Push Notifications and/or In-App Messages.

How to Install Marketo SDK on iOS


  1. Add an application in Marketo Admin (obtain your application Secret Key and Munchkin Id)
  2. Setup Push Notifications (optional)

Install Framework via CocoaPods

1. Install CocoaPods.
$ sudo gem install cocoapods
2. Change directory to your project directory and create a Podfile with smart defaults.
$ pod init
3. Open your Podfile.
$ open -a Xcode Podfile
4. Add the following line to your Podfile.
$ pod 'Marketo-iOS-SDK'
5. Save and close your Podfile.
6. Download and install Marketo iOS SDK.
$ pod install
7. Open workspace in Xcode.
$ open App.xcworkspace

Setup Swift Bridging Header

1. Go to File > New > File and Select “Header File”.


2. Name the file “<ProjectName>-Bridging-Header”.

3. Go to Project > Target > Build Phases > Swift Compiler > Code Generation.  Add the following path to Objective-Bridging Header:



Initialize SDK

Before you can use the Marketo iOS SDK, you must initialize it with your Munchkin Account Id and App Secret Key. You can find each of these in the Marketo Admin area underneath “Mobile Apps & Devices”.

1. Open your AppDelegate.m file (Objective-C) or Bridging file (Swift) and import the Marketo.h header file.

2. Paste the following code inside the application:didFinishLaunchingWithOptions: function.

3. Replace munkinAccountId and secretKey above using your “Munchkin Account ID” and “Secret Key” which are found in the Marketo Admin > Mobile Apps & Devices section.


iOS Test Devices

1. Select Project > Target > Info > URL Types.
2. Add identifier: ${PRODUCT_NAME}








3. Set URL Schemes: mkto-<Secret Key>
4. Include application:openURL:sourceApplication:annotation: to AppDelegate.m file (Objective-C)

Handle Custom Url Type in AppDelegate

How to Install Marketo SDK on Android


  1. Add an application in Marketo Admin (obtain your application Secret Key and Munchkin Id)
  2. Setup Push Notifications (optional)
  3. Download Marketo SDK for Android

Android SDK Setup

Setup Using Gradle

1. Open your project in android Studio

2. Right click on your project and select #Open Module Settings

3. Click on Project which is in the Left panel of the screen

4. In Android Plugin Repository add ‘

5. In Default Library Repository add ‘

6. Click OK

7. In the application level build.gradle file, under the dependencies section add

implementation ‘com.marketo:MarketoSDK:0.7.7’

8. Sync your Project with Gradle Files

Setup Using .AAR

1. Open your project in Android Studio.


2. Right-click on your project and select “Open Module  Settings”.


3. Click on the plus button “+” in the top left corner.


4.  Select “Import .JAR/.AAR package” and click “Next”.


5.  Click the ellipses button  “..” and select the location of the .aar file from Marketo Android SDK.


6. You can change the name of the SubProject and click “Finish”.


7. Right-click on your project and select “Open Module Settings”.


8. Select your project name in “Modules” and click on the “Dependencies” tab.


9. Click on the plus button “+” (at the bottom on Mac, at top corner on Windows) and select “Module dependency”.


10.  Select the SubProject name from  Step 6.


11. Click “OK” and let Gradle sync the project and resolve the dependency.


12. When Gradle sync is complete, it will show you the following info in Gradle Console.


Configure Permissions

Open AndroidManifest.xml and add following permissions. Your app must request the “INTERNET” and “ACCESS_NETWORK_STATE” permissions. If your app already requests these permissions, then skip this step.

Initialize SDK

1. Open the Application or Activity class in your app and import the Marketo SDK into your Activity before setContentView or in Application Context.

2. (DEPRECATED Remove this code when updating to v0.7.6) Configure activities. Add Marketo.onStart(), Marketo.onStop() in all or in base activity as shown below.

3.  ProGuard Configuration (Optional)

If you are using ProGuard for your app, then add the following lines in your proguard.cfg file. The file will be located within your project folder. Adding this code will exclude the Marketo SDK from the obfuscation process.

Android  Test  Devices

Add “MarketoActivity” to AndroidManifest.xml file inside application tag.