Reputation: 21
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.
Upvotes: 1
Views: 2160
Reputation: 330
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"))
Upvotes: 1
Reputation: 13514
You can open the main settings by
UIApplication.sharedApplication().openURL(NSURL(string:UIApplicationOpenSettingsURLString)!);
Upvotes: 1