Open iOS settings from the app - ios

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
I am using this code to open settings app from my app. But is there any URL to open Background App Refresh settings from my app?

No, you are not able to open any specific part in setting from your app. You are just able to redirect to user to those settings which are related to your app permission.

Related

Open Facebook application from my app

Can someone tell the URL schemes to open the Facebook application from my app?
Use fb://.
canOpenURL returns a BOOL value indicating whether or not the URL’s scheme can be handled by some app installed on the device. If canOpenURL returns YES then the application is present on the device. If the user has Facebook installed on their device we open it. If the user does not have Facebook installed we open the page through a link, which will launch Safari.
// Check if FB app installed on device
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:#"fb://"]]) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"fb://profile/355356557838717"]];
}
else {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"https://www.facebook.com/DanielStormApps"]];
}
Check out iPhone URL Schemes for a list of what else you can achieve via URL Schemes.
Also, starting at iOS 9 you must include LSApplicationQueriesSchemes in your info.plist.

How to open general settings (not in the app settings) from the app in iOS 8?

I know about this
if (&UIApplicationOpenSettingsURLString != NULL) {
NSURL *appSettings = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
[[UIApplication sharedApplication] openURL:appSettings];
}
But I wanna know if its possible to go to the general settings. I need users to enable the keyboard but landing in the app settings confused many users. Any suggestions to open the general settings and even if possible the keyboards section?
You cannot open system apps in iOS. You can show them the path to the message though.
'Settings->General->Keyboard' etc in a modal whenever you wish to display this information to the user.
Starting from iOS 10 the one can use "App-Prefs:root" URL:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"App-Prefs:root"]];

open last used app from current app using Custom URL Schemes

Am I able to open app from browser using Custom URL Schemes, now I need open a browser back this app after click cancel button in app. how can I open a browser? is it possible?
are can we open last used app from this app?
You can open safari back with below line.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: #"http://www.google.com"]];
However it will not open the browser with the state from where it went into background.
We can not open last used application. We can open it only if we know its custom URL.

How to open any iOS App from my own App

What I want to do is open any iOS Application (Evernote, safari, Facebook, etc) from my own iOS application. For example, I have created my app with two simple buttons, the first one is named "Evernote" and the second one is named "Safari", so when I click on the "Evernote" button I want that the Evernote App launch on my iOS device, the same when I click on the "Safari" button I want that the button opens my Safari App. How can I do that? It is that possible? If it is, please tell me how. Thank you very much.
yes it possible if you known this app scheme reference URL.
Example call Tel app:
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:#"tel://"]]){
NSString *tell = [#"tel://" stringByAppendingString:phoneNumber];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:tell]];
}
Safari and other is same way.
List common schemes Url here : http://wiki.akosma.com/IPhone_URL_Schemes
Hope this link helps you.
http://code.tutsplus.com/tutorials/ios-sdk-working-with-url-schemes--mobile-6629
If you need to open external apps from your app then follow the above link. Or if you need to open the iOS native apps like phone, mail, safari, etc, you can use URL schemes for opening the app.

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