启用 AdSupport 框架
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
您需要启用 AdSupport 框架,才能使用某些 Analytics 功能(比如受众群体和广告系列归因)和某些用户属性(比如年龄和兴趣)。如果没有此框架,Analytics 就无法收集这些功能正常运行所需的信息。
要启用 AdSupport 框架,请按以下步骤操作:
- 在您的 Xcode 项目中,选择您的项目的目标。
- 选择您的目标对应的 General 标签。
- 展开 Linked Frameworks and Libraries 部分。
- 点击 + 以添加框架。
- 选择 AdSupport.framework。
- 在
Other Linker Flags
下将 -ObjC
链接器标记添加到项目的构建设置中。
在提交您的应用以供审核之前,请确保您的应用符合 IDFA 使用指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-24。
[null,null,["最后更新时间 (UTC):2025-07-24。"],[],[],null,["Some Analytics features, such as audiences and campaign attribution, and\nsome user properties, such as Age and Interests, require the\n[AdSupport framework](https://developer.apple.com/reference/adsupport) to be\nenabled. Without this framework, Analytics cannot collect information\nneeded for these features to function properly.\n\nTo enable the AdSupport framework:\n\n1. In your Xcode project, select your project's target.\n2. Select the **General** tab for your target.\n3. Expand the **Linked Frameworks and Libraries** section.\n4. Click **+** to add a framework.\n5. Select **AdSupport.framework**.\n6. Add the `-ObjC` linker flag to your project's build settings under `Other Linker Flags`.\n\nBefore submitting your app for review, ensure your app complies with\n[IDFA usage guidelines](https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/SubmittingTheApp.html#//apple_ref/doc/uid/TP40011225-CH33-SW8)."]]