3

I want to know how to redirect to the iOS settings from Safari.

I've seen this on one website: I opened this website in Safari, and there is a button, and when I click this button, it can redirect to the iOS settings.

I think this can be realized by javascript.

Does anyone knows how to do this?

Note: I am using iOS9.

Song Yongtao
  • 825
  • 1
  • 8
  • 18

2 Answers2

4

Sorry,I have to answer my own question.I've found the solution.Just tested in ios9

This is my code:

<input type="button" onclick="redirect()" value="Redirect">
<script>
    var redirect = function() {
        window.location.href = "prefs:root=Settings";
    }
</script>

When I open this page in Safari and click the button,it can redirect to the Settings

If I want to redirect to Settings->General,it should be:

window.location.href = "prefs:root=General";

If I want to redirect to the Settings->General->Profiles,then should be:

window.location.href = "prefs:root=General&path=ManagedConfigurationList";

And I found the Preference list http://iphonedevwiki.net/index.php/Preferences.app

Song Yongtao
  • 825
  • 1
  • 8
  • 18
0

I've seen a similar question like this and here is the answer. The only thing you have to change and figure out is the link to the application.

The SO question

Community
  • 1
  • 1
  • 1
    I don't want to open some app,I just want to redirect the ios settings. – Song Yongtao Nov 13 '15 at 06:29
  • Look at this website and then make the link like you want to have it: [link](http://handleopenurl.com/scheme/apple-settings-app) –  Nov 15 '15 at 15:46
  • Sorry, haven't seen you've answered your question by yourself –  Nov 15 '15 at 15:47