您好,我在 XCode 上歸檔我的應用程式時遇到此錯誤。該應用程式在模擬器和物理設備上正確運行,但是當我嘗試存檔時出現此錯誤:
在范圍內找不到型別“GADInterstitialAd”
這是 pod 檔案:
pod 'Google-Mobile-Ads-SDK','~>8.0'
我也像這樣匯入 Google 廣告:
匯入 Google 移動廣告
這是插頁式實作:
GADInterstitialAd.load(withAdUnitID: NSLocalizedString("interstitial_id", comment: ""), request: request, completionHandler: {[weak self] (ad, error) in
if error != nil {
return
}
self!.interstitial = ad
self!.interstitial.fullScreenContentDelegate = self
})
uj5u.com熱心網友回復:
您可能正在使用傳統 API 進行插頁式廣告。谷歌有時會在沒有正確告知所有人的情況下更改 API。
嘗試在您使用GAMInterstitialAd.load而不是GADInterstitialAd.load.
這是新 api 的檔案:Google Intersticial API 鏈接
uj5u.com熱心網友回復:
我通過手動將pod deintegratePod移到垃圾箱來解決這個問題,因為它不起作用,我從頭開始重新安裝了 Pod。然后我Link Binary With Libraries手動添加了 Google Ads SDK 框架。
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/329709.html
