You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Launching lib/main.dart on iPhone Xʀ in debug mode... Xcode build done. 6.2s ProcessException: Process "/usr/bin/xcrun" exited abnormally: An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22): Failed to install the requested application The application's Info.plist does not contain CFBundleVersion. Ensure your bundle contains a CFBundleVersion with a valid semantic version number. Command: /usr/bin/xcrun simctl install 14971B94-145F-4433-BB5E-6A9DF21A64B5 /xxxxxxx/example/build/ios/iphonesimulator/Runner.app
Run flutter doctor
`
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.5 18F132,
locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version
28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
[!] Android Studio (not installed)
[✓] VS Code (version 1.35.1)
[✓] Connected device (1 available)
`
ProcessException: ProcessException: Process "/usr/bin/xcrun" exited abnormally:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The application's Info.plist does not contain CFBundleVersion.
Ensure your bundle contains a CFBundleVersion with a valid semantic version number.
Command: /usr/bin/xcrun simctl install A956381E-24D8-448B-8C60-4DFBE8AF2B42 /private/tmp/fl_plugin/example/build/ios/iphonesimulator/Runner.app
@itsyashjoshi I'm trying to figure out what the invalid or missing CFBundleVersion value is in the plist since I wasn't able to reproduce.
Can you attach the following two files, and clearly mark which is which:
<Your Flutter project path>/ios/Runner/Info.plist
The Info.plist in the product app bundle. Open <Your Flutter project path>ios/Runner.xcworkspace in Xcode and then build via Product > Build against an iPhone simulator. The Info.plist path will be in your DerivedData directory somewhere like ~/Library/Developer/DerivedData/Runner-durhoqwtricbbcetrszcjktqoabc/Build/Products/Debug-iphonesimulator/Runner.app/Info.plist where the durhoqwtricbbcetrszcjktqoabc is random.
@justinmc FLUTTER_BUILD_NUMBER should be set in the Generated.xcconfig based on the pubspec.yaml "version". What is your version there, maybe it's being parsed incorrectly by the tool?
I talked to @jmagman offline and we found that a version number that starts with a "0" doesn't get parsed correctly. So as @One1Light mentioned, changing your version number in pubspec.yaml could be a solution to this until the parsing is fixed.
In xcode's build, you need two Numbers, build number and version number. Version: 1.0.0+1 in pubspec.yml is split into the two Numbers you need by the compiled script. This is the logic of the flutter script build. In addition, I found that in some cases it was possible to compile without these two Numbers, but it still failed. Finally, even with these two Numbers set, you need to clear the installed APP and clean the build. To take effect
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.9.1+hotfix.2, on Mac OS X 10.14.6 18G95, locale en-PE)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
[!] Android Studio (version 3.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.38.1)
[✓] Connected device (1 available)
Error
Launching lib/main.dart on iPhone 8 in debug mode...
Xcode build done. 253.0s
ProcessException: Process "/usr/bin/xcrun" exited abnormally:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The application's Info.plist does not contain CFBundleVersion.
Ensure your bundle contains a CFBundleVersion.
Command: /usr/bin/xcrun simctl install 6E26EFA8-659D-4E37-B432-2C1DADEC9402 /my_project/build/ios/iphonesimulator/Runner.app
Exited (sigterm)
It was working before without any version in pubspec.yaml.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
jmagman commentedon Jun 19, 2019
What does "Run flutter plugin" mean? Can you include the commands you ran before you saw that error?
jmagman commentedon Jun 19, 2019
And can you attach ios/Runner/Info.plist?
itsyashjoshi commentedon Jun 24, 2019
Facing the same Issue, adding log file below:
Flutter crash report; please file at https://github.com/flutter/flutter/issues.
command
flutter run
exception
ProcessException: ProcessException: Process "/usr/bin/xcrun" exited abnormally:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The application's Info.plist does not contain CFBundleVersion.
Ensure your bundle contains a CFBundleVersion with a valid semantic version number.
Command: /usr/bin/xcrun simctl install A956381E-24D8-448B-8C60-4DFBE8AF2B42 /private/tmp/fl_plugin/example/build/ios/iphonesimulator/Runner.app
flutter doctor
jmagman commentedon Jun 25, 2019
@itsyashjoshi I'm trying to figure out what the invalid or missing CFBundleVersion value is in the plist since I wasn't able to reproduce.
Can you attach the following two files, and clearly mark which is which:
<Your Flutter project path>/ios/Runner/Info.plist<Your Flutter project path>ios/Runner.xcworkspacein Xcode and then build via Product > Build against an iPhone simulator. The Info.plist path will be in your DerivedData directory somewhere like~/Library/Developer/DerivedData/Runner-durhoqwtricbbcetrszcjktqoabc/Build/Products/Debug-iphonesimulator/Runner.app/Info.plistwhere thedurhoqwtricbbcetrszcjktqoabcis random.One1Light commentedon Jun 25, 2019
I did the following things to solve the problem
add version: 1.0.0+1 to example .yaml。 @itsyashjoshi
justinmc commentedon Jul 25, 2019
I ran into this as well. In ios/Runner/Info.plist, I had:
So I guess somehow
FLUTTER_BUILD_NUMBERisn't getting set? I do have a normalversion: 0.0.1in my pubspec.yaml.Manually replacing
$(FLUTTER_BUILD_NUMBER)with0.0.1in Info.plist fixed it for me, but that's not ideal.jmagman commentedon Jul 26, 2019
@justinmc FLUTTER_BUILD_NUMBER should be set in the Generated.xcconfig based on the pubspec.yaml "version". What is your version there, maybe it's being parsed incorrectly by the tool?
jmagman commentedon Jul 26, 2019
Sorry, I see now that you said it's
version: 0.0.1.jmagman commentedon Jul 26, 2019
But still, would like to run your pubspec.yaml through the parser. Can you paste the whole thing, @justinmc?
justinmc commentedon Jul 26, 2019
I talked to @jmagman offline and we found that a version number that starts with a "0" doesn't get parsed correctly. So as @One1Light mentioned, changing your version number in pubspec.yaml could be a solution to this until the parsing is fixed.
jmagman commentedon Jul 26, 2019
It looks like any version in the pubspec.yaml without a + doesn't get a FLUTTER_BUILD_NUMBER, and even if it does, it gets set to the number after the plus.
https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/flutter_manifest.dart#L109
7 remaining items
One1Light commentedon Jul 29, 2019
In xcode's build, you need two Numbers, build number and version number. Version: 1.0.0+1 in pubspec.yml is split into the two Numbers you need by the compiled script. This is the logic of the flutter script build. In addition, I found that in some cases it was possible to compile without these two Numbers, but it still failed. Finally, even with these two Numbers set, you need to clear the installed APP and clean the build. To take effect
joeblew99 commentedon Sep 9, 2019
@One1Light
How do you "clear the installed app"
I change my version in the pubspec to:
version: 0.0.1+0.0.1
then did:
flutter clean
flutter run --debug --build -d 'iPhone SE'
But i still got the error.
diegoveloper commentedon Sep 23, 2019
same issue here after installing XCode11
Flutter doctor
Error
It was working before without any version in
pubspec.yaml.cjrams commentedon Sep 24, 2019
Similar error found using xCode 11 and flutter create --template=plugin test-plugin
In this case I found useful this issue page, but is just an actual template issue.
Test application
pubspec.yamllack of version information. So easy workaround adding it back asversion: 0.0.1aleksei-a-savitski commentedon Oct 3, 2019
I added the following string to
example/pubspec.yaml:and run
flutter build iosafter that.It fixed the issue.
smitthakkar1 commentedon Oct 5, 2019
@One1Light thanks a lotttttttttt. You saved my weekend.
jmagman commentedon Oct 7, 2019
As of #40611 you should get a warning and instructions of how to fix, not a runtime error.
Sunbreak commentedon Oct 11, 2019
After creating several plugins recently, I find the cause is missing of
version: 0.0.1+1inexample/pubspec.yamlAs far as I remember, flutter-1.7.8 works fine. May some problem in plugin template via flutter-1.9.1
jmagman commentedon Oct 11, 2019
#40611 was fixed in v1.10.5, which has made it to the dev and beta channel, but not stable yet.
jiehu5114 commentedon Jan 8, 2020
mark
ch-muhammad-adil commentedon Mar 30, 2020
I am using version like this inside
pubspec.yaml,version: 1.0.7+12open Your xCode and let it index for a while you will you will see the exact values.
So in my case, You have to set
CFBundleVersionandCFBundleShortVersionStringvalues like this . Here is Howinfo.plistwill look after change.You can use below source code too
<key>CFBundleShortVersionString</key> <string>$(FLUTTER_BUILD_NAME)</string> <key>CFBundleVersion</key> <string>$(FLUTTER_BUILD_NUMBER)</string>Please paste it inside your info.plist file.
lock commentedon Apr 15, 2020
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.