Xcode 11.4 changed the way frameworks are linked and embedded, and you may experience issues switching between iOS devices and simulators. Flutter v1.15.3 and later will automatically migrate your Xcode project.
To get unstuck, follow the instructions below;
- Quick fix (make your simulator work)
rm -rf ios/Flutter/App.framework
-
Official recommended Steps to migrate manually
- From the Flutter app directory, open ios/Runner.xcworkspace in
Xcode. - In the Navigator pane, locate the Flutter group and remove App.framework and Flutter.framework.
- 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.
- From the Flutter app directory, open ios/Runner.xcworkspace in
-
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
-
In the Runner target Build Settings > Other Linker Flags
(OTHER_LDFLAGS) add $(inherited) -framework Flutter
Hope it helps!