Open setting from Application iOS9 [duplicate] - ios

This question already has answers here:
is it possible to open Settings App using openURL?
(4 answers)
Closed 7 years ago.
I am trying to open setting from my app in a button action, I know the following code works but how can I do similar thing on iOS 9?
[[UIApplication sharedApplication]openURL:[NSURL URLWithString:#"General&path=Network/VPN"]];
Or is there any other way to open setting page from app?
If it is not possible can I open Wifi setting?
Found the solution:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs:root=Safari"]];

You can do like this to open settings page from your app
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];

Related

iOS how to programmatically launch WIFI page from Settings App? [duplicate]

This question already has answers here:
How to open Settings programmatically like in Facebook app?
(15 answers)
Closed 7 years ago.
In my iOS application, I'd like to make a method
that opens/launches the Settings Application,
>> particularly the WIFI page, where you pick a wifi SSID <<.
I know it is possible to open Settings App.
cf How to open Settings programmatically like in Facebook app?
Is it possible to land on the Wifi page of it?
If yes, how?
Now, using the UIApplicationOpenSettingsURLString you can get the URL used to open the Settings app.
Because this is iOS 8 only, on iOS 7 or earlier you will need to check this exists before using it (or your app will crash)
if(&UIApplicationOpenSettingsURLString != nil)
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
}
Hope this helps you

How to go iphone settings bundle from my app with alerview button click? [duplicate]

This question already has answers here:
Opening the Settings app from another app
(18 answers)
Closed 8 years ago.
In my application first open alertview with button. if user click alertView button then i need to launch setting bundle in my device.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs://"]];
This is not working in IOS 7. Any having idea?
There is no way to do this.
Because till now (11th Jan 2013) there is no url scheme available for settings app.
Apple provides built-in support for the http, mailto, tel, and sms URL schemes.

How to detect if Facebook app is installed on iOS? [duplicate]

This question already has answers here:
How to check programmatically if an App is installed?
(6 answers)
How can I determine if a user has an iOS app installed?
(4 answers)
Closed 9 years ago.
On iOS, you can launch the Facebook app and link to a profile by opening a url like this: fb://profile/12345
The only problem is that if the Facebook app isn't installed, nothing happens.
Is there a way to detect if the app is installed or if the url scheme fb:// is supported?
This would apply broadly to other apps like Twitter as well.
BOOL isInstalled = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:#"fb://"]]
if (isInstalled) {
} else {
}
Try just using the canOpenURL: function
NSURL *fbURL = [NSURL URLWithString:#"fb://"];//or whatever url you're checking
if ([[UIApplication sharedApplication] canOpenURL:fbURL])
{
//open it etc
}

Opening Settings Application

Would the following be considered as private API use? After googling I have found many conflicting reports.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs://"]];
Also does anyone have a list of valid urls within the settings application? For example:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs://notifications"]];
will open the notifications page of the settings application.
I have found the answer to my own question.
It is supported in iOS5.
URL Schemes can be found here: http://maniacdev.com/2011/11/tutorial-using-url-schemes-to-open-the-settings-app-to-a-specific-page-in-ios-5/

Launching settings app from custom iOS application

Is there any way to launch the build-in iOS settings application from our custom applications.
Based on the URL schema , it is possible to launch safari,maps,YouTube,iTunes... etc. But in the documentation there is no any info related with settings app.
TIA.
-Balaji R.
//code for opening settings app in iOS 8
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
//code for opening settings App in ios5
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs:root=WIFI"]];
No you can not. Opening the Settings app from another app

Resources