How to fix an invalid CFBundleVersion error

0 votes

I know why this error occurred but the issue dont get resolved. How can I fix this error thrown below?

Xcode build done.                                           139.7s
Unable to install /Users/ljsharp/Downloads/gsl_dictionary/build/ios/iphonesimulator/Runner.app on 69287A0D-7119-413E-AF7E-C608ADF7B106. This is sometimes caused by a malformed plist file:
ProcessException: Process exited abnormally:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Simulator device returned an error for the requested operation.
The application's Info.plist does not contain a valid CFBundleVersion.
Ensure your bundle contains a valid CFBundleVersion.
Underlying error (domain=NSPOSIXErrorDomain, code=22):
    Failed to install the requested application
    The application's Info.plist does not contain a valid CFBundleVersion.
  Command: xcrun simctl install 69287A0D-7119-413E-AF7E-C608ADF7B106 /Users/ljsharp/Downloads/gsl_dictionary/build/ios/iphonesimulator/Runner.app
Error launching application on iPhone 14 Pro Max.
Exited

enter image description here

Info.plist

<?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>CFBundleName</key>
    <string>gsl_dictionary</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>$(FLUTTER_BUILD_NAME)</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>$(FLUTTER_BUILD_NUMBER)</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>

Is there a way to resolve this error?

Apr 6, 2023 in Flutter by Ashwini
• 5,430 points
6,493 views

1 answer to this question.

0 votes

Yes, the error message suggests that the Info.plist file does not contain a valid CFBundleVersion.

You can try to fix this issue by setting a valid CFBundleVersion value in your Info.plist file. The CFBundleVersion value should be a string that represents the version of your application.

You can set a valid CFBundleVersion value by updating the $(FLUTTER_BUILD_NUMBER) placeholder in your Info.plist file to a valid version number. For example, you can replace $(FLUTTER_BUILD_NUMBER) with 1.0.0 or any other version number that follows the format x.y.z.

After setting a valid CFBundleVersion value, you can rebuild and try running your application again.

answered Apr 6, 2023 by pooja

Related Questions In Flutter

0 votes
1 answer

How to dismiss an AlertDialog on a FlatButton click?

To dismiss the AlertDialog when the FlatButton ...READ MORE

answered Mar 26, 2023 in Flutter by pooja
2,757 views
0 votes
1 answer

Why is applicationWillTerminate not being called on the first launch of my app?

The applicationWillTerminate method is called by the ...READ MORE

answered Mar 18, 2023 in Android by vishalini
1,990 views
0 votes
1 answer

flutter app not running on ios simulator after adding firebase notification

The error message you provided seems to ...READ MORE

answered Apr 10, 2023 in Flutter by vishalini
5,271 views
0 votes
1 answer

URL Scheme for iOS Home App

I think you could try doing it ...READ MORE

answered Nov 16, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,154 views
0 votes
1 answer

swift for windows? xcode on windows? ?

Hi, @Aminegac, If you’re a little more technically ...READ MORE

answered Dec 4, 2020 in Others by Nikita
1,773 views
0 votes
1 answer

How to present an empty view in flutter?

In Flutter, you can present an empty ...READ MORE

answered Mar 27, 2023 in Flutter by anonymous
4,583 views
0 votes
1 answer

How to make flutter app responsive according to different screen size?

To make your Flutter app responsive according ...READ MORE

answered Mar 27, 2023 in Flutter by anonymous
7,288 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP