Opening the Settings app from another app

前端 未结 17 2228
傲寒
傲寒 2020-11-22 01:37

Okay, I know that there are many question about it, but they are all from many time ago.

So. I know that it is possible because the Map app does it.

In the M

17条回答
  •  遥遥无期
    2020-11-22 02:12

    YES!! you can launch Device Settings screen, I have tested on iOS 9.2

    Step 1. we need to add URL schemes

    Go to Project settings --> Info --> URL Types --> Add New URL Schemes

    Step 2. Launch Settings programmatically Thanks to @davidcann

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs://"]];
    

    Also we can launch sub-screens like Music, Location etc. as well by just using proper name

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=MUSIC"]];
    

    See this full name list here shared by Henri Normak


    Update:

    As per the comment everyone wants to know what happens after this change to my application submission status?

    So YES!! I got successful update submission and application is available on store without any complain.

    Just to confirm, I Just downloaded this morning and disabled Location services, and then started the app, which asked me for location permission and then my alert popup was there to send me on settings -> location services page --> Enabled --> That's it!!

    ![NOTICE: Your app might be rejected ... even if it's approved it can be rejected in future version if you use this method...]4

提交回复
热议问题