Tag Archives: ios

Updates to Unity, C++, and iOS tools for Play game services

Posted by Benjamin Frenkel, Product Manager

To further support all you game developers, we've updated our popular developer tools to give you a consistent set of game services across platforms for a better, more stable experience, with a particular focus on improvements to the Play game services Unity plugin. In addition, we added support for the Nearby Connections API, launched earlier this year at GDC, to our C++ SDK and Unity plugin.

Let’s take a look a closer look!

Unity plugin feature parity and stability improvements

We’ve added full support for Events and Quests in the Unity plugin. If you’re a Unity developer, you can now incorporate Quests into your games and take full advantage of Player Analytics natively within the Unity IDE.

We’ve also listened to feedback from our community of Unity plugin users and made stability improvements to Play game services Multiplayer, Saved Games, and to sign-in. You’ll now have a much better experience integrating with these Play game services, with fewer crashes and glitches.

C++ SDK and Unity support for the Nearby Connections API

We have added support for the Nearby Connections API to our C++ SDK and Unity plugin. You can now easily build awesome second screen and local multiplayer experiences, like this Beach Bugging Racing example, with the development tools you are most comfortable with.

Easier and more stable iOS builds with CocoaPods

We’ve also made major improvements to our Play game services CocoaPods, which simplify dependency management and building App Store packages from Xcode. The CocoaPods will improve building for iOS with the Play game services iOS and C++ SDKs, and the Unity plugin. We also improved the stability of multiplayer on iOS, eliminating many of the issues around accepting match invitations.

Finally, we improved our support for iOS 8, making it easier to set up multiplayer push notifications, and fixing UI compatibility issues.

Quick links to get you started

Play game services developer page: https://developers.google.com/games/services/
Case studies: http://developer.android.com/distribute/stories/games.html

Downloads

Announcing Three New Reporting Dimensions for AdMob Publishers

Today we’re announcing the availability of three new reporting dimensions created specifically for AdMob publishers: APP_ID, APP_NAME, and APP_PLATFORM.

Here’s how they work:

  • APP_ID - This dimension matches the store ID of an application. It will be prefixed with “1:” for an App Store ID (iOS) and “2:” for a Google Play ID (Android). For example, “1:476954712” or “2:com.labpixies.lineup”.
  • APP_NAME - Matches the name of an application, like “Flood-It!” or “Line Up”.
  • APP_PLATFORM - This dimension can partition results by platform (e.g. “Android” or “iOS”).

These new dimensions are available now in the AdSense Management API. If you’re unfamiliar with it, the AdSense Management API is a web-based API that you can query to get information about your AdSense account. There are client libraries for a number of platforms, though any standard HTTP client can send requests to it and parse the responses. With a little code and these new dimensions, you can create custom reports about a single app, a family of them, or even your entire platform lineup!

For more information on building and customizing AdMob reports, check out the reporting section of the AdMob developer site. You can also use the API Explorer to test out queries that include these fields.

New Swift Samples for the IMA SDK

We’re excited to announce the addition of Swift samples to the IMA SDK! To view these samples check out our GitHub repo. Along with these new samples we’ve also added Swift snippets to our quick start guide.

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

Announcing two new versions of the Google Mobile Ads SDK, plus the Native Ads beta!

Today we’re pleased to announce two new versions of the Google Mobile Ads SDK: version 7.5 for Android, and version 7.3.1 for iOS. Included is a brand new way to monetize your apps with the Google Mobile Ads SDK: native ads!

With native ads, publishers can display ad assets directly in native views, using layouts and storyboards they design to fit their user experience. You now have the power to monetize with ads that are seamless with content!

Native ads are currently in a beta with a limited group of publishers, but the code is included in the latest releases of the Mobile Ads SDK for iOS and Android. Those of you using Android Studio can download Google Repository (Rev. 19) via the Android SDK Manager to get the latest Gradle artifacts, and developers with Eclipse projects can find it listed as Google Play services (Rev. 25). Publishers with iOS apps can snag the latest SDK for that platform by updating their Podfile to pull version 7.3.1.

For AdMob, DFP, and AdX publishers, there are two system-defined native ad formats: App Install and Content. Each provides a set of image and string assets that make up the ad. App Install ads contain assets named “price,” “star rating,” and so on, while Content ads have “body,” “logo,” and others. See the AdMob and DFP help center articles for more information about the formats.

