编辑2020-05-06 :我的应用从iOS 13.4正确安装,但是一段时间后,该应用在启动时崩溃,因此我必须重新安装它。我不知道为什么 也许在iOS更新之后?
另请参阅下面的答案:
编辑:这在3月24日发布的iOS 13.4上已修复。
这是与Flutter不相关的iOS 13.3.1回归。通过创建新的Xcode项目,添加框架目标并选择“个人团队配置”配置文件,我能够在没有任何Flutter或CocoaPods代码的情况下重现崩溃。
参见GitHub问题:https : //github.com/flutter/flutter/issues/49504#issuecomment-581554697。
该错误不应影响已在App Store上签名并分发的开发人员帐户团队的配置文件或应用程序。
不幸的是,唯一的解决方法可能是避免在解决此问题之前将开发设备升级到13.3.1。
我正在尝试flutter create在iOS设备(iPhone XS)上运行新的Flutter应用(由创建的示例应用)。Xcode设法安装它,但是随后崩溃,并显示以下消息:
flutter create
dyld: Library not loaded: @rpath/Flutter.framework/Flutter Referenced from: /private/var/containers/Bundle/Application/BA807438-FA5B-4021-B37D-FC437B2C80CA/Runner.app/Runner Reason: no suitable image found. Did find: /private/var/containers/Bundle/Application/BA807438-FA5B-4021-B37D-FC437B2C80CA/Runner.app/Frameworks/Flutter.framework/Flutter: code signature invalid for '/private/var/containers/Bundle/Application/BA807438-FA5B-4021-B37D-FC437B2C80CA/Runner.app/Frameworks/Flutter.framework/Flutter'
如果我尝试flutter run,该应用程序也会打开并崩溃。该命令将永远等待:
flutter run
$ flutter run Launching lib/main.dart on Ferran Maylinch’s iPhone in debug mode... Automatically signing iOS for device deployment using specified development team in Xcode project: 25D86TPBWG Running Xcode build... ├─Assembling Flutter resources... 4.3s └─Compiling, linking and signing... 13.3s Xcode build done. 21.0s Installing and launching... (This is taking an unexpectedly long time.) ⢿
在Xcode中,我配置了一个团队(个人团队),并且签名证书(Apple开发证书)似乎还不错,因为我可以在设备上安装Hello world Swift项目。
注意: 我没有支付Apple Developer Program的帐户 。在iOS设备上运行Flutter应用程序是否绝对必要?
我遵循了macOS的说明,并flutter doctor说我拥有iOS所需的一切:
flutter doctor
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.2 19C57, locale en-ES) [!] Android toolchain - develop for Android devices (Android SDK version 28.0.3) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses [✓] Xcode - develop for iOS and macOS (Xcode 11.3) [!] Android Studio (version 3.5) ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. [✓] IntelliJ IDEA Ultimate Edition (version 2019.3.1) [!] VS Code (version 1.41.1) ✗ Flutter extension not installed; install from https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter [✓] Connected device (1 available) ! Doctor found issues in 3 categories.
如您所见,我使用稳定通道来丢弃beta通道的问题,但是我通常在beta通道中工作,以便为Web构建抖动(效果很好)。
在iOS模拟器中,该应用程序也可以正常运行。
最近我注意到我没有文件ios/Podfile。我发现这篇文章谈论了这一点。我不知道这对我来说是否重要,但是我尝试手动添加此Podfile。无论如何,我得到相同的签名错误。
ios/Podfile
对此感到沮丧,我现在切换到了NativeScript。