1

I had the following line of code working for a while, but it suddenly stopped working. It should open the Settings to the Keyboard section

UIApplication.sharedApplication().openURL(NSURL(string:"prefs:root=General&path=Keyboard/KE

I edited my Info.plist to add the "prefs" URL scheme. As shown in this image

Any advice on how to get this to work? I want to open to the Keyboards settings, but if I can only open to the main screen of the settings, that is fine too.

UIApplication.sharedApplication().openURL(NSURL(string:UIApplicationOpenSettingsURLString)!);

I do not want this line of code because it deep links to my Apps settings, I do not want this.

rmaddy
  • 307,833
  • 40
  • 508
  • 550
  • Check this: http://stackoverflow.com/questions/37399893/open-phone-settings-programmatically-in-ios9 – guyromb May 25 '16 at 13:50

2 Answers2

1

You can open the main settings by

UIApplication.sharedApplication().openURL(NSURL(string:UIApplicationOpenSettingsURLString)!);
Parth Adroja
  • 12,447
  • 5
  • 37
  • 70
1

enter image description here

Please check whether your plist right. I use your code can open the Settings to the Keyboard

UIApplication.sharedApplication().openURL(NSURL(string:"prefs:root=General&path=Keyboard"))
kai
  • 300
  • 2
  • 14