Your app uses the “prefs:root=” non public URL scheme. Best plan to update old code? : <p>so I posted previously about this issue <a href="https://stackoverflow.com/questions/53755550/ios-app-store-rejection-your-app-uses-the-prefsroot-non-public-url-scheme?noredirect=1#comment94365312_53755550">here.</a></p>

<p>As you can read I was rejected.</p>

<p>My question is how do I update this code to use openSettingsURLString instead of UIApplication.shared.openURL</p>

<p>After doing some asking and some research I found out I have to change this:</p>

<pre><code>static func openSettingsAlert(_ title: String, message: String, settingsURL: String) -&gt; UIAlertController {
let alertController = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert)

let settingsAction = UIAlertAction(title: "Settings", style: .default) { (_) -&gt; Void in
    let settingsURL = URL(string: settingsURL)
    if let url = settingsURL {
        DispatchQueue.main.async(execute: {
            UIApplication.shared.openURL(url)
        })
    }
}

let cancelAction = UIAlertAction(title: "Cancel", style: .default, handler: nil)
alertController.addAction(cancelAction)
alertController.addAction(settingsAction)

return alertController
}
</code></pre>

<p>into code that uses <a href="https://developer.apple.com/documentation/uikit/uiapplication/1623042-opensettingsurlstring" rel="nofollow noreferrer">this</a></p>

<p>But I'm so confused because I can't find that class anywhere, and if it's a class why is isn't the class capitalized?</p>

<p>How can I use it in the code snippet above.</p>

<p>I think it is a subclass of String, but I have no idea where to find this, or how to incorporate the change into the existing code safely.</p>

<p>Very confused on this and thank you for any insights.</p>
