Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Runtime error: dyld: Library not loaded: @rpath/AWSCore.framework/AWSCore

I'm using AWS Mobile Analytics for iOS (2.2.3). After running pod update, I'm getting the following error when trying to run MyApp on a physical device:

dyld: Library not loaded: @rpath/AWSCore.framework/AWSCore Referenced from: /private/var/mobile/Containers/Bundle/Application/4582B679-A162-47CE-80ED-58C8B9BB231B/MyApp.app/MyApp Reason: Incompatible library version: MyApp requires version 2.0.0 or later, but AWSCore provides version 1.0.0

My cocoapods pod file entry for the AWS Mobile Analytics library is:

pod 'AWSMobileAnalytics'

I've tried decrementing the AWSMobileAnalytics version (pod 'AWSMobileAnalytics', '2.2.2'), but I still get the same error. Does anyone know how to get around this?

like image 293
Albert Bori Avatar asked Aug 13 '15 23:08

Albert Bori


1 Answers

I cleared the DerivedData folder (/Users/me/Library/Developer/Xcode/DerivedData/), then rebuilt the app, and it worked.

Edit

I got this error again when attempting to add a new primary target to my project. I would get the same error as above when defining the Podfile as such:

target 'MainTarget' do
    pod 'MyCocoapod'
    target 'SecondMainTarget' do
        inherit! :search_paths
    end
end

To fix this, I had to define the Podfile like this:

def my_pods
    pod 'MyCocoapod'
end

target 'MainTarget' do
    my_pods
end

target 'SecondMainTarget' do
    my_pods
end
like image 133
Albert Bori Avatar answered Oct 10 '22 02:10

Albert Bori