How to update info.plist with code?

守給你的承諾、 提交于 2019-12-12 05:38:50

问题


I am building an app in Xamarin, using Xamarin Studio / XCode / Visual Studio. I need to use the Facebook SDK for the iOS project, but the instructions require adding the code shown on that link to info.plist. However, if I open info.plist in any of those IDEs, I get a window structured like a form to edit the file, so I can't add the code in as stated by the tutorial? Under Advanced, there is an option to add URL Types, but I am not sure what to put in here, or if this is the right option to use.

Thanks


回答1:


First, go to your Xcode project and find the info.plist file:

You should see something like this:

Then right click the file and choose Open As, and then Source Code:

And then it should allow you to add the Facebook code to your Info.plist file like this:




回答2:


In Xamarin Studio, if you open Info.plist you should be able to switch to the "Source" tab. From there you can either enter a predefined key, or "Custom Property" which can be set to any value.

Info.plist is a text file, so you could also edit it with any text editor outside of your IDE.



来源:https://stackoverflow.com/questions/34551737/how-to-update-info-plist-with-code

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