Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The data couldn’t be read because it isn’t in the correct format. error

I got an error, The data couldn’t be read because it isn’t in the correct format. Now I am making iPhone app by swift. I added several codes to Info.plist of my app, I deleted these codes. But when I wanna open Info.plist of my app, this error happen.I do not know why because I deleted all codes which I added.And I think format is really fixed. My Info.plist is like

<?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>UILaunchStoryboardName</key>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</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.0</string>
    <key>CFBundleVersion</key>
    <string>1</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>armv7</string>
    </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>
</dict>
</plist>

How can I fix this?

like image 603
user7523656 Avatar asked Feb 26 '17 13:02

user7523656


2 Answers

You've duplicated key in the info.plist file, remove the following key in the beginning

<key>UILaunchStoryboardName</key>

and it will resolve the issue.

like image 100
ldindu Avatar answered Oct 06 '22 01:10

ldindu


Try something below:

Right click on Info.plist -> Source Code -> Discard Change
like image 43
Bunthoeun Avatar answered Oct 05 '22 23:10

Bunthoeun