6

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?

Albert Bori
  • 9,832
  • 10
  • 51
  • 78

5 Answers5

4

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
Albert Bori
  • 9,832
  • 10
  • 51
  • 78
1

I fixed this by following the Framework install process detailed on http://docs.aws.amazon.com/mobile/sdkforios/developerguide/setup-aws-sdk-for-ios.html

It was the embedded binaries that I'd forgotten to do.

Damibu Ltd
  • 71
  • 3
  • It's a late answer, to a question that is already accepted. In this case add a little more supportive evidence or commentary as to why your solution might be superior to the others. You have pointed out a good common scenario where your answer definitely applies, so flesh it out with specific instructions on how to verify if the binaries have been included or not. – Chris Schaller Mar 24 '17 at 11:44
  • 1
    The best fix is as pointed by Damibu, you have to add the Embedded Binaries to the General Tab which can be seen by right clicking the project -> General Tab [enter image description here](https://i.stack.imgur.com/XfWCY.png) – Manjula Kasturi Apr 10 '17 at 04:22
1

I fixed this issue by unchecking 'Run script only when installing' which can be found under [CP] Embed Pods Frameworks in the Build Phases section of your project Targetsenter image description here

Markinson
  • 857
  • 1
  • 7
  • 13
0

Try deleting the Podfile.lock file and then do pod install.

Grimatoma
  • 36
  • 2
0

Make sure you have set path as below [![enter image description here][1]][1]

enter code here

Gurjinder Singh
  • 9,221
  • 1
  • 66
  • 58