简体   繁体   中英

Open specific item in Settings app from my app in iOS 11

I have studied several answers and haven't found any that would work for iOS 11.

I want to show the way to switch Background App Refresh on for my user. To do that I want to open Settings/General/Background App Refresh menu from my app. The following code only opens root menu of the Settings app.

guard let url = URL(string: "App-Prefs:root=General&path=BACKGROUND_APP_REFRESH") else { return }

UIApplication.shared.open(url, options: [:], completionHandler: nil)

Is there any way that would be allowed by Apple to do that?

如果您打开URL UIApplicationOpenSettingsURLString那么您将获得应用程序的设置,其中包括后台应用程序刷新。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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