admob iOS适配 iOS14 相关权限

2020-09-01  本文已影响0人  简书是不是要倒闭了

       8月27日有谷歌相关人员联系我更新iOS14的广告适配,电话中说明了一些基本情况,目前他们都在忙适配iOS14广告的事情。

具体内容如下:

1.Xcode11.6 即可使用

2.无需等待正式版本iOS14发布

3.Google Mobile Ads SDK 7.64.0或更高版本


谷歌适配的官方链接:

https://developers.google.com/admob/ios/ios14

1.配置info.plist,启动 SKAdNetwork

<key>SKAdNetworkItems</key><array><dict><key>SKAdNetworkIdentifier</key><string>cstr6suwn9.skadnetwork</string></dict></array>

2.配置info.plist, 启动权限 NSUserTrackingUsageDescription

<key>NSUserTrackingUsageDescription</key><string>This identifier will be used to deliver personalized ads to you.</string>

3.提出授权请求,需要代码和相关库的导入

#import <AppTrackingTransparency/AppTrackingTransparency.h>

#import <AdSupport/AdSupport.h>...

- (void)requestIDFA {

[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {// Tracking authorization completed. Start loading ads here.// [self loadAd];}];

}

好了,为题来了,没有发布新版本Xcode,没有iOS14正式版的发布,哪来的AppTrackingTransparency?

有人说,从测试版本找到这个库,导入不就行了。 

我大胆尝试了一下

恭喜我入坑了!

PLA 2.3

Your app or its metadata contains references to a pre-release version of Apple software, products, or hardware. Apps with compatibility references to a pre-GM version of an Apple operating system SDK or pre-released Apple products or hardware are not in compliance with the Apple Developer Program License Agreement.

Specifically, section 2.3 states:

"Apple may provide You with pre-release versions of the Apple Software or related services that constitute Apple Confidential Information and are subject to the confidentiality obligations of this Agreement."

Next Steps

Please remove all references to pre-release versions of Apple software, products, and hardware from your app and its metadata.

大致的意思,是我用了预发布版本sdk,不予通过,等待发布或者删除相关API。

总结:

一点也不好玩!

苹果正式版本没发布之前,千万不要更新!不要导入没发布的库用到现在的版本上!

更多相关知识请关注我的公众号

上一篇下一篇

猜你喜欢

热点阅读