更新时间:2023-02-22 10:57:36
重新安装整个系统并找不到解决方案后,我发现有些为CocoaPods构建强制阶段正确地丢失了。
此问题的解决方案适用于下一步:
sudo gem install cocoapods-deintegrate
安装该工具)。 修改你的Podfile:
您应该定义目标链接 link_with'ProjectName'
。
您应该定义你的pod的目标: target'ProjectName'do
[pods here] end
。
使用 pod install进行安装
执行此操作后,转到XCode并检查以下设置:
在项目设置中的配置下,检查在Debug和Release中是否有一个名为 Pods-ProjectName。[debug | release]
进入你的目标,在Build Phases下你应该有三个新的阶段应命名为: Check Pods Manifest
, Embed Pods Frameworks
和复制Pod资源
制作一个干净的,然后构建,然后进入你的设备。
就是这样。
I've been reading all the issues about the error:
dyld: Library not loaded: @rpath/Bolts.framework/Bolts
Referenced from: /private/var/mobile/Containers/Bundle/Application/1542F906-CCE1-4181-AC7C-B5E3EE50E7D7/eBikeMotion.app/eBikeMotion
Reason: no suitable image found. Did find:
Which makes my application unable to run in a real device (but it runs without any problem in the simulator. Until certain point I thought that it was an issue with the frameworks I was installing, but after installing manually the original one that was throwing the error, Alamofire, and the next Framework throwing the error was the next one in alphabetical order (Bolts, as you can see in the code snippet) So I've reached the conclusion that is indeed CocoaPods which is producing these errors. I've got the last version (0.37) with a clean install, Iv'e tried to create a new project, I've tried all the proposed solutions to this issue without any luck, so I have to open an issue, with the hope that someone can help me.
Regards.
After reinstalling the whole system and don't finding a solution, I've found that some of the Build Phases mandatory for CocoaPods to run properly were missing.
The solution for this problem goes for the next steps:
sudo gem install cocoapods-deintegrate
). cocoapods-deintegrate on Github
Modify your Podfile:
You should define your target linking with link_with 'ProjectName'
.
You should define the target for your pods: target 'ProjectName' do
[pods here] end
.
Make an install with pod install
After doing this, go to XCode and check the following settings:
Into project settings, under "Configurations" check that in Debug and Release you've got a Configuration set named Pods-ProjectName.[debug|release]
Into your target, under "Build Phases" you should have three new phases that should be named: Check Pods Manifest
, Embed Pods Frameworks
and Copy Pods Resources
.
Make a clean, then build, then run into your device.
That's it.