Golo - App Flutter
  • Introductions
  • How to install Flutter?
    • Getting Started
  • Config Your App
    • Update app setting (pubspec.yaml )
    • Fetch the packages for the project (important)
    • Update the project name
    • Update the application display name
    • Update API Url
    • Setup Multi-Language
    • Copy Flutter Framework to iOS Folder
  • Support
  • FAQ
    • Can not run on device, but simulator can work well
    • Could not find the built application bundle at build/ios/iphoneos/Runner.app
Powered by GitBook
On this page

Was this helpful?

  1. FAQ

Can not run on device, but simulator can work well

PreviousSupportNextCould not find the built application bundle at build/ios/iphoneos/Runner.app

Last updated 5 years ago

Was this helpful?

Xcode's output: 
↳ 
note: Using new build system 
note: Building targets in parallel 
note: Planning build 
note: Constructing build description
error: Building for iOS Simulator, but the linked and embedded framework 'App.framework' was built for iOS. (in target 'Runner' from project 'Runner')

Could not build the application for the simulator.
Error launching application on iPhone 11.

Condition

Xcode >= 11.4

Quick Solved

rm -rf ios/Flutter/App.framework

Run this command and run project again.

Official Solved

  1. From the Flutter app directory, open ios/Runner.xcworkspace in Xcode.

  2. In the Navigator pane, locate the Flutter group and remove App.framework and Flutter.framework.

  3. In the Runner target build settings Build Phases > Link Binary With Libraries confirm App.framework and Flutter.framework are no longer present. Also confirm in Build Phases > Embed Frameworks.

4. Change the Runner target build settings Build Phases > Thin Binary script as follows:

/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" embed

/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" thin

5. In the Runner target Build Settings > Other Linker Flags

(OTHER_LDFLAGS) add $(inherited) -framework Flutter

Hope it helps!

https://flutter.dev/docs/development/ios-project-migration
enter image description here
enter image description here
enter image description here
enter image description here