-
Notifications
You must be signed in to change notification settings - Fork 62
detail step-by-step guide #35
Comments
@chunghe Awesome I was able to build for iOS! Now I have some issue about how to use Cognito. I am trying to use the regular Cognito Provider to login a user. I use the method initWithOptions first with the region and pool id:
This code above throw an error (for some reason the double quotes are weird but that's the way I get it):
I cannot find any documentation about how to use the Cognito Provider unfortunately. |
there will be an error message if identity_pool_id format not correct
|
@chunghe Great job with the tutorial! |
@chunghe Bravo and thanks for sharing ;) |
For anyone who comes here and wonders how to make it work on android, I finally got the example working on android, using react-native 0.40. I followed the instructions from @chunghe and had to add one step to get the TransferUtility to work. The step by step is copied here to avoid confusion. CoreBuild aws-sdk-react-native-core
Install aws-sdk-react-native-core
At this point, you should be able to use the core utility on android just fine. TransferUtilityBuild aws-sdk-react-native-transfer-utility
Install aws-sdk-react-native-transfer-utility
<application
...
<service
android:name="com.amazonaws.mobileconnectors.s3.transferutility.TransferService"
android:enabled="true" />
...
</application> Now you should be able to run the example on android! |
@philberg - I couldn't get it to work past yarn add aws-sdk-react-native-core-0.0.2.tgz for android It fails at react-native link aws-sdk-react-native-core. I am using [email protected] |
@nkhinchi what error message are you seeing? |
initWithOptions(options) is failing because cognitoClient is undefined. Is anyone else having this problem?
And inside this function:
|
@xavicolomer ios or android? Did you re-compile the project after doing all the install steps? That is the only way I have seen that happen |
@chunghe I followed the guide here, it works fine on Android, but on IOS I get the following error in XCode In both places the error is in The error is here
and here
Any ideas what might be wrong? |
@BerndWessels You need to use an older version of the SDK. I got your error with 2.5+ version. http://sdk-for-ios.amazonwebservices.com/aws-ios-sdk-2.4.16.zip |
I followed all the steps you mentioned times but I still got the bellow error:
Any help is greatly appreciated. Tna k you very much in advance |
@chunghe - thank you very much for this guide! |
Small change:
to:
I thought I had to go do steps 2, 3 and 4 then do the steps in your guide. |
Anyone know how to fix a permission denied error during the build phase?
I used |
@chunghe I couldn't get it to work past "yarn add ../../aws-sdk-react-native/Core/aws-sdk-react-native-core-0.0.2.tgz" |
|
@jcollum thanks for your response. It's the same. react-native link also not works in the folder "Core". Maybe because it is not a react-native project? run-ios also not works |
you are in the wrong folder I bet; try running it from the folder that contains your package.json file |
@jcollum Ok thanks, so i should start "install aws-sdk-react-native " in the react folder where i want to install it. well that makes sense |
amazon-archives/aws-sdk-react-native#35 http://docs.aws.amazon.com/mobile/sdkforios/developerguide/setup.html Once react-native link is run, the iOS project is broken:
we should have a |
The official document of aws-sdk-react-native is too sparse and not easy to follow. I've been trying to set up the aws-sdk-react-native for two days. Finally it works! Here's the step-by-step guide for your reference.
I'm a web developer just step into native app development world. If there's anything wrong with following steps, please let me know. Thanks!
The guide should be able to fix #33, #24, #18, and #20.
build aws-sdk-react-native
you could skip this step and go ahead download form here.
git clone https://github.com/awslabs/aws-sdk-react-native.git
listener.addListener("LoginsRequestedEvent", async {callbackId} => {
to
listener.addListener("LoginsRequestedEvent", async ({callbackId}) => {
cd aws-sdk-react-native/Core
npm pack
install aws-sdk-react-native
yarn add ../../path/to/aws-sdk-react-native-core-0.0.2.tgz
react-native link aws-sdk-react-native-core
Then follow step2/step3/step4 of the official aws ios sdk guide.
With your project open in Xcode, select your Target. Under General tab, find Embedded Binaries and then click the + button.
Click the Add Other... button, navigate to the project_folder/node_modules/aws-sdk-react-native-core/ios/Frameworks/AWSCore.framework and select them. ( DO NOT check the Destination: Copy items if needed checkbox when prompted. it's already in the node_modules)
Under the Build Phases tab in your Target, click the + button on the top left and then select New Run Script Phase. Then setup the build phase as follows. Make sure this phase is below the Embed Frameworks phase.
Click on your main project file, select Build Settings, click 'Framework Search Paths', add
$(SRCROOT)/../node_modules/aws-sdk-react-native-core/ios/Frameworks
.The text was updated successfully, but these errors were encountered: