amazon-archives / aws-sdk-react-native

AWS SDK for React Native (developer preview)
Apache License 2.0
631 stars 68 forks source link

Cannot get AWSCore to import on iOS #60

Closed woodpav closed 7 years ago

woodpav commented 7 years ago

I cannot get it to build following the instructions in the guide in #35 .

I get the error #import <AWSCore/AWSCore.h> file not found.

screen shot 2017-06-14 at 11 27 06 am

I have AWSCore.framework in Libraries > Core.xcodeproj > Frameworks. Expanding it shows that it is empty (not sure if normal).

screen shot 2017-06-13 at 7 09 17 pm

I also have a AWSCore.framework listed directly below the Project. Expanding that also shows nothing.

It looks like the header search paths are working correctly because the file that is throwing the error is included from node_modules/aws-sdk-react-native-core/ios/Frameworks. Project build settings frameworks search paths has $(SRCROOT)/../node_modules/aws-sdk-react-native-core/ios/Frameworks.

Opening that folder in finder shows AWSCore.framework. Expanding that shows Modules and Versions.

Ive also got AWSCore.framework in Target > General > Embedded Libraries.

Any idea what could be going wrong?

Its worth noting that the Android build works.

woodpav commented 7 years ago

Yes! I figured it out!

TLDR: Use npm install not yarn add

Using yarn add aws-sdk-react-native-core-0.0.2.tgz breaks AWSCore.framework:

screen shot 2017-06-19 at 3 17 51 pm

Using npm install aws-sdk-react-native-core-0.0.2.tgz leaves AWSCore.framework as it should be:

screen shot 2017-06-19 at 3 16 47 pm