Can not run on device, but simulator can work well
Last updated
Last updated
Xcode >= 11.4
rm -rf ios/Flutter/App.framework
Run this command and run project again.
https://flutter.dev/docs/development/ios-project-migration
From the Flutter app directory, open ios/Runner.xcworkspace in Xcode.
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!