Hi Guys,
Getting the following issue when running on device. Fine in simulator.
dyld: Library not loaded: @rpath/Pods.framework/Pods
Referenced from: /private/var/mobile/Containers/Bundle/Application/366AF813-0739-48B2-BF1D-5FA6E90A29CA/Fetch.app/Fetch
Reason: image not found
I've had a search and thought it may be related to #3505. I've reinstalled pods and have also ran the following as @kylef suggested in ticket #3505
$ gem install specific_install
$ gem specific_install CocoaPods/CocoaPods
$ pod install
Here's the Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '~> 1.2'
pod "SwiftyJSON", ">= 2.2"
Any help is appreciated!
EDIT: The error does appear on run in simulator but disappears and the app continues to work.
Dear Friend:
Check this please: http://stackoverflow.com/a/30166310
Thanks!!
Thanks for the link @gabri15. Sadly I get the same error with just the framework renamed to Pods_Fetch.framework
dyld: Library not loaded: @rpath/Pods_Fetch.framework/Pods_Fetch
Referenced from: /private/var/mobile/Containers/Bundle/Application/2FB24E88-3035-4B05-BB30-28D1F7494B62/Fetch.app/Fetch
Reason: image not found
Again, this works on Simulator.
Okay, fixed. The issue was the Pods.framework was set to required and not optional. It wasn't being copied to device by the .sh script and so the app crashed. Setting this to optional fixed the issue.
holy shit. it f*&%ing worked. @steve228uk Thank you!!!
Now I just have to go learn about required/optional frameworks on the device...
This fix doesn鈥檛 seem to work with iOS 9. Just putting this here in case other people come looking.
@mxcl I'm presuming that's because you're enabled bit code, and bit code doesn't allow weak-linked frameworks?
@segiddins my hero.
Indeed bit code had gotten enabled (the Xcode 7 upgrade thing must have done it), switching it off fixed this issue.
Serves me right for just clicking through the dialog without taking a look at what it was doing.
@segiddins Is there a workaround for bitcode? It's optional for iOS 9 but mandatory for watchOS and you can only assume it'll be mandatory with iOS 10.
@steve228uk we're still deciding the best approach to supporting bitcode, but keep in mind it's only been around for a week!
@segiddins Thanks a lot. Worked for me too!
It's not directly related to this, anyway I'm getting the same error on XCode 7.1 / tvOS 9.0 (13T5347l) and AppleTV DevelopmentKit:
dyld: Library not loaded: @rpath/ObjectiveLyricsTouchTV.framework/ObjectiveLyricsTouchTV
Referenced from: /var/mobile/Containers/Bundle/Application/DD87E506-BA2A-47E6-8772-CEE7E1B57FD4/AppTestbedTV.app/AppTestbedTV
Reason: image not found
In my case I add to add the Embedded TV OS Framework in both "Embedded Binaries" and "Linked Frameworks and Libraries" to get it on the real device (this does not happen on the AppleTV OS Simulator).
@steve228uk thanks a lot! Solved my problem as well :)
@steve228uk This bugged me the whole afternoon yesterday, I couldnt even sleep well last night.
Enable bit code, enable embedded swift code, and all those odd settings didn't work at all.
I don't really understand why, but switch required to desktop did the job!
Thank you so much
@DylanYasen I've removed the swearing from your post, we want to keep our issues family friendly.
@orta I'm so sorry. Got too excited.
:ok_hand: :+1:
I followed the suggestion here to set the linking of my Pods.frameworks file to 'Weak' in the Xcode project file. But it looks like a subsequent 'pod install' or 'pod update' command changes that back to 'Required'.
How do I specify in my Podfile to weak link instead of required?
@DylanYasen thanks
Summary for all suggestion
Finally I run it on my device!!
I came across a post on StackOverflow which seems to be solving the issue for me.
Basically it has you update your Podfile to use link_with
instead of target
. This fixed my issue, I am just hoping there aren't any unforeseen consequences with it.
Any solution for iOS 9 ?
I need to disable binary code due to google Analytics in my app.
@g0ld2k I came across that StackOverflow post as well and first tried to add link_with *mytarget*
to my Podfile. It fixed it for running directly from Xcode, but when we made a build with Jenkins it was still broken. I removed that and set my Pods.framework to Optional to fix it for good.
Settings my Pods.framework to Optional has fixed the issue in my current iOS 10 Beta 2 build.
Tried all these solutions but it did't work. The same project works in other Mac but doesn't work on mine. Any suggestions is highly appreciated.
I am using Xcode version 7.3.1 and iOS version 9.3.
Got the same problem. If I create another project with pod lib create something
, it will execute fine. However, if I remove old_bad_project
and create another one with pod lib create old_bad_project
, the newly created project will have the same problem.
I tried to reset the simulator without success.
It seems that the problem is related to the project name
Removing DerivedData solved the problem
rm -rf ~/Library/Developer/Xcode/DerivedData
@haifengkao This worked for me. It seemed that one pod would work and the other wouldn't.
I'm running Xcode 10 beta 5. Thanks for the help
I had the same problem trying to create an imessage extension. I solved it by adding the same pods for both targets, the extension and the main app.
For me it was because of the SSL issue, I had set my developer, distribution certificates to 'Always Trust' for one of my other project. I had to change them back to 'Use System Defaults'. This resolved the issue!!
@Gowdham88 Thanks this solution worked.
For the me Pods-*.debug generated file was missing some FRAMEWORK_SEARCH_PATHS.
Solve it by run:
pod deintegrate && pod install
I did not use Cocoapods. Switching the Framework from "Required" to "Optional" under Link Binary with Libraries worked, but I feared that meant I didn't actually have the library which would cause issues trying to use it. I added the frameworks under Embeded Frameworks, and it worked fine.
I got below error.
To resolve that error i changed pod_projectName.framework to optional from required. and also change CommonCrypto.framework to optional. and run on my device.
This is what i do on my Podfile to sort the bit-code thing (the architectures):
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
config.build_settings['VALID_ARCHS'] = '$(ARCHS_STANDARD)'
end
end
end
This problem is just on iOS 13.3.1.
You can't fix it, Just you have to downgrade to iOS 13.3 or wait for Xcode new update.
if you get this kind issues, please check those plugin dependencies from client packages JSON and add those into .xml file also so that you pod files get the auto-generates configs to your project
This problem is just on iOS 13.3.1.
You can't fix it, Just you have to downgrade to iOS 13.3 or wait for Xcode new update.
Really ? Arghh - Apple, come on.
This problem is just on iOS 13.3.1.
You can't fix it, Just you have to downgrade to iOS 13.3 or wait for Xcode new update.
Ok wow, after spending the whole morning-afternoon-night I see this.
Unreal - I'm also having this issue after stupidly updating to iOS 13.3.1 (facepalm) - I've been trying to downgrade - tried downloading the previous iOS version from > https://ipsw.me/iPhone8,1 - but as it's unsigned Apple won't let it happen. Any help would be greatly appreciated!?
Anyone found a solution for iOS 13.3.1 ?
I've managed to get mine working by buying an Apple Developer account. Luckily I was planning to anyway. It seems like for most people though, they've managed to fix by removing 'use_frameworks!' from your Podfile. Check out Wasa22's comment:
Removing use_framework
did not work for me. I was also planning to buy the apple developer account, maybe should just do that.
If you're using Swift, you still need modules, so the use_frameworks!
should be replaced with use_modular_headers!
If you're using Swift, you still need modules, so the
use_frameworks!
should be replaced withuse_modular_headers!
@paulb777 thank you sooooo much you saved my life. do you know what's the reason for this? I have been using use_frameworks!
all the time and I never see this error before when running on devices.
@jarvis-wu See the discussion above. It's a new issue with iOS 13.3.1
been banging my head against a wall for a couple of weeks myself. same problem. Hopefully it will be resolved soon.
iOS 13.3 is ok
If you're using Swift, you still need modules, so the
use_frameworks!
should be replaced withuse_modular_headers!
Works for me. Thank you!
Most helpful comment
holy shit. it f*&%ing worked. @steve228uk Thank you!!!

Now I just have to go learn about required/optional frameworks on the device...