gpt4 book ai didi

ios - 适用于 iOS : SKAdNetworkItems, NSUserTrackingUsageDescription、ATTrackingManager 的 Google AdMob 新 SDK 设置。准则 5.1.2 - 法律 - 隐私 - 数据使用

转载 作者:行者123 更新时间:2023-12-03 14:37:07 36 4
gpt4 key购买 nike

Google AdMob 现在显示以下警告。
enter image description here
为 iOS 14 准备您的应用程序 Apple 宣布了新的 AppTrackingTransparency 框架,该框架需要对您的 iOS 应用程序进行更改。实现 GMA SDK 7.64.0(或更高版本)并设置同意消息,以帮助防止广告收入出现重大损失。
某些应用尚未配置为使用 Apple 的 SKAdNetwork 为确保您获得所有广告事件(例如应用安装)的功劳,请务必使用 Google 的网络 ID 配置 SKAdNetwork。
您的某些 iOS 应用程序需要 GMA SDK 更新 要保持广告正常转换并最大限度地减少广告收入损失,请为您的 iOS 应用程序实现 GMA SDK 7.64.0(或更高版本)。并使用 Google 的网络 ID 在您的应用中配置 SKAdNetwork。
为此我做了这些改变

  • 将 GoogleMobileAds SDK 更新至 8.0

  • 2.用这3个键更新了应用程序的Info.plist文件:
            1. GADApplicationIdentifier key with a string value of AdMob app ID.
    2. Added SKAdNetworkItems in plist as mentioned here https://developers.google.com/admob/ios/ios14
    3. NSUserTrackingUsageDescription key with value 'Game_Name would like to access IDFA for thirdparty advertising purpose'
    info.plist 截图
    enter image description here
    还添加了 App Tracking Transparancy Alert:
    - (void)requestIDFA
    {
    if (@available(iOS 14.0, *))
    {
    [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {

    // Admob Ads
    [self loadAdmob_Ads];
    [self loadRewardedInterstitial];
    [self requestAppOpenAd];
    }];
    }
    else
    {
    // Admob Ads
    [self loadAdmob_Ads];
    [self loadRewardedInterstitial];
    [self requestAppOpenAd];
    }
    }
    我还需要在 Xcode 中做些什么吗?
    请参阅 Appstoreconnect 的下图,我需要设置是还是否?(是的,我们使用广告数据进行跟踪?)我们不跟踪用户,不确定 Google AdMob。
    enter image description here
    用于跟踪您的数据(标识符),链接到您的数据(标识符)。 Google AdMob 的设置是否正确?
    enter image description here
    最近的 AppStore 拒绝消息:
    指南 5.1.2 - 法律 - 隐私 - 数据使用和共享
    我们注意到您没有使用 App Tracking Transparency 来请求用户的许可,然后再跟踪他们在应用程序和网站上的事件。您在 App Store Connect 中提供的应用隐私信息表明您收集数据是为了跟踪用户,包括设备 ID 和广告数据。
    从 iOS 14.5 开始,App Store 上的应用需要通过 AppTrackingTransparency 框架获得用户的许可,然后才能收集用于跟踪它们的数据。此要求保护 App Store 用户的隐私。
    更新:苹果认可的游戏。这是带有最新 admob 广告(GADInterstitialAd、GADAppOpenAd、GADRewardedInterstitialAd、GADRewardedAd)的游戏: https://apps.apple.com/us/app/ocean-fishing-master-3d-games/id1550945081

    最佳答案

    更新:苹果认可的游戏。这是带有最新 admob 广告的游戏(GADInterstitialAd、GADRewardedInterstitialAd、GADRewardedAd、GADAppOpenAd):
    https://apps.apple.com/us/app/ocean-fishing-master-3d-games/id1550945081
    在 Info.plist 中添加了 Google Admob SKAdNetworkIdentifier 值

    <key>SKAdNetworkItems</key>
    <array>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>cstr6suwn9.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>4fzdc2evr5.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>2fnua5tdw4.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>ydx93a7ass.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>5a6flpkh64.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>p78axxw29g.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>v72qych5uu.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>c6k4g5qg8m.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>s39g8k73mm.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>3qy4746246.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>3sh42y64q3.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>f38h382jlk.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>hs6bdukanm.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>prcb7njmu6.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>wzmmz9fp6w.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>yclnxrl5pm.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>4468km3ulz.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>t38b2kh725.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>7ug5zh24hu.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>9rd848q2bz.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>n6fk4nfna4.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>kbd757ywx3.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>9t245vhmpl.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>2u9pt9hc89.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>8s468mfl3y.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>av6w8kgt66.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>klf5c3l5u5.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>ppxm28t8ap.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>424m5254lk.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>uw77j35x4d.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>e5fvkxwrpn.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>zq492l623r.skadnetwork</string>
    </dict>
    <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>3qcr597p9d.skadnetwork</string>
    </dict>
    </array>
    在 didFinishLaunchingWithOptions 中添加了 requestIDFA。它会打开 App Tracking Transparency 对话框。
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    [[GADMobileAds sharedInstance] startWithCompletionHandler:nil];
    [self requestIDFA];
    .
    .
    .
    }
    请求IDFA函数:
    - (void)requestIDFA
    {
    if (@available(iOS 14.0, *))
    {
    [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {

    // Admob Ads
    [self requestAppOpenAd];
    [self loadAdmob_Ads];
    [self loadRewardedInterstitial];
    }];
    }
    else
    {
    // Admob Ads
    [self requestAppOpenAd];
    [self loadAdmob_Ads];
    [self loadRewardedInterstitial];
    }
    }
    将 AppTrackingTransparency.framework 添加到 Xcode。
    在 info.plist 中添加了 NSUserTrackingUsageDescription
    <key>NSUserTrackingUsageDescription</key>
    <string>This identifier will be used to deliver personalized ads to you.</string>
    Admob 广告相关功能:
    - (void)requestAppOpenAd {
    self.appOpenAd = nil;
    [GADAppOpenAd loadWithAdUnitID:ADMOB_APP_OPEN_ID
    request:[GADRequest request]
    orientation:UIInterfaceOrientationPortrait
    completionHandler:^(GADAppOpenAd *_Nullable appOpenAd, NSError *_Nullable error) {
    if (error) {
    NSLog(@"Failed to load app open ad: %@", error);
    return;
    }
    self.appOpenAd = appOpenAd;
    self.appOpenAd.fullScreenContentDelegate = self;

    }];
    }

    - (void)tryToPresentAd
    {
    if (self.appOpenAd) {
    UIViewController *rootController = self.window.rootViewController;
    [self.appOpenAd presentFromRootViewController:rootController];
    } else {
    // If you don't have an ad ready, request one.
    [self requestAppOpenAd];
    }
    }

    - (void)applicationDidBecomeActive:(UIApplication *)application {
    [self tryToPresentAd];
    }

    -(void)loadAdmob_Ads
    {
    GADRequest *request = [GADRequest request];

    [GADInterstitialAd loadWithAdUnitID:ADMOB_FULL_SCREEM
    request:request
    completionHandler:^(GADInterstitialAd *ad, NSError *error)
    {
    if (error)
    {
    NSLog(@"\nAdmob Failed to load interstitial ad with error: %@", [error localizedDescription]);
    return;
    }
    self.interstitial = ad;
    self.interstitial.fullScreenContentDelegate = self;
    }];
    }

    -(void)showAdmobAdsFullScreen
    {
    if (self.interstitial) {
    [self.interstitial presentFromRootViewController:self.viewController];
    }
    }

    -(void)loadRewardedInterstitial
    {
    [GADRewardedInterstitialAd
    loadWithAdUnitID:ADMOB_REWARDED_INTERSTITIAL
    request:[GADRequest request]
    completionHandler:^(
    GADRewardedInterstitialAd *_Nullable rewardedInterstitialAd,
    NSError *_Nullable error) {
    if (!error) {
    self.rewardedInterstitialAd = rewardedInterstitialAd;
    self.rewardedInterstitialAd.fullScreenContentDelegate = self;
    }
    }];
    }

    -(void)playRewardedInterstitial
    {
    [self.rewardedInterstitialAd presentFromRootViewController:self.viewController
    userDidEarnRewardHandler:^{

    [self rewardInterstitialDoneRewardUser];

    [self loadRewardedInterstitial];
    }];
    }
    谷歌官方文档:
    SKAdNetworkItems iOS 14 更新: https://developers.google.com/admob/ios/ios14
    GADInterstitialAd : https://developers.google.com/admob/ios/interstitial
    GADRewardedInterstitialAd : https://developers.google.com/admob/ios/rewarded-interstitial
    GADRewardedAd : https://developers.google.com/admob/ios/rewarded-ads
    GADAppOpenAd : https://developers.google.com/admob/ios/app-open-ads
    自适应横幅 (GADBannerView): https://developers.google.com/admob/ios/banner/adaptive
    NSAppTransportSecurity: https://developers.google.com/admob/ios/app-transport-security

    关于ios - 适用于 iOS : SKAdNetworkItems, NSUserTrackingUsageDescription、ATTrackingManager 的 Google AdMob 新 SDK 设置。准则 5.1.2 - 法律 - 隐私 - 数据使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66177136/

    36 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com