UIAlertView like "Turn On Location Services to allow maps to determine your location". Settings + Cancel

Massimo picture Massimo · Sep 24, 2010 · Viewed 18.2k times · Source

I Want to emit this alert:

Turn On Location Services to allow maps to determine your location

I need both "Settings" and "Cancel" exactly like the "maps" application.

"Settings" should open settings->general->location services

I didn't find the way to open the settings page.

Can you help me?

Thanks

Answer

Matthew Frederick picture Matthew Frederick · Dec 3, 2010

Creating the alert is pretty straightforward, it's just a (faux-)modal UIView.

However, it's not possible to open the Settings app programmatically, at least not without using private methods that will prevent your app from being approved for the App Store.