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

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

Related

How to open another app from my app in swift [duplicate]

This question already has answers here:
Launch an app from within another (iPhone)
(14 answers)
Closed 6 years ago.
We have a standard SAP BI App and we don't have the code for that and our company purchased it for our internal use and now my PM has asked me to open SAP BI App from our custom App programmatically and I have done it using url scheme's and then I am facing the problem he wants me to open our custom App automatically when ever the user clicks on a specific button in standard SAP BI App for which I don't have any code.
Is it possible to open my custom App from SAP BI App.
The only way to open an app from other app is to enable it in the code of the app you want to be opened. If that app dones't provide a URL scheme to open it, you can't'
Read more here:
Launch an app from within another (iPhone)
URL Schemes are the only way to communicate between apps.Apps that support custom URL schemes can use those schemes to receive messages.For example, an app that wants to show an address in the Maps app can use a URL to launch that app and display the address.
and Here is something useful that i found related
You'll need set a custom URL scheme in your second app for that. Check this tutorial or simply do a search with "iphone custom URL schemes". There's a lot of good tutorials.

Open setting from Application iOS9 [duplicate]

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]];

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.

Open one App from another programmatically [duplicate]

This question already has answers here:
Launch an app from within another (iPhone)
(14 answers)
Closed 6 years ago.
We have a standard SAP BI App and we don't have the code for that and our company purchased it for our internal use and now my PM has asked me to open SAP BI App from our custom App programmatically and I have done it using url scheme's and then I am facing the problem he wants me to open our custom App automatically when ever the user clicks on a specific button in standard SAP BI App for which I don't have any code.
Is it possible to open my custom App from SAP BI App.
The only way to open an app from other app is to enable it in the code of the app you want to be opened. If that app dones't provide a URL scheme to open it, you can't'
Read more here:
Launch an app from within another (iPhone)
URL Schemes are the only way to communicate between apps.Apps that support custom URL schemes can use those schemes to receive messages.For example, an app that wants to show an address in the Maps app can use a URL to launch that app and display the address.
and Here is something useful that i found related
You'll need set a custom URL scheme in your second app for that. Check this tutorial or simply do a search with "iphone custom URL schemes". There's a lot of good tutorials.

Accessing Settings app values and opening it if needed

I have seen that there are known apps, such as Twitter and Facebook, that display a "Turn Off Airplane Mode or Use Wi-Fi to Access Data" message within an alert view, with a button that switches to the Settings app, when no network is detected as the app goes foreground. This message is the same in all apps where I saw it, is this alert view a kind of predefined one that you can use? Similar to the one displayed when checking locationServicesEnabled...
I found some posts dealing with this issue some time ago, for example:
iOS UIAlertView button to go to Setting App, and it seems (or seemed) to be a way to read the values in the iOS' Settings app, but I couldn't find any of this in the Apple Developer's documentation... is there any public API for accessing those values? Would an app be rejected if accessing them as in the post I linked?
Thanks in advance
Till iOS 5.0, you can use the URL scheme to open the Settings App from third-party apps using the URLScheme like:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs:root=WIFI"]];
Unfortunately, iOS 5.1 and iOS 6 not supports this feature.
You can use the Reachability for checking the Wi-Fi state.
For displaying the default alertview when the Wi-fi is off or in AirPlane mode you can use the Application uses Wi-Fi flag in the info.plist
Refer InfoPlistKeyReference for details:
UIRequiresPersistentWiFi
“Application uses Wi-Fi”
Specifies whether this app requires a Wi-Fi connection.

Resources