iOS 如何在原生广告 GADRequest 中设置自定义定位?

How to set custom targeting in Native ad GADRequest in iOS?

如果横幅 ads.we 可以在 DFP 请求中像这样发送,我可以为 DFPRequest 设置自定义目标。

let request = DFPRequest()
request.customTargeting = [string:string]

关于Native/Sponsored广告,如何设置自定义目标?

let request = GADRequest()

在 GADRequest 中,我找不到任何 customTargeting property.Only DFPRequest 详细信息在 google 开发者网站上提供。

https://developers.google.com/mobile-ads-sdk/docs/dfp/ios/targeting#publisher_provided_identifiers

我认为您可以从原生广告加载 DFPRequest。下面是代码,

adLoader.load(DFPRequest())

这样你就可以定位了。我不确定。所以请检查文档。下面是 link 我为您提供的用例。

The loadRequest method in GADAdLoader accepts the same DFPRequest objects as banners and interstitials. You can use request objects to add targeting information, just as you would with other ad types.

Link 以上:https://developers.google.com/mobile-ads-sdk/docs/dfp/ios/native