Today we’re announcing the release of beta version 13 of the IMA SDK for iOS. This release includes two new major features:

  1. The SDK can be included as a framework in your project.
  2. The SDK now supports ad playing in the background.

Importing the SDK as a Framework

Prior to today’s release, importing the SDK involved manually adding every header file to your project, importing every header file individually in your source, and manually including the required frameworks. With the new framework model, you can add a single .framework file to your app and replace all of your header import source lines with a single import statement.

For CocoaPods Users

If you use CocoaPods, your build will fail after you update to beta 13. But fear not, you can fix this in a matter of seconds with the following steps:

  1. Locate and remove each instance of an imported IMA header file in your source (these will look like #import “IMA<something>.h”).
  2. Add the following line to the first header or implementation file to access an IMA object:
    @import GoogleInteractiveMediaAds;

For Manual Importers

If you don’t use Cocoapods, your path to upgrade is slightly different. You can update using the following steps:

  1. Remove all of the IMA header files and the IMA library file from your project.
  2. Under "Build Phases” > “Link Binary With Libraries”, click the plus sign, select “Add Other...”, and navigate to the downloaded and extracted SDK files. Select GoogleInteractiveMediaAds.framework from whichever folder applies to your implementation (with or without AdMob) and click “Open”.
  3. Follow the two steps above for CocoaPods users.

Background Ad Playback

Since our launch, one of the most requested features has been background ad playback. Suppose, for example, you author a music streaming app, and you want to be able to request and play ads in the background. With today’s release, however, we now support requesting and playing ads in a background service. For more info and implementation instructions, see our Background Ad Playback guide.

As always, if you have any questions feel free to contact us via the support forum.