← 所有文章

iOS 27.2中的EU跟踪提示:该发布什么

从iOS 27.2和iPadOS 27.2起,欧盟(EU)境内的应用可以展示替代版的App Tracking Transparency提示;而在法国、德国、意大利、波兰、罗马尼亚发行的应用,无论调用新方法还是旧方法,拿到的都只有这一版。 27.2 beta SDK新增的是一个方法和一个Info.plist键。方法是requestTrackingAuthorization(usingExpandedInterface:additionalInformationAction:completionHandler:),在iOS 27.2上可用,在macOS、tvOS、watchOS、visionOS上不可用;键是可选的NSUserTrackingMarkdownUsageDescription。在EU之外,新方法的行为和旧方法一样,何时必须征求许可的规则也没有变,而EU用户在上一次作答满一年后可以被再问一次。发布步骤见下文。在27.2 beta模拟器上,把地区设为美国、德国、荷兰或法国之后,凡是我能在重新启动后复现的调用,出现的都是标准警告框,这正是Apple为不在EU境内的设备写明的回退行为;就这些证据而言,全屏弹出页只能上真机验证。12345 {.answer-block}

TL;DR

  • Apple的公告,9月16日。“Beginning with iOS 27.2 and iPadOS 27.2, developers will have the option to use an alternative version of the App Tracking Transparency system prompt in the EU. The requirements for when you must seek permission to track users will remain the same. Due to legal requirements, only the alternative version of the system prompt is available for apps distributed in Germany, France, Italy, Poland, and Romania.”(从iOS 27.2和iPadOS 27.2起,开发者可以在EU选用ATT系统提示的替代版;何时必须征求跟踪许可的要求保持不变;出于法律要求,在德国、法国、意大利、波兰、罗马尼亚发行的应用只能使用替代版。)1
  • 只多了一个方法。 27.2 beta SDK的ATTrackingManager.h声明了requestTrackingAuthorizationUsingExpandedInterface:additionalInformationAction:completionHandler:,并标注API_AVAILABLE(ios(27.2)) API_UNAVAILABLE(macos, tvos, watchos, visionos)。头文件注释写道:“This method behaves identically to requestTrackingAuthorizationWithCompletionHandler: in non-EU countries.”(在非EU国家,该方法的行为与旧方法完全一致。)3
  • 在那五个国家,旧方法同样会出全屏弹出页。 Apple关于requestTrackingAuthorization(completionHandler:)的参考页写道:“In France, Germany, Italy, Poland, and Romania, the system presents a full-page sheet; otherwise, the system prompts the person with an alert.”而这个弹出页会“displays the NSUserTrackingMarkdownUsageDescription string with support for rich-text elements if you include it in your app’s target configuration in Xcode.”新方法额外带来的,是EU其余国家的全屏弹出页、“Additional Information”按钮,以及那个用来申请它的开关。4
  • 多了一个键,旧键依然必填。 NSUserTrackingMarkdownUsageDescription是可选的Markdown,支持“bold or italic style,”、无序列表和分段,但“but it doesn’t support underline”。头文件还说,即便走新方法,原有的NSUserTrackingUsageDescription也“must be in”Info.plist里。34
  • “Additional Information”按钮既不是同意也不是拒绝。 Apple的头文件写道:“If the user taps the ‘Additional Information’ button, the prompt dismisses without recording an authorization decision, your additionalInformationAction runs so you can surface your own privacy information, and the completion handler receives notDetermined.”(用户点这个按钮时,提示会在不记录授权结果的情况下关闭,你的additionalInformationAction随即执行,好让你展示自己的隐私说明,而completion handler收到的是notDetermined。)之后再问一次,是你代码的事。3
  • 重新询问只限EU。“you can reprompt a user via the App Tracking Transparency system prompt one year after the user’s previous choice in your app’s App Tracking Transparency system prompt, regardless of whether that choice was to accept or reject,”(用户上一次在你应用的ATT系统提示里作出选择满一年后,无论当时是同意还是拒绝,都可以再问一次。)除非用户关掉了“Allow Apps to Request to Track”,这项设置在EU被改名为“Allow Apps to Request to Link Your Activity Across Companies”。2
  • 模拟器上看到的是什么。 在运行iOS 27.2 beta运行时的iPhone 18 Pro模拟器上,把地区设为美国、德国、荷兰或法国,用preferExpandedInterface: true调用新方法,出现的是带原有usage description文案的标准警告框,没有“Additional Information”按钮;传false、传nil动作、以及调用旧方法,结果都一样,completion一直等着用户点击,状态停在notDetermined。反过来,有一条路径会立刻返回notDetermined,它可以随时复现,下文有记录:上一次启动遗留下来、仍在等待的提示。9月20日还有两次法国地区的启动也是立刻返回,但这两次我没能记录下原因,而同样的配置在之后重新启动的运行里又正常弹出了提示。5

