I\'ve been reading all the issues about the error:
dyld: Library not loaded: @rpath/Bolts.framework/Bolts
Referenced from: /private/var/mobile/Containers/Bun
In my case, I followed the above answer by @Jorge, but it didn't resolve the problem. The exact error was a bit different because the missing file was @rpath Pods.framework/Pods
. I finally resolved it with help from CocoaPods issue #3586:
Go to target > General > Linked Frameworks and Libraries section
set both Pods.framework and Pods_target.framework to Optional
.
Still trying to figure out exactly why.... this answer has some info: what-does-it-mean-to-weak-link-a-framework
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.
Had same issue adding pods to WatchKit Extension. Linking main target with Watch app is not the best option at all. Found out that cocoapod 0.37.2 hasn't added 'Embed Pods Frameworks' script into build phase.
Script:
"${SRCROOT}/Pods/Target Support Files/Pods-ExtensionName/Pods-ExtensionName-frameworks.sh"
I had to fix two issues:
Go to each target then Build Phases
then Link Binary With Libraries
and select Pods.framework
. Set it to Optional
.
Cocoapods did not create the needed run scripts for my second target. My first target had all scripts. The second not. So I copied all missing run scripts from the first to the second target. You need to tap on the small "+" sign on the top left, add a run script and paste the script from the other target. I've done that for Check Pods Manifest.lock
, Copy Pods Resources
and Embed Pods Frameworks
.
Then it did run on the device. Finally.
To Resolve this you need to change status in Link Binary with Libraries in build phase for pod_projectName.framework and Bolt.framework
I got the same error in my project.
get error in CommonCrypto.framework
Resolved error by changing Required to Optional
In order to have cocoapods generate the build phases Check Pods Manifest, Embed Pods Frameworks and Copy Pods Resources:
1 - Go to build phases and remove any custom modifications. I had to remove everything under the Link Binary With Libraries phase.
2 - Do a pod deintegrate (Or just remove the files yourself)
3 - Run a new pod install
This worked for me. Without the first step, it never did.