简体   繁体   English

在 iPhone 上运行项目崩溃,但它可以在模拟器上运行

[英]Running project on iPhone crashes but it works on the simulator

This is the error that I get and I'm not sure how to fix the issue.这是我得到的错误,我不知道如何解决这个问题。

dyld: Library not loaded: @rpath/AWSAuthCore.framework/AWSAuthCore dyld:库未加载:@rpath/AWSAuthCore.framework/AWSAuthCore
Referenced from: /private/var/containers/Bundle/Application/989872E5-F2E1-4360-97B6-5995192BA95A/Project.app/Project Reason: no suitable image found.引用自:/private/var/containers/Bundle/Application/989872E5-F2E1-4360-97B6-5995192BA95A/Project.app/Project 原因:找不到合适的图像。 Did find: /private/var/containers/Bundle/Application/989872E5-F2E1-4360-97B6-5995192BA95A/Project.app/Frameworks/AWSAuthCore.framework/AWSAuthCore: code signature invalid for '/private/var/containers/Bundle/Application/989872E5-F2E1-4360-97B6-5995192BA95A/Project.app/Frameworks/AWSAuthCore.framework/AWSAuthCore'确实发现:/private/var/containers/Bundle/Application/989872E5-F2E1-4360-97B6-5995192BA95A/Project.app/Frameworks/AWSAuthCore.framework/AWSAuthCore:代码签名对'/private/var/containers/Bundle/无效应用程序/989872E5-F2E1-4360-97B6-5995192BA95A/Project.app/Frameworks/AWSAuthCore.framework/AWSAuthCore'

In the target's General tab , under the Embedded Binaries field add the AWSAuthCore framework to resolve the crash.在目标的General 选项卡中,在Embedded Binaries字段下添加AWSAuthCore框架以解决崩溃问题。

在此处输入图片说明

In your Podfile comment the line of use_frameworks!在您的 Podfile 中注释use_frameworks like this像这样

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'YourApp' do
  # Comment the next line if you don't want to use dynamic frameworks
  # use_frameworks!
  use_modular_headers!

And add use_modular_headers!并添加use_modular_headers!

Then do this in your terminal:然后在您的终端中执行此操作:

  1. pod update豆荚更新
  2. pod install吊舱安装

Unfortunately, Apple decided to prevent using cocoapods if your account is free.不幸的是,如果您的帐户是免费的,Apple 决定阻止使用 cocoapods。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM