From the course: Learning AWS Amplify (2020)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

User authentication in the app

User authentication in the app - Amazon Web Services (AWS) Tutorial

From the course: Learning AWS Amplify (2020)

Start my 1-month free trial

User authentication in the app

- [Instructor] Okay, so our project's pretty much setup as far as the configuration goes, let's get to coding. So the first thing I want to do is initialize the mobile client. Remember that mobile client CocoaPod we included in there. Well, in the delegate I'm going to initialize that. So after line nine, under the import for UIKit, I'm going to import the AWSMobileClient. And then before the return true on line 19 I'm going to add a new line and this is where I'll initialize it. So I'll type AWSMobileClient.default to get the singleton, and call initialize. And there's a completionHandler, so I'll just hit return and I'll name the first parameter userState and the second one error, because I am creative like that. And we're just going to print these out, you might want to check for specific errors or do something different for the userState. But at this point there's really not much we want to do. So now we're going to do…

Contents