IOS jump to the system's setup screen

Source: Internet
Author: User

In the project, we often encounter the need to use location. When the user set the app is not allowed to use the location, the best user experience is to directly switch to the location of the system settings interface, set.

I have tested, can jump normally in 5c iOS8.3 system and 5s iOS7.1 system

Jump to your project

In the need to reverse the action of the button to add the following code, will jump to the settings of their own app settings interface, there will be notification and location permissions settings

Nsurl * url = [nsurlurlwithstring:uiapplicationopensettingsurlstring];

if ([[[Uiapplicationsharedapplication] canopenurl:url]) {

Nsurl*url =[nsurlurlwithstring:uiapplicationopensettingsurlstring]; [[Uiapplicationsharedapplication] openurl:url];

}

Test Note: The new project test, you need to request location permissions or notification permissions, you can jump into their app settings, if there is no permission request, you can only jump to the system settings interface

Jump to other interfaces of system settings

Add the following code to the button action of clicking Jump

[[UIApplication sharedapplication] openurl:[nsurl urlwithstring:@ "Prefs:root=wifi"];

Add a URL to info in your project types

Add URL schemes to Prefs


Click to jump to the WiFi settings screen

(Test Phone 5c 8.3 System 5s 7.1 system)

Jump to other fields of the interface

About-prefs:root=general&path=about

Accessibility-prefs:root=general&path=accessibility

Airplanemodeon-prefs:root=airplane_mode

Auto-lock-prefs:root=general&path=autolock

Brightness-prefs:root=brightness

Bluetooth-prefs:root=general&path=bluetooth

date& Time-prefs:root=general&path=date_and_time

Facetime-prefs:root=facetime

General-prefs:root=general

Keyboard-prefs:root=general&path=keyboard

Icloud-prefs:root=castle ICloud

Storage & Backup-prefs:root=castle&path=storage_and_backup

International-prefs:root=general&path=international

Location Services-prefs:root=location_services

Music-prefs:root=music

Music Equalizer-prefs:root=music&path=eq

Music Volumelimit-prefs:root=music&path=volumelimit

Network-prefs:root=general&path=network

Nike + ipod-prefs:root=nike_plus_ipod

Notes-prefs:root=notes

notification-prefs:root=notifications_id

Phone-prefs:root=phone

Photos-prefs:root=photos

Profile-prefs:root=general&path=managedconfigurationlist

Reset-prefs:root=general&path=reset

Safari-prefs:root=safari siri-prefs:root=general&path=assistant

Sounds-prefs:root=sounds

Softwareupdate-prefs:root=general&path=software_update_link

Store-prefs:root=store

Twitter-prefs:root=twitter

Usage-prefs:root=general&path=usage

Vpn-prefs:root=general&path=network/vpn

Wallpaper-prefs:root=wallpaper

Wi-fi-prefs:root=wifi

Setting-prefs:root=internet_tethering


Original link: http://www.jianshu.com/p/19602f48309b

IOS jump to the system's setup screen

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.