用Apple自己的话说,变了什么

Apple把这项改动用文字发布了三次,最早是9月16日的公告,里面也给出了原因:“As part of agreements with select European competition authorities, Apple is introducing changes to its App Tracking Transparency framework in the European Union.”(作为与部分欧洲竞争监管机构达成协议的一部分,Apple将在欧盟调整其App Tracking Transparency框架。)公告余下的部分给出了规则和那五个国家。1 App Store政策页补上了提示的形态:“The alternative version of the App Tracking Transparency system prompt has modified formatting and language and provides you the option to use a text button labeled ‘Additional Information.’ This allows you to surface additional information about your request to link user or device data collected from your app with user or device data collected from other companies’ apps, websites, or offline properties for targeted advertising or advertising measurement purposes, or to share user or device data with a data broker.”(替代版调整了排版和措辞,并给你一个使用文字按钮“Additional Information”的选项。借助它,你可以就以下请求补充说明:为定向广告或广告效果衡量,把你的应用收集的用户或设备数据,与其他公司的应用、网站或线下资产收集的数据相关联;或者把用户或设备数据提供给数据经纪商。)2 而iOS与iPadOS 27.2 beta发行说明在App Tracking Transparency的New Features一节里用一行写完:AppTrackingTransparency“now supports an alternative expanded prompt and re-prompting on a yearly basis for EU users. The alternative prompt is required for users in France, Germany, Italy, Poland, and Romania.”(现已支持面向EU用户的替代扩展提示和每年一次的重新询问;对法国、德国、意大利、波兰、罗马尼亚的用户,替代提示是必需的。)6

政策页也写明了什么没有动:跟踪之前必须征求许可的义务,以及按钮背后一切内容由你负责。“Any additional information related to your request or more granular consent controls provided via the text button are entirely your responsibility. However, you cannot access the device’s advertising identifier, or otherwise collect and use device or user data from your app as described in the App Tracking Transparency system prompt, until the user has granted your app permission in that prompt.”(通过文字按钮提供的补充说明或更细粒度的同意选项,完全由你负责。但在用户于该提示中授予许可之前,你不能访问设备的广告标识符,也不能按ATT系统提示所述的方式,从你的应用收集和使用设备或用户数据。)2

27.2 SDK中的API

Xcode 27.2 beta(27B5019j)内置的iOS 27.2 SDK版本号是24B5084k,其AppTrackingTransparency.framework头文件在你已经在调用的那个方法旁边,多了一个类方法:3

+ (void)requestTrackingAuthorizationUsingExpandedInterface:(BOOL)preferExpandedInterface
                               additionalInformationAction:(nullable void(^)(void))additionalInformationAction
                                         completionHandler:(void(^)(ATTrackingManagerAuthorizationStatus status))completion API_AVAILABLE(ios(27.2)) API_UNAVAILABLE(macos, tvos, watchos, visionos);

