2016-09-22

Apple Officially Disable the Settings URL Scheme Only Allow in Custom Keyboard Extension



Since iOS 10, iOS developer can not use URL Scheme to open Settings in their own iOS apps.


The reason is URL schemes for iPhone/iPad Settings are considered Private API which against the Apple Developer Guide.

iOS 10,  here is the only way to open settings in Apple iOS Developer's app:

Use the const string to open App's own setting:

In Swift:
UIApplication.sharedApplication().openURL(NSURL(string:UIApplicationOpenSettingsURLString)!)
In Objective-C
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
So don't waste time to search the solution for the "jump" or "redirect" users to specific settings with traditional way.


But one more interesting things: on  iOS 10 simulator, you can still working the "redirect" users to settings with the following method.




For more details: Apple Developer Technical Q&A QA1924

Reference Doc: Full List Of Settings URL schemes


FYI:

I am developing a Today Widget to open user's WiFi & Mobile Usage Settings, it really working fine on iOS 9 or earlier version and partially tested in iOS 10 beta Simulator with XCode 8.

When I prepare to publish this app on Apple Store, iOS 10 released, I tested my widget on my iPhone 5 16G real device, my nightmare coming. You can imaging how dark is it to me!!!

I searched on Google & stackoverflow one week try to find a solution. Until now, I wrote this article for those who want to do the same thing as me.

Don't Waste Time on Settings URL Scheme Solution!

Thank You Apple, you ruined my first app on Apple Store!

I quit my job to start a studio and try to make small system level app to improve user's experience.

Now it seem I should do another thing. how bad it is!

and my bad luck is not stopped, I purchased iPhone 6S for my mum, but the phone is broken, can not connect to WiFi and Bluetooth, I had to wait for returned from the apple repair factory.

No comments:

Post a Comment