Apple 拒绝应用程序,因为 AppTrackingTransparency.framework(无法在应用程序中找到它)

Apple rejects app because of AppTrackingTransparency.framework (can't find it included in the app)

今天早上刚从 Apple 收到这条消息:

We noticed that your Kids Category app includes analytics, advertising and collects, transmits, or has the ability to share personal information or device information with third parties. Specifically:

- Your app implements the App Tracking Transparency framework, which is used when apps collect data about users and share it with third-parties for tracking purposes. Since Kids Category apps are not allowed to collect, transmit or share identifiable information with third-parties, you should not implement App Tracking Transparency in your app.

但是,在对所有 node_modules 和 pods 进行严格搜索后,我找不到任何对 AppTrackingTransparency 框架的引用。我如何找出它包含在哪里并将其删除?

很可能是 Firebase Analytics 或 Onesignal 包含该框架。我只是在任何地方都看不到对它的任何引用。

package.json

{
  "name": "Einee",
  "version": "1.8.45",
  "private": true,
  "husky": {
    "hooks": {
      "post-merge": "if git-branch-is beta -q || git-branch-is master -q; then yarn version --patch; fi"
    }
  },
  "scripts": {
    "start": "react-native start",
    "ios": "react-native run-ios --device",
    "run:ios:8": "react-native run-ios --simulator=\"iPhone 8\"",
    "run:ios:iPad": "react-native run-ios --simulator=\"iPad Pro (12.9-inch) (3rd generation)\"",
    "lint:fix": "eslint --fix --ext .js,.jsx,.ts,.tsx ./",
    "postversion": "react-native-version --reset-build",
    "patch-version": "yarn version --patch"
  },
  "jest": {
    "preset": "react-native"
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "^1.13.2",
    "@react-native-community/async-storage": "^1.7.1",
    "@react-native-community/blur": "^3.4.1",
    "@react-native-community/masked-view": "^0.1.6",
    "@react-native-community/picker": "^1.8.1",
    "@react-native-firebase/analytics": "10.5.1",
    "@react-native-firebase/app": "10.5.0",
    "@react-native-firebase/crashlytics": "10.5.1",
    "@terrysahaidak/react-native-devmenu": "^3.0.0",
    "add": "^2.0.6",
    "amplitude-js": "^7.3.0",
    "lodash": "^4.17.4",
    "moment": "^2.22.2",
    "react": "16.13.1",
    "react-native": "0.63.4",
    "react-native-config": "^1.3.3",
    "react-native-dev-menu": "^4.0.0",
    "react-native-device-info": "^8.0.1",
    "react-native-emoji": "^1.8.0",
    "react-native-fast-image": "^8.3.2",
    "react-native-fs": "^2.16.6",
    "react-native-gesture-handler": "^1.5.6",
    "react-native-haptic-feedback": "^1.9.0",
    "react-native-iap": "5.2.3",
    "react-native-loading-spinner-overlay": "^2.0.0",
    "react-native-mail": "^6.0.0",
    "react-native-media-queries": "^0.3.0",
    "react-native-onesignal": "^4.0.3",
    "react-native-picker-select": "^8.0.2",
    "react-native-rate": "^1.1.10",
    "react-native-reanimated": "^1.7.0",
    "react-native-restart": "^0.0.20",
    "react-native-safe-area-context": "^3.1.8",
    "react-native-screens": "^2.0.0-alpha.33",
    "react-native-share": "^5.1.0",
    "react-native-sound": "^0.11.0",
    "react-native-swiper": "^1.6.0",
    "react-native-tts": "^3.2.0",
    "react-native-vector-icons": "^8.0.0",
    "react-navigation": "^4.1.0",
    "react-navigation-stack": "^2.1.0",
    "react-redux": "^7.1.3",
    "redux": "^4.0.5",
    "redux-action-listeners": "^1.0.2",
    "redux-thunk": "^2.2.0",
    "rn-fetch-blob": "^0.12.0",
    "styled-components": "^5.1.1"
  },
  "devDependencies": {
    "@babel/core": "^7.8.4",
    "@babel/runtime": "^7.8.4",
    "@react-native-community/eslint-config": "^2.0.0",
    "@types/lodash": "^4.14.165",
    "@types/react": "^17.0.0",
    "@types/react-native": "^0.63.37",
    "@types/react-navigation": "^3.4.0",
    "@types/react-redux": "^7.1.11",
    "@typescript-eslint/eslint-plugin": "^4.14.1",
    "@typescript-eslint/parser": "^4.14.1",
    "babel-jest": "^26.6.3",
    "babel-plugin-module-resolver": "^4.0.0",
    "enzyme": "^3.10.0",
    "enzyme-adapter-react-16": "^1.14.0",
    "enzyme-to-json": "^3.3.5",
    "eslint": "^7.18.0",
    "eslint-config-airbnb-typescript": "^12.0.0",
    "eslint-config-prettier": "^7.2.0",
    "eslint-import-resolver-typescript": "^2.3.0",
    "eslint-plugin-import": "^2.22.1",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-prettier": "^3.3.1",
    "eslint-plugin-react": "^7.22.0",
    "git-branch-is": "^4.0.0",
    "husky": "4.3.8",
    "jest": "^26.6.3",
    "jest-environment-enzyme": "^7.0.2",
    "jest-enzyme": "^7.0.2",
    "metro-react-native-babel-preset": "^0.64.0",
    "pre-push": "^0.1.1",
    "prettier": "^2.2.1",
    "react-dom": "^17.0.1",
    "react-native-debugger-open": "^0.3.25",
    "react-native-version": "^4.0.0",
    "react-test-renderer": "17.0.1",
    "redux-mock-store": "^1.5.3",
    "typescript": "4.0.5"
  }
}

播客文件

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'

target 'Einee' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  target 'EineeTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
  end
end

target 'OneSignalNotificationServiceExtension' do
  pod 'OneSignal', '>= 3.0', '< 4.0'
end

target 'Einee-tvOS' do
  # Pods for Einee-tvOS

  target 'Einee-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end
end

您应该仔细检查您的 Info.plist,您可能包含了类似这样的内容 隐私 - 跟踪使用说明

这是对 App Tracking Transparency 工作原理的参考。 https://developer.apple.com/documentation/apptrackingtransparency

看看上面 link 中的第 2 步和第 3 步,我认为您会在代码中的某个地方找到 requestTrackingAuthorization 函数或 trackingAuthorizationStatus 来自 ATTrackingManager 的用法这是触发拒绝。

虽然你没有,我还是想补充一下,供你参考 还请检查您的 Info.plist 中的 NSUserTrackingUsageDescription,它转换为 隐私 - 跟踪使用说明 并将其删除。

显然问题出在 Firebase Analytics SDK 上,它尚未优化,无法获得 Apple 批准用于儿童应用。所以我只是删除了它,没有任何问题。