I want to create app which will detect and show the list of all running application and i can close other application from that app.
Below is the code to open the application. But is their any way to close the another running applications
NSString *customURL = #"iOSDevTips://";
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:customURL]])
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:customURL]];
}
Is this possible in objective C or swift?
If yes what are the chances for its acceptance by apple review team
No. You can't do that in iOS.
Don't worry about what other applications are open. The OS will take care of closing them if necessary.
Related
I used:
NSURL *url = [NSURL URLWithString:#"App-Prefs:root=Privacy&path=ADVERTISING"];
[[UIApplication sharedApplication] openURL:url];
it worked on iOS 11.x and before.
but with iOS 12.x it doesn't work.
Apple no longer allows prefs:root= via section 2.5.1 in their guidelines (they now consider what you're doing a non-public URL scheme).
The best you can do is open up your app settings and the top level should be simple enough that the user can get to where they need from there.
Perhaps something like:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
[[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.
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"]];
I am using iCloud for core data. if user is not logged in on iCloud i want to take him to setting page, is it possible in ios.
Thanks
If you are writing app for iOS < 5.1 then you can use custom URL schemes - find list here.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: myUrlString ]]; //find myUrlString in link above
But this feature was removed in iOS 5.1 and most likely won't available in the feature
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