【问题标题】:Can´t load plist file, Error Failed to parse Plist data type:key无法加载 plist 文件,错误无法解析 Plist 数据类型:键
【发布时间】:2019-01-03 05:24:38
【问题描述】:

我从我的 xamarin 表单应用程序中的标题中得到错误。在我更新 VS2017 之前它没有那个错误。我这样做是因为我需要一些统一的库(并加载与游戏相关的所有其他库)。现在我什至无法在 Xamarin Forms 中加载 iOS 部分,它说不可用。这是我的 Info.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>UIDeviceFamily</key> 
<array> 
<integer>1</integer> 
<integer>2</integer> 
</array> 
<key>UISupportedInterfaceOrientations</key> 
<array> 
<string>UIInterfaceOrientationPortrait</string> 
<string>UIInterfaceOrientationLandscapeLeft</string> 
<string>UIInterfaceOrientationLandscapeRight</string> 
</array> 
<key>UISupportedInterfaceOrientations~ipad</key> 
<array> 
<string>UIInterfaceOrientationPortrait</string> 
<string>UIInterfaceOrientationPortraitUpsideDown</string> 
<string>UIInterfaceOrientationLandscapeLeft</string> 
<string>UIInterfaceOrientationLandscapeRight</string> 
</array> 
<key>MinimumOSVersion</key> 
<string>8.0</string> 
<key>CFBundleDisplayName</key> 
<string>AppPosventa</string> 
<key>CFBundleIdentifier</key> 
<string>com.companyname.AppPosventa</string> 
<key>CFBundleVersion</key> 
<string>1.0</string> 
<key>UILaunchStoryboardName</key> 
<string>LaunchScreen</string> 
<key>CFBundleName</key> 
<string>appPosventa</string> 
<key>XSAppIconAssets</key> 
<string>Assets.xcassets/AppIcon.appiconset</string> 
<key>NSLocationWhenInUseUsageDescription</key>
<key>UIAppFonts</key>
<array>
<string>fa-solid-900.ttf</string>
</array>
</dict> </plist>

【问题讨论】:

  • 对不起,我有windows,所以我不太明白发出plutil信号的错误是什么

标签: ios xamarin xamarin.forms xamarin.ios plist


【解决方案1】:

plutil 可用于检查属性列表文件的语法,或转换 plist 文件 从一种格式到另一种格式。指定 - 作为从标准输入读取的输入文件。

因此,将您的 plist 粘贴到文件中并运行:

plutil stackoverflow.plist

结果:

stackoverflow.plist: Found non-key inside <dict> at line 41

因此,您没有为您的位置键分配 string 值类型:

&lt;key&gt;NSLocationWhenInUseUsageDescription&lt;/key&gt;

【讨论】:

  • @GuillermoGómezSánchez 你应该把它标记为答案
猜你喜欢
  • 2020-06-11
  • 1970-01-01
  • 2020-06-27
  • 1970-01-01
  • 2014-11-17
  • 2021-08-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多