I was trying to run my iOS app on my iPhone. Project compiled nicely. But when app starts, XCode console showed:
dyld: Library not loaded: @rpath/Runes.framework/Runes
Referenced from: /private/var/mobile/Containers/Bundle/Application/CC8759F5-A501-400C-93A8-DCEE3BFE4770/XXX.app/XXX
Reason: Incompatible library version: XXX requires version 2.0.0 or later, but Runes provides version 1.0.0
I use Cocoapods and my Podfile looks like:
platform :ios, '8.0'
use_frameworks!
pod 'SnapKit', '~> 0.12.0'
pod 'Alamofire', '~> 1.2'
pod 'SwiftTask', '~> 3.3'
pod 'Argo'
pod 'Async', :git => 'https://github.com/duemunk/Async.git', :commit => '9e64046b767fe11010891f5b7fe2aed613a6ee55'
pod 'TapLabel', '0.0.3'
pod 'RealmSwift'
pod 'Kingfisher', '~> 1.4'
Everything works fine in simulators.
Seems like a bug according to http://stackoverflow.com/questions/31634407/incompatible-library-version-xxx-requires-version-2-0-0-or-later-but-runes-pro/31636313#31636313
I try to hack a little bit to fix this by going to each target in Pods project Linking -> Compatibility Version and change them to 1. Then when run I encountered
dyld: Library not loaded: @rpath/EmitterKit.framework/EmitterKit
Referenced from: /private/var/mobile/Containers/Bundle/Application/99E1622A-7F81-4DE7-A176-5A0D79D5CF61/Avetuc.app/Avetuc
Reason: image not found
Same problem here. Did you fix it?
I'm seeing the same issue since upgrading to Cocoapods 0.38.2. I wasn't seeing it on 0.37.2, which is what I upgraded from.
@alloy if you have some time, could you try archiving / running on device one of the artsy apps to look into this?
Same issue. I downgraded to Cocoapods 0.38.0 and all is well again.
Here is the response:
http://stackoverflow.com/questions/31634407/incompatible-library-version-xxx-requires-version-2-0-0-or-later-but-runes-pro
The bug fix seems related, but unfortunately same issue happens. I fixed it by changing Linking -> Compatibility Version to 1 for all pods.
But it is not working... When is calling in code , above framework, it is crashes.
Waiting for the update !
Just delete "Compatibility version" completely, leave it empty. Then everything works.
A simple script can be added to Podfile to automate this:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['DYLIB_COMPATIBILITY_VERSION'] = ''
end
end
end
Then clean your project and run pod install.
@pronebird 's solution removed the "Library not loaded ..." error for me; I went through each of the pod targets and removed any Compatibility Version set to something higher than 1 (libs with a setting lower than 1 didn't seem to have a problem), and the app launch made it further than before. But, then one of the libraries (SwiftyJSON) started a "Symbol not found ..." error. :disappointed:
I am having the same issue. Just upgrade to 0.38.2 and got this error message every time running on device.
I found a Japanese article to solve this problem by executing “Clean Build Folder” (Command-Option-Shift-K): http://fromatom.hatenablog.com/entry/2015/07/30/130850
+1 had the same issue. Deleting derived data folder fixed issue.
@nhart12 can you please tell me what is the derived data folder, I am also facing the same issue
@vineethvijayan follow this post
http://stackoverflow.com/questions/18933321/deleting-contents-from-xcode-derived-data-folder
After "Clean Build Folder", I run into
dyld: Library not loaded: @rpath/Pods.framework/Pods
Referenced from: /private/var/mobile/Containers/Bundle/Application/FBAF404E-882B-480A-91CA-2313E57A5184/XXXX.app/XXXX
Reason: image not found
@nhart12 +1 it works
@segiddins @mrackwitz Seeing as the whole compatibility version stuff in dylibs is largely just a failed thing anyways and not used by Apple afaik, maybe just revert this.
In my case, it works fine in the Debug and Release configuration, but not in the staging configuration I created. Same errors and everything regarding versions. When I run pod install, I get
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target
DinerotoPods/Target Support Files/Pods/Pods.staging.xcconfigor include thePods/Target Support Files/Pods/Pods.staging.xcconfigin your build configuration.[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target
DineroTeststoPods/Target Support Files/Pods/Pods.staging.xcconfigor include thePods/Target Support Files/Pods/Pods.staging.xcconfigin your build configuration.
@kurko: In your case, the warnings show you where the error is coming from. Those warnings need to be resolved. What do you see in Xcode as base configuration for staging?
@d6u:
After "Clean Build Folder", I run into
dyld: Library not loaded: @rpath/Pods.framework/Pods Referenced from: /private/var/mobile/Containers/Bundle/Application/FBAF404E-882B-480A-91CA-2313E57A5184/XXXX.app/XXXX Reason: image not found
The error you reported later doesn't come from this issue here. Something is causing that the aggregate targets product is tried to be loaded by dyld, which will always fail, because it isn't copied into the app as it is only used to allow Xcode to derive implicit dependencies. Can you check that the Pods.framework is weak linked in your project? It is shown in the project navigator in the "General" tab in the "Linked Frameworks and Libraries" section as column "Status", which should be Optional.
@mrackwitz Thanks. I forget to mention that I've already solved this issue using the same approach you mentioned.
@ymyzk that woked!
“Clean Build Folder” (Command-Option-Shift-K)
We no longer set the library / compatibility version.
Note: I updated my cocoapods version to the latest 0.39.0 and started seeing compatibility version errors saying the dependent frameworks to my framework were too old even though they are not. When doing a 'pod update' or 'pod install' I can see late enough versions are being installed, but when running my app I get a dyld error due to an "Incompatible library version".
Downgrading to 0.38.2 this problem goes away. I am still testing but I believe this is because my framework was built using version 0.38.2, but my end project I was using 0.39.0.
I think this is due to the above mention that the library / compatibility version are no longer being set.
To resolve this in 0.39.0 I needed to add to my Podfile to set the DYLIB_COMPATIBILITY_VERSION to a value above the framework's required version. I do not recommend this as a long term fix, but was able to get my project to run on simulator & device. I will post back once we rebuild our framework on the latest cocoapods version if this problem goes away, but I suspect this issue will be seen by a lot more people as we upgrade to 0.39.0.
Pod file update
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['DYLIB_COMPATIBILITY_VERSION'] = 'some_version_above_requirement'
end
end
end
Fix for me: remove use_frameworks! from podfile and ran again pod install
I can't fix this problem o.o!!
Most helpful comment
I can't fix this problem o.o!!