I have an app where I'd like to open the Settings.app so the user can enable Wi-Fi or mobile data, but when I use
UIApplication.sharedApplication().openURL(NSURL(string: UIApplicationOpenSettingsURLString)!)
I get redirected to my custom settings, where I have an option for Notifications and one for Use Mobile Data.
Is there a way to either
Disable these custom settings, or
Show the main settings view, or
Another way to redirect the user to the Wi-Fi settings?
No Apple, only allows you to open the settings app on with your now app settings selected.
As for you your apps settings you want to disable, this is also not possible since these are the defaults settings for each app.
Related
I've developed a Safari Extension for iOS and in order to use that extension, it needs to enable the permission from Safari Settings in the Settings screen. I need to know whether there is a nice way to allow the user to allow permission. Is there any way that I can enable the permissions directly from my Safari Extension iOS app so that the user doesn't get confused and end up not allowing the permission. Or if I can navigate the user to the permission screen in Settings directly? Anyone who can help me here?
The user can also give permission to the extension from Safari, without having to navigate to the settings. Like that: https://www.joinhoney.com/en/mobile/ext/enable/ (Must open on iOS safari)
I heard that apple prevent from programmers to toggle airplane mode on and off, there is option to pop up message to the user then he will decide what he want to do? if yes how could I do it?
Check if there is a network connection, if there is none
Present the user with an alert with options such as Cancel and Open Settings, if the user chooses to open the settings app
Navigate to Settings app. See this to see how to open Settings app from your app: Opening the Settings app from another app
Are there any classes or frameworks out there that allow my app to access and modify iPhone settings of the device used to visit my app? I know there's plenty of apps out there which (for example) can change the screen brightness of the device, so I was wondering if it's also possible to modify other settings you can manage in the Settings app on your device (i.e. automatic device lock, time and date, etc.).
No this can't be done... What you can do is to open the settings and that's it. Apple does not allow you to change anything outside your application.
I am working on an app in which I need to open the device settings app on button client rather than app settings. I am using UIApplicationOpenSettingsURLString - but this opens the app settings page not the root level for device settings.
So, may I please get some suggestions on how to open the device settings app and may I also know is there any possibility to open the wi-fi settings page in the device settings programmatically.
You con only open the app-settings as you mentioned above.
If it would would it would also be listed in the documentation:
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplication_Class/#//apple_ref/doc/constant_group/Settings_Launch_URL
Even Apps like GoPro or Twitter just give instructions how to enter the settings rather then linking directly.
I want to know if there is a way to open "Settings" of the device, where are Wifi Toggler, Data Toggler, Air Plane Toggler...
I have a shortcut to "prefs:root=WIFI", but I don't know If I can open this WIFI settings and simulate a click on a back button to go to Settings.
I'm developing on iOS 7 and greater.
Thanks.
As I just read, this is not possible. Answered by #richard-venable in How to open Settings programmatically like in Facebook app?.
There is no URL you can use to get to the root level of the Settings app.
You can send the user to your app's section of the Settings app using UIApplicationOpenSettingsURLString in iOS 8.
Thanks to #saurabh-prajapati for the comment.