admob iOS適配iOS14相關(guān)權(quán)限

來源: 獨(dú)立自由職業(yè)者
作者:vcodei
時(shí)間:2020-12-03
17700
本文分享個(gè)人admob iOS適配iOS14相關(guān)權(quán)限的經(jīng)驗(yàn)。

MTI4NDg1MS5qcGc.jpg

8月27日有谷歌相關(guān)人員聯(lián)系我更新iOS14的廣告適配,電話中說明了一些基本情況,目前他們都在忙適配iOS14廣告的事情。

具體內(nèi)容如下:

1.Xcode11.6即可使用

2.無需等待正式版本iOS14發(fā)布

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

谷歌適配的官方鏈接:

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

1.配置info.plist,啟動(dòng)SKAdNetwork

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

640.png

2.配置info.plist,啟動(dòng)權(quán)限NSUserTrackingUsageDescription

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

640 (1).png

3.提出授權(quán)請求,需要代碼和相關(guān)庫的導(dǎo)入

#import <AppTrackingTransparency/AppTrackingTransparency.h>


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


- (void)requestIDFA {


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


}

好了,為題來了,沒有發(fā)布新版本Xcode,沒有iOS14正式版的發(fā)布,哪來的AppTrackingTransparency?

有人說,從測試版本找到這個(gè)庫,導(dǎo)入不就行了。

我大膽嘗試了一下

恭喜我入坑了!

640 (2).png

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.

大致的意思,是我用了預(yù)發(fā)布版本sdk,不予通過,等待發(fā)布或者刪除相關(guān)API。

總結(jié):

一點(diǎn)也不好玩!

蘋果正式版本沒發(fā)布之前,千萬不要更新!不要導(dǎo)入沒發(fā)布的庫用到現(xiàn)在的版本上!

立即登錄,閱讀全文
版權(quán)說明:
本文內(nèi)容來自于獨(dú)立自由職業(yè)者,本站不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。文章內(nèi)容系作者個(gè)人觀點(diǎn),不代表快出海對觀點(diǎn)贊同或支持。如有侵權(quán),請聯(lián)系管理員(zzx@kchuhai.com)刪除!
優(yōu)質(zhì)服務(wù)商推薦
更多