1

I'm using below code to navigate to the Touch ID and Passcode section using swift,

guard let profileUrl = URL(string : "App-Prefs:root=TOUCHID_PASSCODE") else {
            return
}

if UIApplication.shared.canOpenURL(profileUrl){
     if #available(iOS 10.0, *) {
                UIApplication.shared.open(profileUrl, options: [:], completionHandler: nil)
            } else {
                // Fallback on earlier versions
         }
 }

It worked properly with iOS 10. but this doesn't work now. it navigates only to the Settings, not to the Touch ID & Passcode section. any reason for this.

caldera.sac
  • 4,918
  • 7
  • 37
  • 69
  • 1
    From ios 11 - The Settings URL scheme will only launch the Settings app Screen. It won't open any particular section any more. – Zealous System Dec 11 '17 at 10:46
  • Prefs urls have been considered private for some time. You can only open your own app's preferences – Paulw11 Dec 11 '17 at 11:33

2 Answers2

5

Apple has removed that functionality from the Settings app. Your only choice to keep these functional would be to remain on iOS 10.

From iOS 11 you can Only call Main Setting Screen,

guard let profileUrl = URL(string : "App-Prefs:") else {
        return
}
Zealous System
  • 2,080
  • 11
  • 22
1

App rejected!

Your app uses the "prefs:root=" non-public URL scheme, which is a private entity. The use of non-public APIs is not permitted on the App Store because it can lead to a poor user experience should these APIs change.

Specifically, your app uses the following non-public URL scheme:

app-prefs:root=touchid_passcode

Continuing to use or conceal non-public APIs in future submissions of this app may result in the termination of your Apple Developer account, as well as removal of all associated apps from the App Store.

Next Steps

To resolve this issue, please revise your app to provide the associated functionality using public APIs or remove the functionality using the "prefs:root" or "App-Prefs:root" URL scheme.

If there are no alternatives for providing the functionality your app requires, you can file an enhancement request.

ergunkocak
  • 3,334
  • 1
  • 32
  • 31