12

Instead, just a blank view is appearing.

Here's how I load the ad request:

GADMobileAds.configure(withApplicationID: "ca-app-pub-9213331484438711~8534798836") // actual app id
bannerView.delegate = self
bannerView.rootViewController = self
bannerView.adSize = kGADAdSizeLargeBanner
// unit id taken from guide: https://firebase.google.com/docs/admob/ios/quick-start
// Actual unit id doesn't work either.
bannerView.adUnitID = "ca-app-pub-3940256099942544/2934735716"
let request = GADRequest()
request.testDevices = [kDFPSimulatorID]
bannerView.layoutIfNeeded()
bannerView.load(request)

I've set Allow Arbitrary Loads to YES, but this didn't help. Delegate methods don't even get called. Am I missing something? Has anyone been able to get Admob working in an iMessage extension?

A sample project can be found here.

Daniel Storm
  • 18,301
  • 9
  • 84
  • 152
Andrey Gordeev
  • 30,606
  • 13
  • 135
  • 162

3 Answers3

3

I'm not sure it is possible to have ads in an app extension. Either way, there is a review guideline prohibiting it. From iAds don't work in Action Extension or Share Extension?:

Review criteria 25.3: https://developer.apple.com/app-store/review/guidelines/#advertising

  • 25.3: Apps hosting extensions that include marketing, advertising, or in-app purchases in their extension view will be rejected
Daniel Storm
  • 18,301
  • 9
  • 84
  • 152
  • Is this criteria about *apps hosting extensions*, not extensions themselves? Otherwise, what's the point of creating extensions if you are unable to monetize them. – Andrey Gordeev Sep 07 '16 at 07:40
  • @AndreyGordeev Its about the actual extensions it sounds like, "***in** their extension view will be rejected*". For example, having an application that displays ads is ok, but having the applications embedded today extension/notification center widget display ads is not. – Daniel Storm Sep 07 '16 at 13:55
  • 1
    @AndreyGordeev The point is good user experience. Find other ways to monetize. – Léo Natan Sep 08 '16 at 21:05
  • 2
    @LeoNatan You are both referring to the old guideline. Please check out your link, it doesn't have such criteria. The correct link would be: https://developer.apple.com/app-store/review/guidelines/2016-06-13/#extensions which is an archive link. – Andrey Gordeev Sep 09 '16 at 05:58
  • It should be noted that this is about Apple Extensions, *not* iMessage Apps which have their own set of standards laid out by Apple. (Haven't seen any rulings on ads but they *DO* allow for in-app purchases (unlike stand-alone extensions) – Albert Renshaw May 12 '17 at 05:15
1

While this is not an answer to the question asked, I want to point out that review criteria 25.3 wasn't written with iMessage apps in mind. From iMessage app FAQ.

Can my iMessage app or sticker pack have in-app purchases?

You may implement in-app purchases for your iMessage app or iOS apps with an iMessage extension.

This explicitly allows in-app purchases (which are forbidden by 25.3) although it does not say anything about advertising. Once AdMob or another ad library is working with an iMessage extension I believe it would be worth a try to submit the app.

Daniel Storm
  • 18,301
  • 9
  • 84
  • 152
AbePralle
  • 942
  • 1
  • 11
  • 13
  • 3
    Has anyone been able to add ads with admob or any other network thus far? It's been a while since this thread was updated – Daniel Jan 07 '17 at 18:02
1

From the AdMob team as of Aug 7, 2017:

Thanks for reaching out to us. Our SDK does not support Messages extension. You can keep an eye out for our release notes or monitor our blogs if this ever changes.

Regards, Deepika Uragayala Mobile Ads SDK Team