Search code examples
iosflutter

'/usr/lib/swift/Flutter.framework/Flutter' (no such file, not in dyld cache) while running flutter app (Flutter 3.24.4)


Steps to reproduce https://github.com/Photo-Owl/bringer-cam-dev-v2/tree/ios (The code on iOS branch is causing this issue while trying to run on Apple silicon ) run the following commands on the root of the project

Expected results: The Flutter Engine should start, and the app should go to the initial route

Actual results The app starts and shows an empty white screen (LaunchScreen)

Logsnick@Nickys-MacBook-Air photoowldev % flutter run --debugLaunching lib/main.dart on iPhone 15 Pro in debug mode...Running pod install...                                             27.9sRunning Xcode build...└─Compiling, linking and signing...                        28.9sXcode build done.But while running the app, i get this log
Termination Reason: DYLD 1 Library missingLibrary not loaded: @rpath/Flutter.framework/FlutterReferenced from: <90307E20-FBC3-3BA8-A479-7B0D1925DEBB> /Users/USER/Library/Developer/CoreSimulator/Devices/09DA24B2-C683-47BB-8C9B-B8DCD796B79B/data/Containers/Bundle/Application/64AB2C0D-C126-4E83-8835-86E68F8DF908/Runner.app/Runner.debug.dylibReason: tried: '/Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/Flutter.framework/Flutter' (no such file), '/usr/lib/swift/Flutter.framework/Flutter' (no such file, not in dyld cache), '/Users/nick/Library/Developer/CoreSimulator/Devices/09DA24B2-C683-47BB-8C9B-B8DCD796B79B/data/Containers/Bundle/Application/64AB2C0D-C126-4E83-8835-86E68F8DF908/Runner.app/Frameworks/Flutter.framework/Flutter' (no such file), '/Users/nick/Library/Developer/CoreSimulator/Devices/09DA24B2-C683-47BB-8C9B-B8DCD796B79B/data/Containers/Bundle/Application/64AB2C0D-C126-4E83-8835-86E68F8DF908/Runner.app/Frameworks/Flutt(terminated at launch; ignore backtrace)

fully summary of crash available here https://pastebin.com/Y3RWV0T1

Flutter Doctor output nick@Nickys-MacBook-Air ~ % flutter doctor -v[!] Flutter (Channel stable, 3.24.4, on macOS 15.1 24B83 darwin-arm64, localeen-IN)• Flutter version 3.24.4 on channel stable at/Users/nick/development/flutter! Warning: flutter on your path resolves to/Users/nick/Development/flutter/bin/flutter, which is not inside yourcurrent Flutter SDK checkout at /Users/nick/development/flutter. Consideradding /Users/nick/development/flutter/bin to the front of your path.! Warning: dart on your path resolves to/Users/nick/Development/flutter/bin/dart, which is not inside your currentFlutter SDK checkout at /Users/nick/development/flutter. Consider adding/Users/nick/development/flutter/bin to the front of your path.• Upstream repository https://github.com/flutter/flutter.git• Framework revision 603104015d (11 days ago), 2024-10-24 08:01:25 -0700• Engine revision db49896cf2• Dart version 3.5.4• DevTools version 2.37.3• If those were intentional, you can disregard the above warnings; howeverit is recommended to use "git" directly to perform update checks andupgrades.
[✗] Android toolchain - develop for Android devices✗ Unable to locate Android SDK.Install Android Studio from:https://developer.android.com/studio/index.htmlOn first launch it will assist you in installing the Android SDKcomponents.(or visit https://flutter.dev/to/macos-android-setup for detailedinstructions).If the Android SDK has been installed to a custom location, please useflutter config --android-sdk to update to that location.
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)• Xcode at /Applications/Xcode.app/Contents/Developer• Build 16A242d• CocoaPods version 1.16.2
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/GoogleChrome.app/Contents/MacOS/Google Chrome)! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[!] Android Studio (not installed)• Android Studio not found; download from https://developer.android.com/studio/index.html(or visit https://flutter.dev/to/macos-android-setup for detailed instructions).
[✓] VS Code (version 1.95.1)• VS Code at /Applications/Visual Studio Code 2.app/Contents• Flutter extension version 3.100.0
[✓] Connected device (2 available)• macOS (desktop)                 • macos                 • darwin-arm64 • macOS 15.1 24B83 darwin-arm64• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin       • macOS 15.1 24B83 darwin-arm64! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources• All expected network resources are available.
! Doctor found issues in 4 categories.

I tried reinstalling Flutter.


Solution

  • Screenshot of Xcode

    This issue is caused because the script to start the flutter engine is not running properly.

    Try turning off the "For install builds only" checkbox in the Run Script section and the Thin Binary section of the Build Phases tab in Target Runner.