Can´t load plist file, Error Failed to parse Plist data type:key

折月煮酒 提交于 2020-06-17 06:05:06

问题


I get the error from the title in my xamarin forms app. It doesn't have that error before I update VS2017. I did this because I need some libraries for unity (and load all the others related to games). Now I can't even load the iOS part in Xamarin Forms, it says is not available. This is my 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:


plutil can be used to check the syntax of property list files, or convert a plist file from one format to another. Specifying - as an input file reads from stdin.

So pasting your plist into a file and running:

plutil stackoverflow.plist

Results in:

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

Thus, you have no string value type assigned for your location key:

<key>NSLocationWhenInUseUsageDescription</key>



来源:https://stackoverflow.com/questions/54016758/can%c2%b4t-load-plist-file-error-failed-to-parse-plist-data-typekey

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