iOS In-App Marketing Setup

Current iOS SDK Version 4.13.4

Prerequisites

TUNE recommends having a PROD and DEBUG app in our system. You can switch between builds automatically by using debug macros. Create separate App IDs for the development and production builds of your app so that changes to your development build do not affect your production build (until you’re ready to push them to your production app audience).

You need to have two apps in In-App Marketing for each one of your apps if you support two platforms. One platform is for production and one for development.

Objective-C:

[Tune.initialize(withTuneAdvertiserId: , tuneConversionKey: )];

#ifdef DEBUG
[Tune setPackageName:@"your_package_name_for_debug"];
#else
[Tune setPackageName:@"your_package_name_for_production"];
#endif

Swift:


Tune.initialize(withTuneAdvertiserId: , tuneConversionKey: )

#if DEBUG
Tune.setPackageName(your_package_name_for_debug)
#else
Tune.setPackageName(your_package_name_for_production)
#endif

For more information about creating unique App IDs/package names, please visit Creating Unique Package Names.

Verify your app/Xcode project supports iOS 6.0+ and includes the following frameworks:

  • AdSupport.framework
  • CoreTelephony.framework
  • iAd.framework
  • libz.dylib/libz.tbd
  • MobileCoreServices.framework
  • Security.framework
  • StoreKit.framework
  • SystemConfiguration.framework

Be sure to whitelist “amazonaws.com” in your app’s Info.plist file because of Apple’s requirements on TLS 1.2 (which amazonaws.com does not support). The following example shows a sample whitelist entry in an Info.plist file:

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSExceptionDomains</key>
  <dict>
    <key>amazonaws.com</key>
    <dict>
      <key>NSExceptionRequiresForwardSecrecy</key>
      <false/>
      <key>NSIncludesSubdomains</key>
      <true/>
    </dict>
  </dict>
</dict>

For more information about this App Transport Security (ATS) requirement, please visit Configuring App Transport Security Exceptions.

Enabling In-App Marketing

To enable In-App Marketing:

  1. Include in your app/bundle a configuration file: TuneConfiguration.plist. You can do this by right clicking on the Resource group in XCode => New File... => Resource => Property List.
  2. Set a boolean flag in this configuration file: TurnOnTMA (set to YES).
  3. Set up your UIApplicationDelegate for the SDK to be notified of push notifications.

Enable Location & Proximity Features with Smartwhere

The TUNE Marketing Console integration with Smartwhere extends the power of the TUNE platform to the real-world. Enabling it unlocks features such as:

  • In-store visit attribution
  • Audience segmentation creation based on the real-world places your app users visit
  • Proximity triggered engagements

By default Smartwhere is included with the TUNE iOS SDK for version 4.13.3 and above but is not enabled by default. To enable Smartwhere make the following call after you have initialized Tune in your AppDelegate:

[Tune enableSmartwhereIntegration];

For more information on Smartwhere please see our Smartwhere Integration and Smartwhere In Store Event Tracking articles.

Set Up Push Notifications

Across all platforms, it is important to establish push notifications after your initial SDK install.
For more information on how to set up push notifications and configure campaigns to send out targeted push messages, see Push Notifications.

No Comments

Leave a reply