I've recently added a few screens based on Flutter to an existing Objective-C based iOS app. It worked perfectly pre-Flutter, and works perfectly with Flutter on the Simulator.
When I try to run the app on a real device through Xcode, it crashes on startup with the following error:
dyld[788]: Library not loaded: @rpath/Flutter.framework/Flutter
Referenced from: <22A82183-3F27-38C9-BF16-BD878FDB9926> /private/var/containers/Bundle/Application/B48063FB-E6ED-485D-B3DC-130013A9A97D/My App Name.app/My App Name.debug.dylib Reason: tried: '/private/var/containers/Bundle/Application/B48063FB-E6ED-485D-B3DC-130013A9A97D/My App Name.app/Flutter.framework/Flutter' (no such file), '/private/var/containers/Bundle/Application/B48063FB-E6ED-485D-B3DC-130013A9A97D/My App Name.app/Flutter.framework/Flutter' (no such file)
I've tried several different real devices. I suspect some simple mis-configuration, but haven't been able to identify the problem.
I've recently added a few screens based on Flutter to an existing Objective-C based iOS app. It worked perfectly pre-Flutter, and works perfectly with Flutter on the Simulator.
When I try to run the app on a real device through Xcode, it crashes on startup with the following error:
dyld[788]: Library not loaded: @rpath/Flutter.framework/Flutter
Referenced from: <22A82183-3F27-38C9-BF16-BD878FDB9926> /private/var/containers/Bundle/Application/B48063FB-E6ED-485D-B3DC-130013A9A97D/My App Name.app/My App Name.debug.dylib Reason: tried: '/private/var/containers/Bundle/Application/B48063FB-E6ED-485D-B3DC-130013A9A97D/My App Name.app/Flutter.framework/Flutter' (no such file), '/private/var/containers/Bundle/Application/B48063FB-E6ED-485D-B3DC-130013A9A97D/My App Name.app/Flutter.framework/Flutter' (no such file)
I've tried several different real devices. I suspect some simple mis-configuration, but haven't been able to identify the problem.
Share Improve this question edited Jan 20 at 21:56 HangarRash 15k5 gold badges19 silver badges55 bronze badges asked Jan 18 at 20:36 codemonkeycodemonkey 1,2313 gold badges14 silver badges31 bronze badges1 Answer
Reset to default 0Please before build your app by Xcode, check BuildSettings
:
$(PROJECT_DIR)/Flutter/engine/
$(PROJECT_DIR)/ios/Flutter/
Check also Run Script
in Build Phases:
/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" build
Lastly check flutter version is updated, you can LearnMore .