So I want to open settings page (VPN) and not app settings on iPhone
I stumbled upon this articles that talks about iOS URL schemas for App settings.
https://medium.com/p/20871139d72f
Based on that, I added prefs to URL schema and then wrote this code
NSURL *url = [NSURL URLWithString:@"prefs:root=General&path=About"];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
} else {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
}
but this didn't work, So I worked with App-Refs and modified my code to this
NSURL *url = [NSURL URLWithString:@"App-Prefs:root=General&path=About"];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
} else {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
}
This open setting, but not the About (simulator doesn't have Vpn).
Can someone tell me how I can open VPN in settings on iOS.
Also, I read Apple rejects app if we use prefs. if that's the case, what's the point of having URL schema?
Update: So VPN apps add VPN and can also open the VPN page in settings (sharkVpn) so I think it is possible?