info.plist adding a key

自作多情 提交于 2019-12-04 06:13:37

问题


Very simple question: How do I add this to info.plist? There's multiple info.plist files and all I can see is how to add a row.

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
<true/>
</dict>

回答1:


If you have multiple targets, each target has a separate PList file with name [TARGET-NAME]-Info.plist.

You can add this by clicking the plus icon, then write NSAppTransportSecurity under "key" and choose type to be a dictionary. Then open it (arrow on the left should be facing down) and click the plus icon of that row, this will add a new entry under the NSAppTransportSecurity entry. Now you should write NSAllowsArbitraryLoads at the newly created entry and choose it to be a boolean with value YES.

If you're editing the file with an external editor, you can just paste the above code before the last </plist> tag.



来源:https://stackoverflow.com/questions/31866136/info-plist-adding-a-key

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