简体   繁体   English

Xcode 13 缺少iOS15下的定位服务设置

[英]Xcode 13 is missing settings for location services under iOS15

I updated to Xcode 13 last night.我昨晚更新到 Xcode 13。 Today I find that if I run the simulator for iOS 15 there is no location services settings under privacy, yet on my physical iPhone which is also updated to iOS 15 there is (phone is an Xr).今天我发现,如果我为 iOS 15 运行模拟器,则隐私下没有位置服务设置,但在我的物理 iPhone 上也更新到 iOS 15 有(手机是 Xr)。 If I run the Xcode simulator for iOS 14 then the settings for location are there under privacy.如果我为 iOS 14 运行 Xcode 模拟器,则位置设置在隐私之下。 Where did the setting for privacy go on the simulator?模拟器上隐私 go 的设置在哪里? Is anyone else seeing this behavior?有其他人看到这种行为吗?

Attached is an image of the simulator running iOS 14 which has the location services, and then an image of the simulator running iOS 15, which does not have the location services.附上运行 iOS 14 的模拟器的图像,它有位置服务,然后是运行 iOS 15 的模拟器的图像,它没有位置服务。 Does anyone have any idea why the iOS 15 simulator does not have settings for location services (and yet iOS 15 on a Xr does.)?有谁知道为什么 iOS 15 模拟器没有定位服务设置(而 Xr 上的 iOS 15 有)? Any ideas?有任何想法吗?

在此处输入图像描述

在此处输入图像描述

Unfortunately this is still not available as of iOS 15.5 with Xcode 13.4.1, and as per Apple forums this bug still open "Xcode 13.1 iOS 15.0 simulator missing location privacy settings" https://developer.apple.com/forums/thread/693317?answerId=723302022#723302022 Unfortunately this is still not available as of iOS 15.5 with Xcode 13.4.1, and as per Apple forums this bug still open "Xcode 13.1 iOS 15.0 simulator missing location privacy settings" https://developer.apple.com/forums/thread/ 693317?answerId=723302022#723302022

If anyone is looking for this setting to reset Location and Privacy for the UI Tests, we can make use of the XCTest API func resetAuthorizationStatus(for resource: XCUIProtectedResource)如果有人正在寻找此设置来重置 UI 测试的位置和隐私,我们可以使用 XCTest API func resetAuthorizationStatus(for resource: XCUIProtectedResource)

As suggested by rmp251 in the comments Usage: app.resetAuthorizationStatus(for: .location)正如评论中 rmp251 所建议的用法: app.resetAuthorizationStatus(for: .location)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM