How to add properties in info.plist in iOS

家住魔仙堡 提交于 2020-11-30 06:26:43

问题


I want to open PDF attachment via email in my own application: I refer two link here:

How do I associate file types with an iPhone application?

and here on Raywenderlich

where it shows some XML content, and says its added to info.plist.My info.plist is shown like this attachment. How can I add content to info.plist to make it visible as XML document.! My info.plist


回答1:


plist files is nothing more than XML document that Xcode view in his own way. You can Right click -> Open as -> Source Code to get view you want.

Also you can add to plist directly by clicking plus sign or Right click -> Add Row. Default view of plist can give you a suggestions, so I recommend you to use this instead of viewing as XML




回答2:


info.plist is a system level plist in iPhone application, you can add properties by adding a property like this:enter image description here




回答3:


Right click on the .plist in Xcode and select "Open As -> Source code"




回答4:


may be worth mentioning how to get there..

Info.plist is one of the file below the Main.storyboard or viewController.swift

when you click on it first time it usually is in a table format,so right click the file and 'open as' Source code and then add the code




回答5:


If you want to view it as XML, just find the plist file and open it with your favorite editor. Something like TextWrangler. And then add your key-value pairs.




回答6:


One more quick action is using Version editor



来源:https://stackoverflow.com/questions/20114801/how-to-add-properties-in-info-plist-in-ios

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