简体   繁体   中英

Info.plist : the data couldn't be read because it isn't in the correct format

i was trying to test my project (bulidbox game) on iphone, export the project, opened on xcode and when I tried to run it, An error appears as shown below:

error: couldn't parse contents of '/project/ios/BBplayer/Info.plist': The data couldn't be read because it isn't in the correct format.

I've looked at the past StackOverflow questions, found about 7 posts in same questions and still have not been able to fix this issue

is there any way to fix this problem ?

xcode 10;

content of info.plist file open as source code

<?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>CFBundleDisplayName</key>
    <string>en</string>
    <string>Ring & Wall</string>
    <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIconName</key>
    <string>AppIcon</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
    <string>armv7</string>
</array>
<key>UIRequiresFullScreen</key>
<true/>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>

It looks like you've been trying to edit your Info.plist as source code. Don't. You don't know how, and you are likely to mess up the format and brick the Info.plist.

In this case you've got two mistakes:

<key>CFBundleDisplayName</key>
<string>en</string>
<string>Ring & Wall</string>

1

You cannot have two <string> entries following a <key> entry.

2

You cannot use an ampersand in XML. You mean <string>Ring &amp; Wall</string> <string>Ring &amp; Wall</string> .


I repeat, none of this would have happened if you would just keep your hands off the raw XML and let the plist editor do its job.

error in this line

<String>Ring & Wall</String>

remove & or change line Ring & Wall

thanks @matt

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM