SDKBOX AdMob for iPhone X

SDKBOX AdMob for iPhone X


The current version of the AdMob plugin for SDKBOX only allows you to specify anchors for the ad. (Bottom, top, center, etc.)

With the new iPhone X, this will no longer do, as the banner will be underneath the home bar. iPhone X has a ‘safe area’ as well as an ‘unsafe’ area that you need to design for properly.

Will SDKBOX support better ad placement for iPhone X? (So that the banner is only placed in the safe area, or by allowing us to place it with specific coordinates)

And if so, when is this update coming?


For banner, I’ll make the banner is only placed in the safe area.



7.24.0	2017‑9‑20	Official release for iOS 11 support.



Is it ok ?

It seems I need to follow this link .


It looks okay. Is it at the top of the safe area? It looks like the gap between the banner and the notch at the top is a bit big, but I don’t know for certain.

The same goes for bottom aligned ads naturally, they should be at the bottom of the safe area (slightly above the home bar instead of underneath the ‘home bar’ at the bottom of the screen)

There’s some additional explanation and sample code here for iOS:


same as :




Yep, that’s the safe area. So bottom ad should be in the bottom of the green area. Top ad in the top of the green area.
Apparently apps need to support this on the iPhone X by November 20 to stay in compliance with Google’s AdMob terms. (Ads always need to be fully visible)


I have one question: game should place in the safe area ?


The game should be placed on the entire screen (safe area + unsafe area)

It is up to the developer to place UI elements properly with the ‘unsafe area’ in mind. So for example the background can cover the entire screen, but if you have a button in your app you should place it in the safe area yourself so it does not get hidden by the iPhone X ‘notch’ at the top of the screen, or overlapped by the homebar at the bottom.

You can read more about that here:

There is also a property called safeAreaInsets: ( I believe this is used to determine the ‘true’ safe area (in case you are reserving space for custom views or status bars inside the safe area)

As a sidenote: For cocos2d-x itself it will also be useful if we have access to some of these values to better design for iPhone X. Or we can write our own bridge functions I guess. :slight_smile:


This just made me realize something. If the user has set safeAreaInsets then the banner should be placed according to the safeArea + insets. Otherwise it will overlap with any custom views or status bars the user has put in the safearea.


This is going to be big pain.


Yes iPhone X is a nightmare for game and UI developers and designers!


@nite @yinjimmy

Are there any updates on the iPhone X changes for SDKBOX yet? If possible we would like to fix this before Google’s compliance deadline of the 20th of November.


i’m using code form AdMob .


Nice :slight_smile: Looks like it’s working.


But it looks so ugly. It will overlap gaming elements too.
I am afraid that Apple might say “Banner Ads should not be implemented for iPhone-X” :slight_smile:


tun agree with u.


What’s the latest update on this?
The deadline from google to fix apps using admob for iPhone X was 20 November. I still don’t see the updated version on the sdkbox website. Can we expect the admob update today or soon?

Here’s the google message about the issue:

Dear Developer,
The iPhone X is here and with it, new design considerations – the device’s rounded corners, notch and home screen indicator on the extended screen can obscure content. When ads are placed in these areas, users will have poor ad experiences.
To ensure that users always have great experiences on your app, and to continue receiving AdMob ads, update your banner and native ad placements to designated “safe areas” for iPhone X by November 20. We’ve put together an implementation guide to help you with these changes.
Updating the ad placements will also help you stay compliant with our new ad policies that do not allow ads to be placed where objects may interfere with the user’s typical interaction with the ad or app.


u can try the staging version, release ASAP.


I tried the staging version:

I installed admob and used the old sdkbox_config that I already had.
The ad banner is still located in the unsafe area though (see image):
Do I need to use a special setting to ensure the ad is drawn in the safe area?

Here is my sdkbox config

        "AdMob": {
            "testdevice": "simulatorId", 
            "test": true, 
            "ads": {
                "phone": {
                    "width": 320, 
                    "type": "banner", 
                    "id": "ca-app-pub-MY_ID", 
                    "alignment": "bottom", 
                    "height": 50

Tried on iPhone X simulator & iPhone X physical device

I also tried alignment top but that also put it in the unsafe area.

    "ios": {

sorry, u need to add filed safearea=true


Just tested, it’s working. Thanks :smile:

EDIT: Interstitial ads are still showing the close button in the unsafe area. Does the sdkbox admob plugin use the latest google ads sdk?

Version 7.26.0 released on 2017‑11‑17
iPhone X support.
For full screen ads, the default close button now renders within the safe area.
Removed the nativeAd property from GADAdChoicesView and GADMediaView.