In one particular scenario I am taking the user to passcode settings page . below is the code used for this -
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=PASSCODE"]];
After upgrading to iOS 10 beta version I am no longer taken to settings passcode page instead it terminates the app .
Can anyone please help me with this . Thanks in advance .
No way yet.
About 1 month before iOS 10 beta 1 was released, my app got a rejection because of opening a Preference.app URL. The app review team gave me a phone call to explain it: It's not permitted right now for the reason: Using private API. Only opening current app's setting page(UIApplicationOpenSettingsURLString) is allowed.
So it really makes sense now why they rejected me. Because no one could open system setting since iOS 10.
Updated answer at 8 Dec, 2016:
Using Private API (Don't submit the app with these code to the App Store):
@interface PrivateApi_LSApplicationWorkspace
- (BOOL)openSensitiveURL:(id)arg1 withOptions:(id)arg2;
@end
PrivateApi_LSApplicationWorkspace* _workspace;
_workspace = [NSClassFromString(@"LSApplicationWorkspace") new];
BOOL result = (BOOL)[_workspace openSensitiveURL:[NSURL URLWithString:@"Prefs:root=YOURSETTINGURLHERE"] withOptions:nil];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With