Here is how to import the Marin iOS SDK into your app:
- Setup CocoaPods (dependency management for iOS apps) if you have not already. See guide here.
- Download the SDK to your computer.
- Open a terminal and navigate to your project directory.
- Create a Podfile in your project if you don't have one already. See guide here.
- Reference the Marin iOS SDK in your Podfile
Note: The SDK currently supports iOS 6.0 and later. Please be sure your application targets an iOS platform version equal to or greater than 6.0.
Your Podfile should look similar to this:
- Run this command in your projects directory in a terminal console
to add the Marin iOS SDK to your workspace.
- Import the header of the SDK into your project. To do this, we recommend importing the Marin SDK into your AppDelegate.
- Next, initialize the SDK by executing the following code snippet witn the
didFinishLaunchingWithOptionsmethod in your AppDelegate.
- Now that the SDK is installed and initialized, you will begin tracking app opens.
Here is how to track an event. By Tracking this event this will create a related
Here is how to track a product viewing:
And here is how to track an event with the extra data needed for a conversion. Conversions need to be setup in the app to read these events.