iOS 跳转设置页面

作者: 滴滴时光 | 来源:发表于2017-05-15 11:50 被阅读204次

    跳转自己 App 设置页

    首先你的 App 得有设置,也就是申请过相册、录音等权限才可以

    // iOS8+
    NSURL *appSettingURL = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
    if ([[UIApplication sharedApplication] canOpenURL:appSettingURL]) {
       [[UIApplication sharedApplication] openURL:appSettingURL];
    }
    

    跳转系统设置页

    NSURL *keyboardSettingURL = [NSURL URLWithString:@"App-Prefs:root=General&path=Keyboard"];
    if ([[UIApplication sharedApplication] canOpenURL:keyboardSettingURL]) {
        [[UIApplication sharedApplication] openURL:keyboardSettingURL];
    }
    

    所有可用的 URL

    Command Swift < 3 OR Objc Swift 3 Description
    The topmost level General prefs: App-Prefs:
    About prefs:root=General&path=About App-Prefs:root=General&path=About
    Accessibility prefs:root=General&path=ACCESSIBILITY App-Prefs:root=General&path=ACCESSIBILITY
    Account Settings prefs:root=ACCOUNT_SETTINGS App-Pref:root=ACCOUNT_SETTINGS
    Airplane Mode prefs:root=AIRPLANE_MODE App-Pref:root=AIRPLANE_MODE
    Autolock prefs:root=General&path=AUTOLOCK App-Pref:root=General&path=AUTOLOCK
    Apple Pay / Wallet shoebox://url-scheme shoebox://url-scheme
    Batery prefs:root=BATTERY_USAGE App-Pref:root=BATTERY_USAGE
    Brightness prefs:root=Brightness App-Pref:root=Brightness
    Bluetooth iOS < 9 prefs:root=General&path=Bluetooth App-Pref:root=General&path=Bluetooth
    Bluetooth iOS > 9 prefs:root=Bluetooth App-Pref:root=Bluetooth
    Castle prefs:root=CASTLE App-Pref:root=CASTLE
    Cellular Usage prefs:root=General&path=USAGE/CELLULAR_USAGE App-Pref:root=General&path=USAGE/CELLULAR_USAGE
    Configuration List prefs:root=General&path=ManagedConfigurationList App-Pref:root=General&path=ManagedConfigurationList
    Date and Time prefs:root=General&path=DATE_AND_TIME App-Pref:root=General&path=DATE_AND_TIME
    Do not disturb prefs:root=General&path=DO_NOT_DISTURB App-Pref:root=General&path=DO_NOT_DISTURB
    Facetime prefs:root=FACETIME App-Pref:root=FACETIME
    General prefs:root=General App-Pref:root=General
    Internet Tethering prefs:root=INTERNET_TETHERING App-Pref:root=INTERNET_TETHERING
    iTunes prefs:root=MUSIC App-Pref:root=MUSIC
    iTunes Equalizer prefs:root=MUSIC&path=EQ App-Pref:root=MUSIC&path=EQ
    iTunes Volume prefs:root=MUSIC&path=VolumeLimit App-Pref:root=MUSIC&path=VolumeLimit
    Keyboard prefs:root=General&path=Keyboard App-Pref:root=General&path=Keyboard
    Deeper in Keyboard prefs:root=General&path=Keyboard/KEYBOARDS App-Pref:root=General&path=Keyboard/KEYBOARDS
    Lang International prefs:root=General&path=INTERNATIONAL App-Pref:root=General&path=INTERNATIONAL
    Location Services prefs:root=LOCATION_SERVICES App-Pref:root=LOCATION_SERVICES
    Network prefs:root=General&path=Network App-Pref:root=General&path=Network
    Nike iPod prefs:root=NIKE_PLUS_IPOD App-Pref:root=NIKE_PLUS_IPOD
    Notes prefs:root=NOTES App-Pref:root=NOTES
    Notifications ID prefs:root=NOTIFICATIONS_ID App-Pref:root=NOTIFICATIONS_ID
    Passbook prefs:root=PASSBOOK App-Pref:root=PASSBOOK
    Phone prefs:root=Phone App-Pref:root=Phone
    Photo Camera Roll prefs:root=Photos App-Pref:root=Photos
    Reset prefs:root=General&path=Reset App-Pref:root=General&path=Reset
    Ringtone prefs:root=Sounds&path=Ringtone App-Pref:root=Sounds&path=Ringtone
    Siri prefs:root=SIRI App-Pref:root=SIRI
    Safari prefs:root=Safari App-Pref:root=Safari
    Siri prefs:root=General&path=Assistant App-Pref:root=General&path=Assistant
    Sounds prefs:root=Sounds App-Pref:root=Sounds
    Software Update prefs:root=General&path=SOFTWARE_UPDATE_LINK App-Pref:root=General&path=SOFTWARE_UPDATE_LINK
    Storage & Backup prefs:root=CASTLE&path=STORAGE_AND_BACKUP App-Pref:root=CASTLE&path=STORAGE_AND_BACKUP
    Store prefs:root=STORE App-Pref:root=STORE
    Twitter prefs:root=TWITTER App-Pref:root=TWITTER
    Usage prefs:root=General&path=USAGE App-Pref:root=General&path=USAGE
    Video prefs:root=VIDEO App-Pref:root=VIDEO
    VPN prefs:root=General&path=Network/VPN App-Pref:root=General&path=Network/VPN
    Wallpaper prefs:root=Wallpaper App-Pref:root=Wallpaper
    WIFI prefs:root=WIFI App-Pref:root=WIFI

    参考:url-schemes-settings-ios.md

    相关文章

      网友评论

        本文标题:iOS 跳转设置页面

        本文链接:https://www.haomeiwen.com/subject/vzxhxxtx.html