ios - 如何用代码更新 info.plist?

标签 ios xamarin xamarin.ios xamarin-studio

我正在使用 Xamarin Studio/XCode/Visual Studio 在 Xamarin 中构建应用程序。我需要使用 Facebook SDK对于 iOS 项目,但说明需要将该链接上显示的代码添加到 info.plist。但是,如果我在这些 IDE 中的任何一个中打开 info.plist,我都会得到一个结构类似于表单的窗口来编辑文件,所以我无法按照教程所述添加代码?在“高级”下,有一个添加 URL 类型的选项,但我不确定要在此处输入什么,或者这是否是正确的选项。

谢谢

最佳答案

首先,转到您的 Xcode 项目并找到 info.plist 文件:

Just open the folder and the file should be there

你应该看到这样的东西:

screenshot of the files on the left sidebar

然后右键单击该文件并选择打开方式,然后选择源代码:

"Open As/Source Code" selected from the context menu

然后它应该允许您将 Facebook 代码添加到您的 Info.plist 文件中,如下所示:

screenshot of the source code

关于ios - 如何用代码更新 info.plist?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34551737/

相关文章:

ios - 为什么在我的错误 displayAlerts 上单击 "OK"时会出现 segue?

ios - 为什么我应该直接从初始化方法中访问实例变量?

c# - Xamarin ListView 图像在滚动上消失

android - android 应用程序导航栏上方的浅蓝色线

Xamarin.iOS UIApperance 设置默认文本属性

c# - Xamarin.iOS 与第三方框架绑定(bind)

c# - 如何在 Xamarin Forms 中部分切割 ViewCell 分隔线?

ios - LLDB 和 "<register XY is not available>"

iOS:当应用程序未运行时检测蓝牙设备何时断开连接

android - Xamarin Android 状态栏字体颜色