2

在尝试了所有可能的方法来解决我面临的问题后,我问了这个问题。首先,让我们看看这个错误,我会告诉我我做了什么来解决它,但不幸的是,没有什么对我真正有用。

因此,我使用 cocoaPod 导入了 Google Mobile AD sdk。在 AppDelegate 中添加了以下行:

GADMobileAds.sharedInstance().start(completionHandler: nil)

以及 info.plist 中的以下内容:

<key>GADApplicationIdentifier</key>
<string>ca-app-pub-3940256099942544~1458002511</string>
<key>GADIsAdManagerApp</key>
<true/>

但是,该应用程序不断抛出以下错误:

Terminating app due to uncaught exception 'GADInvalidInitializationException', reason: 'The Google Mobile Ads SDK was initialized without an application ID. Google AdMob publishers, follow instructions here: https://googlemobileadssdk.page.link/admob-ios-update-plist to set GADApplicationIdentifier with a valid app ID. Google Ad Manager publishers, follow instructions here: https://googlemobileadssdk.page.link/ad-manager-ios-update-plist'

我尝试导入 Firebase,但仍然无法解决问题。

4

0 回答 0