Publishers using DFP can also take advantage of custom native ad formats. With a custom format, you can create your own set of asset definitions, and then upload creatives with a matching set of values.

Native ads are loaded using the new AdLoader and GADAdLoader classes, which can request a single format or several at the same time, helping you maximize the value of your impressions. Here’s an example showing how to request an App Install ad on Android:


AdLoader adLoader = new AdLoader.Builder(this, DFP_AD_UNIT_ID)
.forAppInstallAd(new NativeAppInstallAd.OnAppInstallAdLoadedListener() {
@Override
public void onAppInstallAdLoaded(NativeAppInstallAd ad) {
/* display the ad */
}
}).build();
adLoader.loadAd(new AdRequest.Builder().build());

And here’s the iOS equivalent:


self.adLoader = [[GADAdLoader alloc]
initWithAdUnitID:DFP_AD_UNIT_ID
rootViewController:rootViewController
adTypes:@[ kGADAdLoaderAdTypeNativeAppInstall ]
options:nil];
self.adLoader.delegate = self;
[self.adLoader loadRequest:[GADRequest request]];

Check out the native ads guide (Android | iOS) for more information about native ads. For a full list of Mobile Ads SDK changes, check out our release notes. For technical questions, post them on our forum.

IMA SDK for iOS Beta 13 Released

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.

Rollback of roadblocks feature in the Mobile Ads SDK

When announcing version 7.0.0 of the Google Mobile Ads SDK for iOS, we mentioned that developers could roadblock creatives and prevent competing ads in mobile apps.

The launch of the roadblocks feature in version 7.0.0 had an unintended side effect for DFP reservations. By default, ad requests from the same device were getting frequency capped for 30 seconds unless the app called the updateCorrelator method between requests.

To restore the default behavior, we have rolled back the roadblocks feature. What this means is that updateCorrelator effectively does nothing in version 7.0.0. We will relaunch support for roadblocks and competitive exclusions in a future iOS SDK release after improving the feature to preserve the default behavior.

If you have any questions about this change, leave us a note on the forum.

Announcing version 7.0.0 of the Google Mobile Ads SDK for iOS

Today we’re releasing v7.0.0 of the Google Mobile Ads SDK for iOS. For this release, we focused on making the SDK easier to use, including distributing it as a framework. We’re also showing our DFP publishers some love by launching new first-class APIs to support the common DFP features they’re already using with Google Publisher Tag. A detailed list of these and other changes can be found on our release notes page.

SDK as a framework

The SDK is being distributed as a framework in this release. This comes with the following benefits:

  • You only have to add one item to your project. No more worrying about adding headers separately!
  • The SDK automatically links frameworks it depends on. No more manually adding framework dependencies!
  • Classes that use the SDK can now automatically import the necessary headers files with a single line of code:
    @import GoogleMobileAds;
    Previously, you had to import header files separately.

    #import "GADBannerView.h"
    #import "GADBannerViewDelegate.h"
    #import "GADRequest.h"

If all that wasn’t awesome enough, we also removed the need to include the -ObjC linker flag in your project! Just drag in the library to start using it.

If you’re using CocoaPods, you automatically get all of these changes by referencing version 7.0.0 of the Google-Mobile-Ads-SDK podspec. Since this is a major release, make sure you update your Podfile to grab major version 7:

pod 'Google-Mobile-Ads-SDK', '~> 7.0'

Introducing new friendly DFP APIs

Version 7.0.0 also adds first-class support for custom targeting and category exclusions in a brand new DFPRequest object.


DFPRequest *request = [DFPRequest request];
request.customTargeting = @{
@"gender", @"male"
};
request.categoryExclusions = @[@"cars", @"sports", @"pets"];

New to 7.0.0 is the ability to roadblock creatives and prevent competing ads in mobile apps. The SDK does this by adding an updateCorrelator method with similar functionality to the same method in GPT:


[DFPRequest updateCorrelator];

All subsequent DFP ad requests will use the new correlator value until the correlator is updated again. Requests with the same correlator are capable of being roadblocked, and will not serve competing ads.

For more information on the DFP API improvements, see the developer docs.

Dropping support for iOS 5

