1

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>
Mohamed Awad
  • 630
  • 1
  • 6
  • 14

2 Answers2

2

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.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • to be honest, i'm just trying to export game to ipa file in xcode, follow some steps not understandable and I do not want to understand it at all, in vedio all is right but with me ........ omg – Mohamed Awad Jul 24 '19 at 16:20
  • but wait wait, you mentioned to something & is the error here, it must be like this & – Mohamed Awad Jul 24 '19 at 16:45
  • I believe a teammate caused similar plist problem through merge conflict/resolution and this answer helped fix. I also had line errors where `` needed to be corrected to ``. Hope that helps someone else. – Yarn May 15 '20 at 21:17
0

error in this line

<String>Ring & Wall</String>

remove & or change line Ring & Wall

thanks @matt

Mohamed Awad
  • 630
  • 1
  • 6
  • 14