在Swift里它是ATTrackingManager.requestTrackingAuthorization(usingExpandedInterface:additionalInformationAction:completionHandler:),Apple的参考页把它标为iOS 27.2、iPadOS 27.2和Mac Catalyst 27.2,且全部带beta标记。头文件注释是Apple目前公开的、对这两个参数最完整的说明,其中有四句话决定了你该怎么写这次调用。34

  • “Pass YES to preferExpandedInterface to request the alternative prompt where permitted; pass NO to request the original prompt.”(在允许的地方想要替代提示就传YES,想要原来的提示就传NO。)关于这个参数还有一句:“Note that in France, Germany, Italy, Poland, and Romania, due to legal requirements, only the expanded interface version of the ATT prompt will be available regardless of what is passed in to preferExpandedInterface.”(在那五个国家,出于法律要求,无论preferExpandedInterface传什么,都只有扩展界面版可用。)
  • “If you pass nil to additionalInformationAction, this button will not be shown.”(给additionalInformationActionnil,这个按钮就不会出现。)
  • “If the user taps the ‘Additional Information’ button, the prompt dismisses without recording an authorization decision, your additionalInformationAction runs so you can surface your own privacy information, and the completion handler receives notDetermined.”(用户点该按钮时,提示不记录授权结果就关闭,你的动作随即执行,completion handler收到notDetermined。)
  • “iOS users may be re-prompted in eligible regions on a periodic basis even after a previous authorization decision. If the user is not eligible to be re-prompted and a previous authorization decision exists, the completion handler is called with that prior decision without showing the prompt.”(在符合条件的地区,即便此前已有授权结果,iOS用户也可能被定期再问一次;若用户不符合重新询问的条件且已有结果,系统不会展示提示,而是把先前的结果交给completion handler。)

参考页把头文件只暗示了的那张地区对照表真正画了出来。在法国、德国、意大利、波兰、罗马尼亚:“The system displays markdown text you supply via NSUserTrackingMarkdownUsageDescription in a full-page sheet regardless of what you set for preferExpandedInterface, and includes an Additional Information button if you supply an action.”(无论preferExpandedInterface设成什么,都在全屏弹出页里显示你提供的Markdown;若你传了动作,还会带上Additional Information按钮。)在EU其余国家:“The system displays markdown text in the NSUserTrackingMarkdownUsageDescription, if you supply it. The system displays the full-page sheet if you set preferExpandedInterface to true, and includes an Additional Information button if you supply an action.”(提供了Markdown就显示;preferExpandedInterface设为true才出全屏弹出页;传了动作才带按钮。)其他地方:“Outside of the European Union, the system doesn’t use either parameter, and presents a system alert displaying the original NSUserTrackingUsageDescription, which is equivalent to calling requestTrackingAuthorization(completionHandler:).”(在EU之外,两个参数都不使用,只弹出显示原有文案的系统警告框,等同于调用旧方法。)该页还补上了地区判定的条件:设备必须“located in a specific European Union country and signed in with an Apple Account with a specific EU country or region”(位于特定欧盟国家,并以特定EU国家或地区的Apple Account登录)。4

旧方法requestTrackingAuthorization(completionHandler:)的页面,如今也写明那五个国家从它这里同样会拿到全屏弹出页:“In France, Germany, Italy, Poland, and Romania, the system presents a full-page sheet; otherwise, the system prompts the person with an alert.”而在目标属性一节里是:“In France, Germany, Italy, Poland, and Romania, the full-page sheet displays the NSUserTrackingMarkdownUsageDescription string with support for rich-text elements if you include it in your app’s target configuration in Xcode.”(只要你在Xcode的target配置里放了Markdown键,那五个国家的全屏弹出页就会按富文本显示它。)这个页面没有给出弹出页对应的系统版本,还把方法标为iOS 14且没有beta标记,所以它的27.2下限来自发行说明而不是这个页面。两相对照,新方法为你买到的是EU其余国家的全屏弹出页、那个按钮,以及对开关的话语权;在那五个国家,弹出页两条路都会出现。46