With this release, we are also dropping support for iOS 5. We’ve noticed that almost all users are running iOS 6 or higher, and dropping support for older versions means the library can take advantage of the newer iOS APIs and offer more stability for you and your users. The SDK now supports only iOS 6.0 and up.

Sounds great! Where can I download the SDK?

As always, the latest SDK can be found on our downloads page. If you have any technical questions about these updates, drop us a line on the forum.

Mobile Ads SDK Interstitial Best Practices

As you know, interstitials are a great way to monetize your app while still providing a great user experience, with natural "commercial breaks" in your user flow. However, interstitials can take a while to load, and we know that this can make it tricky to implement since you must explicitly call loadAd() before calling show().

A common mistake is to call interstitial.show() in the onAdLoaded() callback. This makes the show() call not dependent on the app state, but on the asynchronous loading. Since the developer doesn't control when the onAdLoaded() callback happens, this provides a terrible user experience; the ad will show as soon as it's finished loading, which could be in the middle of another user interaction. This can result in policy violations due to accidental clicks.

Instead, we recommend loading the ad earlier in the lifecycle of the application, then polling interstitial.isLoaded() to see if the ad is ready to be shown. If it isn't ready, we recommend moving to the next state in the application.

We provide an example of proper interstitial loading in our sample "Impossible" game. When the game begins, we call loadAd() on the interstitial. When the user loses and clicks the button to try the game again, we check to see if the ad is loaded with isLoaded(). If it is, then we show an ad before starting the new round. Otherwise, we show a toast message that the ad isn't loaded and begin a new round.

This example focuses on the Android experience, but the same ideas apply to iOS. We hope our new interstitial example can help you create the best user experience as you integrate the Mobile Ads SDK into your apps. Check out this video for more on interstitial best practices. And as you're adding interstitials to your app, hit us up with technical questions on our developer forum!

Launching v6.12.0 of the iOS Mobile Ads SDK with iOS 8 Support

Today, we’re happy to announce the launch of Google Mobile Ads SDK v6.12.0 with support for iOS 8. Specifically, it includes the following iOS 8 updates:

  • Less time is spent on the main thread while loading ads
  • Smart Banner ads are displayed correctly in landscape

New Framework Dependencies

Version 6.12.0 also requires that your app link to two additional frameworks:

  • EventKit
  • EventKitUI

If you’re using CocoaPods, simply run pod update to grab the update, and these new frameworks will be automatically linked for you. If you’re not using Cocoapods, the getting started guide has the full list of required frameworks.

See the release notes for a full list of updates. You can grab the latest SDK from the downloads page. If you have any technical questions about the new release, post them on the developer forum. Also follow our Google+ page to keep abreast of the latest developments for the Mobile Ads SDK.

Your iPhone & iPad are ready to get to work with new apps for Docs, Sheets, & Slides

You suddenly remember you need to add "buy milk" to your grocery list, but don't have a pen or paper in sight. You’re on the subway with no reception and need to update your soccer club spreadsheet before you get to practice. You desperately need to make edits to your marketing strategy PowerPoint before you present, but you only brought your iPad to the meeting.

We've all been in binds like this before, but the good news is, now there's a way out.

With today’s launch of the Slides app for iPhone & iPad and updates to the Docs and Sheets apps, we’re delivering on our promise to make it possible for you to work with any file, on any device, any time. You can now create that grocery list, edit that spreadsheet, and update that slide deck with no problem.
Here's the lowdown on what you can now do with Docs, Sheets, and Slides:
  1. You can truly get stuff done from any device—your iPhone, iPad, Android phone, Android tablet, laptop or desktop computer. Any change you make on any of these devices is saved automatically, so you can pick up right where you left off any time, anywhere that you can sign in. 
  2. The Docs, Sheets and Slides apps come with offline editing built right in. Just make the files you want to edit available offline. Any changes you make offline get automatically synced when you reconnect, just like when you make offline edits from your computer
  3. And while converting Office files to Docs, Sheets and Slides is a cinch, the new iPhone/iPad apps also let you edit Office files directly -- just like on the Android apps and the web. 
Simply put, no matter where you are, how spotty the WiFi is, or what file type you're working with, you can get stuff done your way.

Posted by Li-Wei Lee, Software Engineer