从另一个应用程序打开“设置”应用程序时,为什么总是禁用位置服务?

问题描述

这是打开设置页面的代码。

func rediredtedToAppSettingPage() {
        //Redirected to setting page
        guard let url = URL(string: UIApplication.openSettingsURLString) else {return}
        if #available(iOS 10.0,*) {
            UIApplication.shared.open(url,options: [:],completionHandler: nil)
        } else {
            // Fallback on earlier versions
            UIApplication.shared.openURL(url)
        }
    } 

以上代码能够将用户导航到“设置”页面,但是位置服务已禁用,用户无法更改它。 需要返回设置,然后“隐私”>“位置服务”便可以更改位置服务的值。

enter image description here

为什么禁用此功能,知道吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...