【发布时间】:2021-10-18 08:27:07
【问题描述】:
在 podfile.lock 我有
- Google-Mobile-Ads-SDK (8.7.0):
- GoogleAppMeasurement (= 7.0)
- GoogleUserMessagingPlatform (>= 1.1)
这段代码运行正常,所以sdk安装成功
import GoogleMobileAds
let options = GADMultipleAdsAdLoaderOptions()
options.numberOfAds = 5
adLoader = GADAdLoader(adUnitID: adUnitID, rootViewController: requester, adTypes: [.native], options: [options])
adLoader.delegate = self
但我可以显示收到的 GADNativeAd,因为无法访问视图
import UIKit
import GoogleMobileAds
class FeedAdTVC: UITableViewCell {
func setup(with: GADNativeAd) {
let templateView = GADUnifiedNativeAdView()
}
}
得到:在范围内找不到“GADUnifiedNativeAdView”
【问题讨论】:
标签: ios swift firebase google-ads-api googlemobileads