无法加载plist文件,错误无法解析Plist数据类型:键

时间:2019-01-03 05:24:39

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

我从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>

1 个答案:

答案 0 :(得分:3)

  

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

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

  

plutil stackoverflow.plist

结果:

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

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

<key>NSLocationWhenInUseUsageDescription</key>