I am facing an issue with launching my flutter app in the Xcode simulator. the android version of the app is working fine while testing with an android emulator, not getting any errors, even while successfully building the app, but I don't know what's going wrong with the Xcode. (IOS version)
flutter version: v2.5.3 | devtools: v2.8.0
Error log: (flutter run)
Unable to install /Users/USER_NAME/Documents/APP_NAME/main_files/source/wordpress_app/build/ios/iphonesimulator/Runner.app on FEBE8117-5EC5-429F-820D-DA1F80359C7B. This is sometimes caused by a
malformed plist file:
ProcessException: Process exited abnormally:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Command: /usr/bin/arch -arm64e xcrun simctl install FEBE8117-5EC5-429F-820D-DA1F80359C7B
/Users/USER_NAME/Documents/APP_NAME/main_files/source/wordpress_app/build/ios/iphonesimulator/Runner.app
Error launching application on iPhone 11.
I appreciate any help you can provide.
CodePudding user response:
In your Info.plist
file, replace:
<key>CFBundleIdentifier</key>
<string>$(com.MY_NAME.MY_APP_NAME)</string>
With:
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
CodePudding user response:
The problem is In Info.plist does not contain a valid CFBundleVersion. Ensure your bundle contains a valid CFBundleVersion.
You need to paste the code in list file
CFBundleVersion $(FLUTTER_BUILD_NUMBER)