iOS 应用程序安装后未显示在“设置”应用程序中

问题描述 投票:0回答:1

我有一个 iOS 应用程序,它请求位置权限。如果用户接受,一切都会正常(当然)。但如果用户不接受,然后手动触发本地化,他会收到 Apple 提供的对话框,在“设置”-“应用程序”中更改应用程序的设置。

但是如果用户点击

Settings
,它只是打开设置-应用程序,而不会跳转到我的应用程序的设置。该应用程序也未在“设置”-“应用程序”主屏幕中列出,但可以在
Privacy -> Location Services
下找到。

但是,一旦您接受位置(或任何其他)权限,该应用程序就会出现在“设置”中,并且链接可以正常工作。

NSLocationAlwaysAndWhenInUseUsageDescription
已包含在 pList 中。

关于如何保证出现在“设置-应用程序”主屏幕中,有什么想法吗?

ios iphone permissions location
1个回答
-1
投票

尝试检查当前位置权限 如果被拒绝,则使用此按钮操作显示自定义警报

  guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else { return }
                if UIApplication.shared.canOpenURL(settingsUrl) {
                    UIApplication.shared.open(settingsUrl)
                }
© www.soinside.com 2019 - 2024. All rights reserved.