iOS 27.2的扩展跟踪请求会按用户所在地展示什么:在法国、德国、意大利、波兰、罗马尼亚始终是全屏弹出页,显示Markdown文案,若传了动作还会有Additional Information按钮;在EU其余国家,只有preferExpandedInterface为true时才出弹出页和Markdown文案;在EU之外是显示原有文案的标准警告框,两个参数都被忽略

两个Info.plist键

NSUserTrackingUsageDescription不会消失。新方法头文件里那条“Important”注记,把旧要求一字不差地重复了一遍:这个键“must be in”信息属性列表;新键的参考页也说,“if your app’s target properties omit this key”(如果你的应用目标属性里没有这个键),系统就回退到它。34

新增的是NSUserTrackingMarkdownUsageDescription,标注为iOS 27.2和iPadOS 27.2 beta。Apple的页面写道:“The format of the string is Markdown text; you can apply bold or italic style, but it doesn’t support underline. You can include bullet lists and paragraph breaks.”(字符串格式是Markdown文本;可以加粗或倾斜,但不支持下划线;可以包含无序列表和分段。)它和提示一样分地区:在那五个国家,只要写了就会用上,旧方法和新方法都一样;在EU其余国家,传了preferExpandedInterface: true才会用;在EU之外被忽略。Apple这两个页面对中间这种情况的措辞并不一致:方法页说“if you supply it”(只要你提供了)系统就显示Markdown,键的页面则补上了必须传true的条件。键的页面是更严格的那种读法,上面那张图也按它来画。页面上Apple给的建议,和原有跟踪键页面上的那条一样:“Keep the text of your description short and specific. The system displays your app name in the prompt so you don’t need to include it in the string.”(说明文字要短、要具体;系统会在提示里显示你的应用名称,所以不必写进字符串。)4

每年一次的重新询问

政策页给出了EU的规则:“you can reprompt a user via the App Tracking Transparency system prompt one year after the user’s previous choice in your app’s App Tracking Transparency system prompt, regardless of whether that choice was to accept or reject. A user cannot be re-prompted if they have disabled ‘Allow Apps to Request to Track’ (renamed to ‘Allow Apps to Request to Link Your Activity Across Companies’ in the EU) in their device’s Settings.”(距离用户上次选择满一年后,无论当时是同意还是拒绝,都可以再问一次;但如果用户在设备设置里关掉了这项开关,就不能再问。)2 头文件从应用这一侧描述了机制,而且说了两遍。关于旧方法:“In eligible regions, iOS users may be re-prompted after a year has passed since their last decision; otherwise the system remembers the user’s choice and doesn’t prompt again unless the user uninstalls and then reinstalls the app on the device.”(在符合条件的地区,距上次决定满一年后可能会再问;否则系统会记住用户的选择,除非用户把应用卸载再装回来,才会再次弹出。)关于新方法:不符合重新询问条件、且已有先前决定的用户,会“without showing the prompt”(不展示提示)直接从completion handler拿回那个决定,所以第二次调用是安全的,决定要不要弹提示的是系统,不是你的代码。3 两份文档都没有给出的,是在调用之前先查询某个用户是否符合条件的办法:调用本身就是那次查询。

27.2 beta模拟器的实际表现

我针对iPhoneSimulator 27.2 SDK写了一个单文件的SwiftUI探针,Info.plist里两个键都写上:NSUserTrackingUsageDescription设为“Probe: the standard usage description.”,NSUserTrackingMarkdownUsageDescription设为一个加粗词、一个倾斜短语和一个两项的无序列表。它跑在运行iOS 27.2 beta运行时(24B5084k)的iPhone 18 Pro模拟器上,每次运行前都重启模拟器,并通过全局AppleLocale偏好设置切换地区。9月19日一共六次运行:美国、德国、荷兰用preferExpandedInterface: true并带动作;德国用false;法国用true但不带动作;德国用旧方法。5

9月19日每一次运行的结果都一样:标准警告框,标题是“Allow ‘ATTProbe’ to track your activity across other companies’ apps and websites?”,正文是原有的usage description文案,按钮只有“Ask App Not to Track”和“Allow”,没有第三个。Markdown文案一次都没出现,16秒的采集窗口内没有任何completion handler触发;在五次扩展调用里,每隔三秒一次、持续十二秒的检查中,trackingAuthorizationStatus读到的都是notDetermined。用旧方法那次只打出了mode=legacy这一行,之后再无输出,同样一直等着。5 这正是Apple参考页为不在EU境内的设备所预告的结果,而模拟器的地区设置是区域设置,不是位置。全屏弹出页、Markdown文案和那个按钮,都得用一台登录了EU地区Apple Account的真机来验。

9月20日重启Mac之后重跑这六次,美国、德国、荷兰和之前一样弹出了提示,但法国那次在发出请求的同一秒就把notDetermined交还给了completion handler,没有弹出任何警告框。那天上午又启动了两次法国,结果相同,第三次则弹出了提示。这三次立刻返回里,只有7:23那次与文件记录下来的其他动静在时间上重合:当时另一个脚本正在它下面重装探针;7:21和7:26那两次没有我能记录下来的原因。在没有任何别的东西碰模拟器的情况下,又做了三次重新启动后的运行:法国带动作、法国不带动作、以及美国,全部弹出提示并进入等待。也就是说,同样的法国配置在之后重新启动的运行里都会弹出提示,我没有什么法国规则可以汇报,只有一条提醒:在beta模拟器上遇到不弹警告框、立刻返回notDetermined的结果,先重新启动再复现一次,然后才谈相信。5

在运行iOS 27.2 beta、地区设为德国的iPhone 18 Pro模拟器上出现的标准App Tracking Transparency警告框:探针日志显示 region=DE 和状态 0,警告框显示原有的usage description文案以及 Ask App Not to Track 和 Allow 两个按钮

9月19日,地区设为德国的iOS 27.2 beta模拟器,在扩展界面调用之后:标准警告框,原有文案,两个按钮。这张图是那次带走当天其余文件的重启之前,唯一导出成功的一张。

真正可以随时复现的那条歧路,是一个仍在等待的提示。启动探针,不去回答警告框,卸载并重新安装应用,再启动一次:第二次启动的扩展调用在警告框还留在屏幕上时,就在发出请求的同一秒把notDetermined交还给了completion handler;第三次改用旧方法启动也一样,一秒之内打出legacy-request status=0 (notDetermined)。这正是头文件描述的情形:“The authorization prompt doesn’t display if another permission request is pending user confirmation. Concurrent requests aren’t preserved by iOS,”(若另一个权限请求正等待用户确认,授权提示就不会展示;并发请求不会被iOS保留。)紧接着的说明是,去检查trackingAuthorizationStatus是否为notDetermined,“to determine if you need to make an additional call”(以判断你是否需要再调用一次);旧方法的页面也把它列进了系统会不弹提示就执行completion handler的情形之中:“An existing permission request is pending.”(已有一个权限请求正在等待。)345 重新启动就会清掉。如果你的应用会从多个地方发起询问,或者按计划再问一次,那么第二个调用方拿到的就是这种立刻返回的notDetermined

该发布什么,分步说明

  1. 保留NSUserTrackingUsageDescription 它依然是必填项,也是所有EU之外的用户、以及所有没有Markdown键的EU用户会看到的文案。34
  2. 加上NSUserTrackingMarkdownUsageDescription,用简短的Markdown写同一个请求:加粗或倾斜、列表、分段,不用下划线,也不用写应用名。4
  3. 用可用性判断把新方法圈起来,并把旧方法留作回退:iOS 27.2及以上调用requestTrackingAuthorization(usingExpandedInterface:additionalInformationAction:completionHandler:),更早的版本调用requestTrackingAuthorization(completionHandler:)。想在EU其余国家拿到全屏弹出页就传true,那五个国家会忽略这个开关。在iOS 26为最低版本的前提下,针对27.2 SDK能通过类型检查的写法是这样:345
#if os(iOS)
if #available(iOS 27.2, *) {
    ATTrackingManager.requestTrackingAuthorization(usingExpandedInterface: true,
                                                   additionalInformationAction: showPrivacyDetails) { status in
        handle(status)
    }
} else {
    ATTrackingManager.requestTrackingAuthorization { status in handle(status) }
}
#endif
  1. 决定要不要那个按钮。 只有当你确实有一页内容或一个界面可以展示时,才传动作。动作执行时,把状态当作notDetermined处理,展示你的说明;然后,用政策页的话说,“you can redirect the user back to the App Tracking Transparency system prompt for your app to ensure their choice is recorded”(你可以把用户带回应用的ATT系统提示,以确保他们的选择被记录下来),但“you should not redirect users to your ATT prompt if they have opted out of all relevant legal consent choices in the screen or page surfaced”(如果用户在你展示的界面或页面上拒绝了所有相关的法定同意选项,就不该再把他们带回ATT提示)。23
  2. 把重新询问当成一次调用来规划,而不是一个计时器。 在EU,想知道一年是否已过,办法就是再调用一次;对不符合条件的用户,completion handler会返回先前的决定。23
  3. 用一台登录了EU地区账号的真机来测。 模拟器凡是弹出提示的时候,不管哪个地区、也不管是不是刚重新启动,出现的都是标准警告框,从来没有出现过全屏弹出页;而Apple给出的条件是设备位置加上Apple Account地区,所以全屏弹出页只能上真机验。45
  4. 检查Mac目标。 头文件把这个方法标为在macOS、tvOS、watchOS、visionOS上不可用,所以共用的调用处需要在外层写#if os(iOS),并在里面再写if #available(iOS 27.2, *);只写可用性判断仍然编译不过,会报'requestTrackingAuthorization(usingExpandedInterface:additionalInformationAction:completionHandler:)' is unavailable in macOS,这一点脚注5有记录。参考页里的Mac Catalyst 27.2条目和头文件里的API_UNAVAILABLE(macos),是从两侧描述同一条界线:对#if os(iOS)来说,Catalyst算iOS。345

常见问题

我必须采用替代提示吗?

在法国、德国、意大利、波兰、罗马尼亚,按Apple公告的说法,在当地发行的应用能用的只有替代提示这一版;而在27.2上,两种调用都会给你这一版:新方法在那里会“regardless of what you set for preferExpandedInterface”(无论你把preferExpandedInterface设成什么)展示全屏弹出页,Apple关于旧方法的页面也说“In France, Germany, Italy, Poland, and Romania, the system presents a full-page sheet; otherwise, the system prompts the person with an alert.”,并且只要“if you include it in your app’s target configuration in Xcode.”(你在Xcode的target配置里放了它)就会显示Markdown键。改用新方法换来的,是EU其余国家的全屏弹出页、“Additional Information”按钮,以及对那个开关的话语权。1346

它会改变我必须征求许可的时机吗?

不会。Apple的原话是:“The requirements for when you must seek permission to track users will remain the same.”1

Markdown键会取代NSUserTrackingUsageDescription吗?

不会。原有的键对两种调用都仍是必填项;只要Markdown键缺失,或者设备在EU之外,系统用的就是它。34

用户拒绝之后,我还能再问一次吗?

在EU可以,时间是距上次选择满一年之后,“regardless of whether that choice was to accept or reject,”(无论当时是同意还是拒绝),除非用户关掉了那项在EU被Apple改名为“Allow Apps to Request to Link Your Activity Across Companies”的设置。2

macOS或visionOS上有这个新API吗?

没有。27.2 SDK的头文件把它标为API_UNAVAILABLE(macos, tvos, watchos, visionos);参考页列出的是iOS、iPadOS和Mac Catalyst 27.2。34

来源


  1. Apple,“Updates to App Tracking Transparency in the European Union”,开发者新闻,2026年9月16日,引用。 

  2. Apple,User privacy and data use,“ATT in the European Union”一节,以及“Can I provide additional information and consent controls with my app’s ATT prompt implementation”这一问,2026年9月19日获取,引用。 

  3. Xcode 27.2 beta(27B5019j)内iPhoneOS 27.2 SDK(ProductBuildVersion 24B5084k,ProductVersion 27.2)中的AppTrackingTransparency.framework/Headers/ATTrackingManager.h,2026年9月19日阅读:带API_AVAILABLE(ios(27.2)) API_UNAVAILABLE(macos, tvos, watchos, visionos)requestTrackingAuthorizationUsingExpandedInterface:additionalInformationAction:completionHandler:声明及其文档注释,引用;旧方法中关于重新询问和待处理请求的注释,引用。 

  4. Apple,requestTrackingAuthorization(usingExpandedInterface:additionalInformationAction:completionHandler:)NSUserTrackingMarkdownUsageDescription,2026年9月19日通过文档JSON获取:平台可用性为方法iOS 27.2、iPadOS 27.2、Mac Catalyst 27.2,键为iOS 27.2、iPadOS 27.2,全部标为beta;“Display a full-page sheet”和“Discussion”两节,引用。Apple,requestTrackingAuthorization(completionHandler:),2026年9月21日通过文档JSON获取:平台可用性为iOS 14.0、iPadOS 14.0、Mac Catalyst 14.0、macOS 11.0、tvOS 14.0和visionOS 1.0,没有beta标记;Discussion中关于那五个国家的那句、关于Markdown键的“Configure the app’s target properties”那句,以及“the system doesn’t display the prompt”(系统不展示提示)情形列表中关于待处理请求的那一条,引用。 

  5. 作者在macOS 26.6.2(25G83)上的运行,2026年9月19日与20日。ATTProbe:一个采用AppWindowGroup生命周期的单文件SwiftUI应用,在Xcode 27.2 beta(27B5019j)下用xcrun swiftc -sdk <iPhoneSimulator27.2.sdk> -target arm64-apple-ios26.0-simulator -parse-as-library构建,Info.plist中NSUserTrackingUsageDescription为“Probe: the standard usage description.”,NSUserTrackingMarkdownUsageDescription为“Probe: Markdown description with a bullet list:”外加两个列表项。同一探针更早的UIKit版本没有scene manifest,用同一个SDK构建后在启动时以EXC_BREAKPOINT中断、还没走到请求那一步;我直接换掉了它,没有深究。设备:用simctl createcom.apple.CoreSimulator.SimRuntime.iOS-27-2(24B5084k)上创建的iPhone 18 Pro模拟器,由Xcode 27.2 beta的simctl驱动;地区通过simctl spawn <udid> defaults write "Apple Global Domain" AppleLocale -string <locale>设置;每次运行前执行simctl shutdownsimctl boot;应用用simctl launch --console-pty启动并采集其print行;启动七秒后用simctl io <udid> screenshot截图,采集在此后九秒结束。各次运行:en_US扩展带动作;de_DE扩展带动作;de_DE用旧的requestTrackingAuthorization(completionHandler:)de_DEpreferExpandedInterface: falsenl_NL扩展带动作;fr_FR扩展、动作为nil。9月19日,每次运行日志都打出region=<code> status-before=0,16秒采集窗口内没有completion行;五次扩展运行还在第三、六、九、十二秒打出status-now=0,这项检查探针的旧方法分支并不做;每张截图都是标准警告框(这些文件,以及9月19日更早那一轮、首次显示出待处理提示行为的那些文件,都没能挺过一次清空了会话临时目录的Mac重启,所以9月19日的结果是依据当时读到的控制台输出记在这里的)。9月20日第一轮,同一个脚本、每次运行前重新启动:en_US 7:16:37,de_DE 7:17:42,de_DE旧方法 7:18:42,de_DEfalse 7:19:33,nl_NL 7:20:26,均无completion行,在探针轮询的每个检查点都是status-now=0,每张截图都是标准警告框;不带动作的fr_FR在7:21:04启动,于7:21:05打出expanded-request status=0 (notDetermined),与它的mode=行处在同一秒,其截图显示的是探针自己的日志,没有警告框。另一台模拟器,即iPhone Duo设备,在7:13启动并在这一轮期间一直开着;文件中没有任何记录表明这期间还有别的东西碰过这两台模拟器中的任何一台。第二轮为7:23至7:27,其前三次启动与待处理提示流程的第一次尝试重叠,那次尝试因模拟器报错失败了两回:不带动作的fr_FR 7:23:57,立刻notDetermined;带动作的fr_FR 7:24:09,由那个脚本启动,弹出提示且无completion行;不带动作的de_DE 7:24:52,弹出提示;带动作的fr_FR 7:26:03,立刻notDetermined;不带动作的en_US 7:27:43,弹出提示;7:23:09的一次fr_FR启动在模拟器关机过程中失败,而7:23:57那条日志在第六秒结束,因为另一个脚本重装了探针。这些只为完整而列出,不赋予任何分量。第三轮,一次只跑一个、没有别的东西碰模拟器、每次之前都重新启动:带动作的fr_FR 7:40:06,不带动作的fr_FR 7:40:45,以及7:41:22用区域设置字符串us_US(探针打出的是region=US),全部弹出提示、无completion行,每个检查点都是status-now=0。待处理提示这一情形,同一个脚本、一次启动之内:de_DE在7:42:00弹出提示且无completion行;在那个警告框未作回答的情况下执行simctl uninstallsimctl install之后,7:42:18的一次启动在7:42:19打出expanded-request status=0 (notDetermined),而它的截图里警告框还在屏幕上;7:42:40用旧方法的第三次启动在7:42:41打出legacy-request status=0 (notDetermined)。第3步的代码片段,把showPrivacyDetailshandle(_:)写成桩函数,在-target arm64-apple-ios26.0-simulator下针对iPhoneSimulator 27.2 SDK通过了swiftc -typecheck;同一个文件去掉#if os(iOS)各行后,针对Xcode 27.2 beta内的macOS SDK以-target arm64-apple-macos15.0编译,失败并报error: 'requestTrackingAuthorization(usingExpandedInterface:additionalInformationAction:completionHandler:)' is unavailable in macOS。 

  6. Apple,iOS & iPadOS 27.2 Beta Release Notes,2026年9月17日和9月19日通过文档JSON端点获取,App Tracking Transparency的New Features一节,引用。 

相关文章

Xcode 27.1 beta:把应用放进 iPhone Duo 模拟器

Xcode 27.1 beta 带来了第一个 iOS 27.1 SDK 和一台 iPhone Duo 模拟器:SDK 新增了什么,设备配置文件怎么写这两块屏,以及探针在每种姿态下报告了什么。

13 分钟阅读

Xcode 27正式发布:系统要求、部署目标,以及哪些东西坏了

Xcode 27(27A266a)于9月14日发布:要求macOS 26.6和Apple silicon,附带Swift 6.4,最低部署目标上调,ld64已移除,PreviewProvider已弃用。

19 分钟阅读

John Ternus:建造者型 CEO

John Ternus 将于 2026 年 9 月 1 日出任 Apple CEO。为什么 Tim Cook 的接班人,意味着 Apple 的硬件、AI 与设计将进入一个由建造者主导的时代。

27 分钟阅读