【发布时间】:2021-12-06 03:57:47
【问题描述】:
您好,我在 XCode 上存档我的应用程序时收到此错误。该应用程序在模拟器和物理设备上正常运行,但是当我尝试存档时出现此错误:
在范围内找不到类型“GADInterstitialAd”
这是 pod 文件:
pod 'Google-Mobile-Ads-SDK','~>8.0'
我也像这样导入 Google 广告:
导入 GoogleMobileAds
这是插页式实现:
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
})
【问题讨论】:
-
为什么 self 被强制解包?