Failed to install the requested application - Flutter
Solution 1
The error is happening because your bundle identifier (CFBundleIdentifier
) is not correct. com.MY_NAME.MY_APP_NAME
is not an environment variable, and therefore cannot be evaluated using $()
.
In flutter the CFBundleIdentifier
should be set to the value of PRODUCT_BUNDLE_IDENTIFIER
which is an environment variable defined in ios\Runner.xcodeproj\project.pbxproj
.
So, 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>
Solution 2
This can sometimes be caused when you have not added your GoogleService-Info file
Comments
-
Demoxing over 1 year
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.
-
mmcdon20 over 2 yearsThe error suggests there is an issue with your
Info.plist
file. Can you share what yourInfo.plist
file looks like? -
Demoxing over 2 yearssure, here is it: pastebin.com/pVhNRn8h
-
mmcdon20 over 2 yearsDon't try to hard code your CFBundleIdentifier, try using this
<key>CFBundleIdentifier</key><string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
-
Demoxing over 2 yearsDear, Don't I have to replace CFBundleIdentifier value with my iOS package name?
-
mmcdon20 over 2 years
PRODUCT_BUNDLE_IDENTIFIER
should be set to your iOS package name. Don't set theCFBundleIdentifier
manually in yourInfo.plist
file. -
Demoxing over 2 yearsMan!!!! You are the god! It fixed my issue. WOW. Thanks a lot. Would you please post it as an answer so I can select it as the correct answer? It will help other people.
-
mmcdon20 over 2 yearsSure, I added it as an answer.
-
-
Demoxing over 2 yearsMy CFBundleVersion looks like this: imgur.com/ZD5YC8H
-
Demoxing over 2 yearsSo, I replace CFBundleVersion value with $(FLUTTER_BUILD_NUMBER)?
-
Mojtaba Darzi about 2 yearsi have error yet!!