[英]Can't find GADUnifiedNativeAdView in GoogleMobileAds
在 podfile.lock 我有
- 谷歌移動廣告 SDK (8.7.0):
- GoogleAppMeasurement(< 9.0,>= 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()
}
}
得到:在 scope 中找不到“GADUnifiedNativeAdView”
GADUnifiedNativeAdView
似乎在 Google Ad Manager 8 版本中已被刪除,並且似乎被替換為GADNativeAdView
。
在 此處查看遷移指南。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.