最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

iphone - Flutter integrated into existing native iOS app won't start on real device (works on simulator) - Stack Overflo

programmeradmin3浏览0评论

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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

Please 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 .

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论