Google DFP's performClickOnAssetWithKey:customClickHandler does not work with swift

277 views Asked by At

I want to use DFP with swift.

I'm trying to use performClickOnAssetWithKey:customClickHandler method for reporting click. https://developers.google.com/mobile-ads-sdk/docs/dfp/ios/native

But, it doesn't work and the closure doesn't work as well.

Have anyone used this method?

1

There are 1 answers

4
naohide_a On

Finally, I found the answer.

GADNativeCustomTemplateAd has variable name googleClickTrackingURLString. then we can get the value nativeCustomTemplateAd.valueForKey("googleClickTrackingURLString")

And after I accessed the url, clicking report counter ran correctly.

In conclusion, I didn't use performClickOnAssetWithKey:customClickHandler method.