📁
til
  • Today I Learned
  • Bookmarks
    • Bookmarks
  • Centos
    • How to limit bandwidth on CentOS
  • CI/CD
    • Add a mac as a GitLab runner
    • Setup CI pipeline for iOS projects on gitlab.com
  • cocoapods
    • private-spec-repo
    • CocoaPods save project.pbxproj file in XML plist format on Xcode 7.3.1
  • git
    • Git keeps asking password after El Capitan Upgrade
    • change-case-sensitivity-of-filename
    • interactive-rebase
    • Fork a repo
  • hacking
    • Decompile Android apk
  • homebrew
    • Bash Completion
  • ios
    • ats
    • Failed to open Xcode (LSOpenURLsWithRole() failed with error -10699)
    • Redirect to Settings Page
    • Retrieve expiry date of Provisioning Profile Certificate from .ipa
    • WKWebView set custom HTTP headers
    • IAP applicationUsername is nil
  • Jenkins
    • Create stage dynamically in declarative pipeline
  • mac
    • Catalina failed to sync iPhone with Finder
  • networking
    • shadowsocks vs. VPN
  • Objective-C
    • Keep subview in Scroll View always on screen
    • Custom View using xib
    • Scroll up TextField when keyboard shows
    • autolayout-hugging-vs-resistance
  • Regex
    • regex-chinese-char
  • SQL
    • update-json-value-in-postgresql
    • select-random-row-in-sql
  • SSH
    • verify-ssh-passphrase
  • SVN
    • Svn Checkout Directories only
  • swift
    • equatable
  • unix
    • Create and Grant Sudo Privileges to user
    • Create and Change Current Directory
    • Show ASCII Text welcome message when login with SSH
  • vim
    • Vim with Multiple Files
Powered by GitBook
On this page
  • TLDR;
  • iOS 9.2 need to add URL schemes prefs
  • Format of the values for <path_to_settings>:
  • For iOS 8/9
  • For iOS 10 or later
  • Some of the possible values for the path
  • Will the app be rejected by Apple?

Was this helpful?

  1. ios

Redirect to Settings Page

PreviousFailed to open Xcode (LSOpenURLsWithRole() failed with error -10699)NextRetrieve expiry date of Provisioning Profile Certificate from .ipa

Last updated 5 years ago

Was this helpful?

TLDR;

// iOS 8/9
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=WIFI"]];

// iOS 10 or later
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"App-Prefs:root=WIFI"]];

iOS 9.2 need to add URL schemes prefs

Go to Project settings --> Info --> URL Types --> Add New URL Schemes

Redirect to Settings Page by [UIApplication:openURL:]:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:<path_to_settings>]];

Format of the values for <path_to_settings>:

For iOS 8/9

pref:<path>

For iOS 10 or later

App-Prefs:<path>

Some of the possible values for the path

UIApplicationOpenSettingsURLString
root=General&path=About
root=AIRPLANE_MODE
root=Privacy&path=CAMERA

Will the app be rejected by Apple?

Still unclear but researched some of the cases:

https://stackoverflow.com/a/35987082
List of Settings Path | StackOverflow
List of Settings Path | PASTEBIN
iOS App Rejected because of settings redirection
Custom URL Scheme for Setting on iOS 10?