How to Open a URL in Safari from settings.bundle

冷暖自知 提交于 2019-12-11 22:19:25

问题


How can I open a URL in Safari from Settings?

Something like in the Nike+ App

Does it need to be customized? I can't seem to find a Type for adding a URL in the Root.plist.


回答1:


you can check out this on git https://github.com/futuretap/InAppSettingsKit

then put this value into the plist

    <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>DefaultValue</key>
    <string>inappsettingskit.com</string>
    <key>File</key>
    <string>http://www.inappsettingskit.com/</string>
    <key>Title</key>
    <string>Open URL</string>
    <key>Type</key>
    <string>IASKOpenURLSpecifier</string>
</dict>
</plist>



回答2:


Similar to GSiklos's answer abouve, but using the plist editor in XCode , the change would be:

Note that as default, any URL's shown in the IASK settings are NOT displayed in the standard iOS settings page (usefully)



来源:https://stackoverflow.com/questions/22495444/how-to-open-a-url-in-safari-from-settings-bundle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!