问题描述
我最近发现了令人敬畏的 iOS5自定义设置网址,这可以在这个伟大的。
I've recently discovered the awesome iOS5 custom Settings URL Scheme, which can be explained in detail at this great website.
我发现这可行,将用户从我的应用程序导向设置应用程序:
I've found this to work, directing the user to the Settings app from my application:
[[UIApplication sharedApplication] openURL:
[NSURL URLWithString:@"prefs:root=General"]];
但似乎无法通过<$直接路由到限制路径c $ c>路径参数:
But cannot seem to route directly to the Restrictions path via the path
parameter:
[[UIApplication sharedApplication] openURL:
[NSURL URLWithString:@"prefs:root=General&path=Restrictions"]];
有没有人找到这方面的文件或能够使这项工作?
Has anyone found documentation on this or been able to make this work?
非常感谢任何见解。我试图让用户启用应用程序内购买,而不是让用户手动点击限制(不是很明显)。
Any insight would be greatly appreciated. I'm trying to take the user to enable in-App purchasing, and would rather not have the user manually click on Restrictions (not very obvious).
推荐答案
AS 的答案,这不适用于 IOS 10
AS @Nix Wang's ANSWER THIS IS NOT WORK IN IOS 10
警告:此方法不适用于运行iOS 5.1及更高版本的设备 - 请参阅下面的Hlung评论。
路径
组件的名称可能与实际部分的名称不同,但它是您也可能无法直接从URL访问该部分。我找到了可能的网址列表,并且没有限制,可能还没有找到。
It's possible that the path
component has a different name than the actual section, but it's also possible that you can't currently access that section straight from a URL. I found a list of possible URLs and Restrictions is not on it, maybe it's just not found out yet.
设置应用中当前已知网址的列表:
List of currently known URLs in the Settings app:
- prefs:root = General& path = About
- prefs:root = General& path = ACCESSIBILITY
- prefs:root = AIRPLANE_MODE
- prefs:root = General& path = AUTOLOCK
- prefs:root = General& amp ; path = USAGE / CELLULAR_USAGE
- prefs:root =亮度
- prefs:root = General& path = Bluetooth
- prefs:root = General& path = DATE_AND_TIME
- prefs:root = FACETIME
- prefs:root = General
- prefs:root = General& path = Keyboard
- prefs:root = CASTLE
- prefs:root = CASTLE& path = STORAGE_AND_BACKUP
- prefs:root = General& path = INTERNATIONAL
- prefs:root = LOCATION_SERVICES
- prefs:root = ACCOUNT_SETTINGS
- prefs:root = MUSIC
- prefs:root = MUSIC& path = EQ
- prefs:root = MUSIC& path = VolumeLimit
- prefs :root = General& path = Network
- prefs:root = NIKE_PLUS_IPOD
- prefs:root = NOTES
- prefs:root = NOTIFICATIONS_ID
- prefs:root = Phone
- prefs:root = Photos
- prefs :root = General& path = ManagedConfigurationList
- prefs:root = General& path = Reset
- prefs:root = Sounds& path = Ringtone
- prefs:root = Safari
- prefs:root = General& path = Assistant
- prefs:root = Sounds
- prefs:root = General& path = SOFTWARE_UPDATE_LINK
- prefs:root = STORE
- prefs:root = TWITTER
- prefs:root = General& path = USAGE
- prefs:root = VIDEO
- prefs :root = General& path = Network / VPN
- prefs:root = Wallpaper
- prefs:root = WIFI
- 首选项:根= INTERNET_TETHERING
- prefs:root=General&path=About
- prefs:root=General&path=ACCESSIBILITY
- prefs:root=AIRPLANE_MODE
- prefs:root=General&path=AUTOLOCK
- prefs:root=General&path=USAGE/CELLULAR_USAGE
- prefs:root=Brightness
- prefs:root=General&path=Bluetooth
- prefs:root=General&path=DATE_AND_TIME
- prefs:root=FACETIME
- prefs:root=General
- prefs:root=General&path=Keyboard
- prefs:root=CASTLE
- prefs:root=CASTLE&path=STORAGE_AND_BACKUP
- prefs:root=General&path=INTERNATIONAL
- prefs:root=LOCATION_SERVICES
- prefs:root=ACCOUNT_SETTINGS
- prefs:root=MUSIC
- prefs:root=MUSIC&path=EQ
- prefs:root=MUSIC&path=VolumeLimit
- prefs:root=General&path=Network
- prefs:root=NIKE_PLUS_IPOD
- prefs:root=NOTES
- prefs:root=NOTIFICATIONS_ID
- prefs:root=Phone
- prefs:root=Photos
- prefs:root=General&path=ManagedConfigurationList
- prefs:root=General&path=Reset
- prefs:root=Sounds&path=Ringtone
- prefs:root=Safari
- prefs:root=General&path=Assistant
- prefs:root=Sounds
- prefs:root=General&path=SOFTWARE_UPDATE_LINK
- prefs:root=STORE
- prefs:root=TWITTER
- prefs:root=General&path=USAGE
- prefs:root=VIDEO
- prefs:root=General&path=Network/VPN
- prefs:root=Wallpaper
- prefs:root=WIFI
- prefs:root=INTERNET_TETHERING
这篇关于iOS启动设置 - >限制URL方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!