Flutter: Could not find the built application bundle at build/ios/iphonesimulator/Runner.app
IosXcodeFlutterVisual Studio-CodeIos Problem Overview
I am trying to run my application in debug mode from VSCode. However, every time, regardless if I am running on a simulator or a real device, the debug console outputs
Could not find the built application bundle at build/ios/iphonesimulator/Runner.app.
or
Could not find the built application bundle at build/ios/iphoneos/Runner.app.
When I went to the specified directory, my app bundle is being built every time but instead of being named Runner.app it is named MyAppName.app. I suspect the difference in name is causing the VSCode compiler to not being able to locate Runner.app.
My question: How do I change my build settings so that the build bundle is named Runner.app again?
Ios Solutions
Solution 1 - Ios
You might have updated the Display Name from Runner to your app name
Just open your project in Xcode and Put "Runner" back in Display Name if you want to change the application name please go into info.plist and change bundle name from there.
Note: Changing this will not effect your app’s display name.
Solution 2 - Ios
Did you change the "Display Name" of Runner in your Xcode project? After I tried to change the "Display Name" to a custom name I got your mentioned error. After I renamed it back to "Runner" everything works fine again.
Solution 3 - Ios
This may be caused by the value of PRODUCT_NAME in case it has a space character. Let remove all space characters in your PRODUCT_NAME value. Add CFBundleDisplayName key to the Info.plist if you want to config the app name (bellow the app icon).
eg.
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleDisplayName</key>
<string>$(APP_DISPLAY_NAME)</string>
// xcconfig file
PRODUCT_NAME = Flutter_App
APP_DISPLAY_NAME = Flutter Dev
Solution 4 - Ios
Maybe you changed name of the application via xcode? Then in
ios/Runner.xcodeproj/project.pbxproj and find
PRODUCT_NAME
Then set
PRODUCT_NAME = Runner
Before Run
use flutter clean && flutter run
Solution 5 - Ios
Change App name to Runner. If this doesn't work then Select Runner->Runner(Target)->Build Settings->Packaging-> "Product Name" change it to Runner. That will definitely work.
Solution 6 - Ios
This happened to me when I created PUSH certificates for my app and also updated Flutter SDK. Not sure what caused this but below solution worked for me.
To resolve this, try below measures, preferably sequentially in terminal:
cd "$(xcrun --sdk iphoneos -- show-sdk-platform-path)/DeviceSupport"
sudo ln -s 10.3.1\ \(14E8301\) 10.3
After running these commands, it should work fine, and if not, try run this command below in terminal:
flutter clean
More details :
https://medium.com/@xinyustudio/flutter-could-not-install-build-ios-iphoneos-runner-app-1f355f18c9d9