"prefs:root=CASTLE" not working to open iCloud Settings in IOS10?
<p>In my app I have an alert view that has an option to open the iCloud section of the IOS Settings app. This previously worked on IOS8/9 (Swift 2):</p>

<pre><code>let settingsCloudKitUrl = URL(string:"prefs:root=CASTLE")
if let url = settingsCloudKitUrl {
    UIApplication.sharedApplication().openURL(url)
}
</code></pre>

<p>In IOS10 (Swift 3) it isn't working anymore, because openURL() has been deprecated. I changed my code to the following:</p>

<pre><code>let settingsCloudKitUrl = URL(string:"prefs:root=CASTLE")
if let url = settingsCloudKitUrl {
    if #available(iOS 10, *) {
        if UIApplication.shared.canOpenURL(url) {
            UIApplication.shared.open(url, options: [:], completionHandler: nil)
        }
    } else {
        UIApplication.shared.openURL(url)
    }
}
</code></pre>

<p>But the above code is not working for IOS10. UIApplication.shared.canOpenURL(url) returns false. What do I have to change to get this working again in IOS10?</p>