Open Settings app from another app programmatically in iPhone

前端 未结 6 917
陌清茗
陌清茗 2020-12-07 18:55

I have to open settings app from my app if gps is not enabled in iPhone. I have used the following code. It works well in iOS simulator but it does not work in iPhone. May I

6条回答
  •  渐次进展
    2020-12-07 19:46

    As others answered, you cannot open the Settings from your app.

    However You can solve the situation, like I have done:

    Output a message that Location services must be enabled explaining why, and show the path in that message:

    "Settings->Privacy->LocationServices"

提交回复
热议问题