iosxcodeinfo.plistbuildbox

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>

Solution

  • 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>.


    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.