Open Settings app from another app programmatically in iPhone

前端 未结 6 903
陌清茗
陌清茗 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:34

    Till iOS 5.0 it was possible to open settings via the URL schema, i.e

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"My Settings URL"]];
    

    This has been deprecated from iOS 5.1 onwards.

提交回复
热议问题