0

I was looking for a workaround to use openURL in iOS 10 to open the settings App with a string like this: prefs:root=SOMETHING

Finally I found this solution which uses a "grey API" which I think is just a private API using the runtime headers of LSApplicationWorkspace.

I tried to get it working also regarding this post but I'm not able to compile it without any errors.

Does anybody know how to use this LSApplicationWorkspace code:

//url = "prefs:root=SOMETHING"
[[LSApplicationWorkspace defaultWorkspace] openSensitiveURL:url withOptions:nil];

I'm always getting multiple errors compiling the header file saying: unknown type name followed by for example: "LSInstallProgressDelegate" but maybe there is a better way of using this code and the "grey API" in general. I'm fine using private API, due to the fact that this is a in-House App.

Community
  • 1
  • 1
user3191334
  • 1,060
  • 3
  • 15
  • 30

1 Answers1

1

Please refer to this link that I tried out and it worked. https://gist.github.com/johnny77221/bcaa5384a242b64bfd0b8a715f48e69f

Senthil
  • 56
  • 3