The IMA SDK for iOS version beta7 will introduce some changes in the way you tell the SDK about your display area and companion slots, which lays the groundwork for more versatility in displaying ads. While these new, more versatile features aren’t quite ready yet, we recommend building with beta7 so you'll be prepared to take advantage of upcoming greater versatility and extending support to future iOS platforms.

Introducing the IMAAdDisplayContainer

In the beta6 version of the SDK, the IMAAdsManager contains an adView which you add to your UI to display ads (IMAAdsManager.adView). In the beta7 version of the SDK, you will provide the SDK with a UIView in which it will display ads when they are ready. This is done via the new IMAAdDisplayContainer. This new object will also contain information about your companion ad slots (but more on that later):

  self.adDisplayContainer = [[IMAAdDisplayContainer alloc]
      initWithAdContainer:self.videoView
           companionSlots:nil];




In the example, we use the videoView as the UIView for the ad container. The SDK simply adds views to the provided UIView to display ads, so you won’t lose the required components for the content player already in the videoView. This IMAAdDisplayContainer will be passed to the IMAAdRequest, in place of the current companionSlots parameter:

  IMAAdsRequest *request =
      [[IMAAdsRequest alloc] initWithAdTagUrl:self.adTagUrlTextField.text
                           adDisplayContainer:self.adDisplayContainer
                                  userContext:nil];

Changes to the IMACompanionAdSlot

In the beta6 version of the SDK, you provide the IMAAdsRequest with an NSArray of IMACompanionSlot objects, each of which is initialized with a width and height. When ads are loaded, you add these to your UI:

  // Create your companion slots.
  NSMutableDictionary *companions = [NSMutableDictionary dictionary];
  companions[@"300x50"] =
      [[IMACompanionAdSlot alloc] initWithWidth:300 height:50];
  self.companionSlots = companions;

  ...

  // Give the companion slots to the IMAAdsRequest.
  IMAAdsRequest *request =
      [[IMAAdsRequest alloc] initWithAdTagUrl:self.adTagUrlTextField.text
                               companionSlots:[self.companionSlots allValues]
                                  userContext:nil];

  ...

  // Once ads have been loaded, display the companion ads.
  [self.smallCompanionSlot addSubview:
      ((IMACompanionAdSlot *)self.companionSlots[@"300x50"]).view];

In the beta7 version of the SDK, you will initialize the IMAAdDisplayContainer with an array of companion ad slots. You will then initialize the IMAAdsRequest with the IMAAdDisplayContainer. When ads are loaded, the SDK will fill in the companions for you:

  // Create your companion slots.
  NSMutableDictionary *companions = [NSMutableDictionary dictionary];
  companions[@"300x50"] =
      [[IMACompanionAdSlot alloc] initWithView:self.smallCompanionSlot 
                                         width:300 
                                        height:50];
  self.companionSlots = companions;

  // Give the companion slots to the IMAAdDisplayContainer.
  self.adDisplayContainer = [[IMAAdDisplayContainer alloc]
      initWithAdContainer:self.videoView
           companionSlots:[self.companionSlots allValues]];

  // Request ads with the IMAAdDisplayContainer.
  IMAAdsRequest *request =
      [[IMAAdsRequest alloc] initWithAdTagUrl:self.adTagUrlTextField.text
                           adDisplayContainer:self.adDisplayContainer
                                  userContext:nil];

These changes will allow for continued support of YouTube-hosted ads (including TrueView), as well as allow you to provide a custom player for ads further down the road, similar to the HTML5 custom playback option. A custom ad player is not intended to be used by everyone - in fact most of you will not need it - but it will offer support for some additional features in the future.

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

 - 

support forum.

We're pleased to announce open sign-ups for the first Ads API Workshops on Display event of 2014. The workshop will cover the following display ads products:
  • DoubleClick for Publishers API
  • DoubleClick Sales Manager API
  • Interactive Media Ads (IMA) SDK
  • Mobile Ads SDK

These workshops are a great way for you to meet with the display ads API team and ask questions in person. This is also a key occasion for members of the community to bring their feedback directly to us. Most of all, it's a great opportunity for you to exchange ideas and best practices with fellow developers.

We are inviting you to join us in the following cities:

  • New York, Tuesday, June 17
  • San Francisco, Monday, June 23

Please fill out this registration form if you're interested in attending one of these workshops. Due to limited space, we cannot guarantee admittance, but we’ll send a confirmation email in the coming weeks to let you know if you have a spot.

To receive announcements of upcoming Ads API Workshops on Display, please join this mailing list.

Hope to see you there!


If you are a Maven user, it’s as simple as modifying the appengine-web.xml file and running
 mvn appengine:devserver

We’ve also included an m2e project so developing with Eclipse is easier than ever. Just import the extracted dfp-playground-maven-project download into Eclipse, modify the appengine-web.xml file (in the src/main/webapp/WEB-INF directory), and run the DevAppServer.launch profile in the eclipse-launch-profiles folder.

With Google Plugin for Eclipse

We also heard you loud and clear that not everyone uses Maven, so we’ve added a Google Plugin for Eclipse project download which includes all jar dependencies. As with the Maven project, just extract the dfp-playground-jars-and-google-eclipse-plugin-project download, import it into Eclipse, add Google App Engine functionality to the project, modify the appengine-web.xml file (in the war/WEB-INF directory), and run the project like any other App Engine project.

If you’d like to learn more, take a look at the README. As always, we are open to any feedback, so please don’t hesitate to leave us any feature requests in the issues section. Also, if you’d like to contribute to the project, we welcome any patches (just make sure you become an official contributor first).

In the coming months, we’ll be adding even more functionality to the application, so stay tuned and happy hacking!

When the user clicks Buy now, the SDK will invoke your in-app purchase listener with the purchase information necessary to start a transaction for that product. You are responsible for implementing the in-app purchase flow from this point. Full implementation details can be found in our Android and iOS documentation.

Note: Front-end support for this feature is not available yet, but is coming soon.

New Mediation APIs

As part of our Google Play services API revamp, we’ve added new mediation APIs (which we’re calling mediation v2) to make it easier for ad networks to create mediation adapters.

Don’t worry! We’re still supporting mediation adapters written against mediation v1 APIs. This change won’t require any immediate updates to your apps.

If you previously passed extra parameters to third party networks, note that this process has changed for mediation v2. You’ll now pass a bundle to the ad network, keyed by its mediation v2 adapter class. Here is an example of passing extra parameters to AdMob:

Bundle adMobBundle = new Bundle();
adMobBundle.putString("color_bg", "AAAAFF");
AdRequest request = new AdRequest.Builder()
    .addNetworkExtrasBundle(AdMobAdapter.class, adMobBundle)
    .build();

You can also use this snippet to check for the existence of mediation v2 support. If this snippet compiles, then the adapter supports mediation v2. If there is a compilation error saying that the arguments don’t match the arguments for addNetworkExtrasBundle(Class, Bundle), then that adapter class does not support mediation v2.

See the documentation for more information on passing parameters to mediation v2.

Dropped Support for iOS 4.3

The 6.9.2 iOS SDK release has dropped support for iOS 4.3. By dropping iOS 4.3, the SDK can take advantage of automatic reference counting (ARC) weak references to provide a more stable release. The SDK still supports iOS 5.0 and above.

Check out the downloads page to grab the latest iOS release. A new Google Play services revision will soon be available in Android’s SDK Manager.

For a full list of SDK changes, see the release notes. If you have any technical questions about these changes, we’re available on the forum. Finally, stay tuned for an update on front-end support for in-app purchase ads on our Google+ page.