Reputation: 185
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?
Upvotes: 8
Views: 26496
Reputation: 162
Try something below:
Right click on Info.plist -> Source Code -> Discard Change
Upvotes: 1
Reputation: 623
I was Building flutter project , and the problem was missing <string>
for key io.flutter.embedded_views_preview adding <string></string>
fixed my issue , i didn't update the info.plist though it was as created by flutter , hope this will help someone using flutter
Upvotes: 0
Reputation: 4380
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.
Upvotes: 5