amazon-archives / amazon-cognito-identity-js

Amazon Cognito Identity SDK for JavaScript
Other
984 stars 454 forks source link

Adds a podspec for CocoaPods support #644

Closed terribleben closed 6 years ago

terribleben commented 6 years ago

Motivation

react-native link now supports CocoaPods projects. If somebody wants to use the existing react-native link instructions to add Cognito to their CocoaPods-enabled project, it needs a podspec to link properly. This PR adds that podspec.

As a nice side effect, it also removes the need for those projects to depend on vendored JKBigInteger code, since it just expresses that library as a CocoaPods dependency.

How to test

Follow the Install for React Native instructions from this repo's README on an iOS project that uses CocoaPods. You'll need to use a copy of the JS that includes this change. You can also install manually by adding RNAWSCognito to the project's Podfile.

minbi commented 6 years ago

What does this imply for projects that are not using Cocoapods? Does this force the usage of pods?

terribleben commented 6 years ago

No, those projects will not be affected. react-native link will only use the newer CocoaPods behavior if the user's project contains a Podfile. So other projects which don't use CocoaPods can continue unchanged from their existing setup.