简体   繁体   中英

Unity Admob Ads Showing in Editor but not in Xcode or published app

I am working in Unity 2020.3.13f1. Admob banner, interstitial, and rewarded ads work fine in the editor but do not show when I test in Xcode, nor do they show when my app is live on the App store (Even after the 24 hours or however long they sometimes take to start showing). However they work fine on Google Play. As far as I know I have followed Google's Unity implementation guide exactly. Is there something I could be messing up in the way of installing pods, or perhaps is there a framework I should manually link in Xcode that Unity does not automatically do for me? Any help would be greatly appreciated.

There are dozens of things that could be going on.

Are you manually integrating Admob or using a plugin? It's such a pain we eventually bought Easy Mobile Pro to do a lot of the integration for us.

Is your iOS app published in the app store? We had a similar issue but Admob ads won't show until your app is published in the app store.

Are you correctly handling Apples new App Transparency Tracking? Admob Guide This includes adding the proper SDAdNetworkItems to your info.plist file and several other steps.

We also had some other plugins interferring like Nice Vibrations.

Try building a release build in Xcode and view the console. We were seeing this error message which has numberous potential causes.

AVAudioSession.mm:997:-[AVAudioSession setActive:withOptions:error:]: Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session.

First, is your admob app linked to the playstore app? Which google admob package are you using on unity? (which version).

Versions 6.0.0 and 6.0.1 are encountering quite a few problems apparently, including the fact that the app id disappears after you put it on unity (basically if you close and open the project, the app ids disappear), so I advise you at the moment to use version 5.4.0 to get started.

Then another thing I wonder is if you are integrating google packages into xcode manually (by downloading Google Mobile Ads iOS from the internet and then adding all the various packages to the project manually), or if you are doing it automatically with cocoapods (which is the recommended way)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM