Closed JesusMartinAlonso closed 4 years ago
Hi @JesusMartinAlonso Did you call AWSMobileClient.default().initialize
? As shown here you need to call initialize
after init.
_ = AWSMobileClient.init(configuration: awsconfigurationDictionary)
AWSMobileClient.default().initialize { (userState, error) in
// initialization logic
}
Please let us know if this fixes the issue.
Yes. It seems to work well. Thank you!
Describe the bug I'm using the new initializer released in 2.11.0 (https://github.com/aws-amplify/aws-sdk-ios/releases/tag/2.11.0). The app seems to work properly (users can sign in) but if the app is closed and reopened again, the user is not signed in (
AWSMobileClient.default().isSignedIn
returnsfalse
). However, I expect to be trueTo Reproduce Steps to reproduce the behavior:
didFinishLaunchingWithOptions
method initializeAWSMobileClient
using new initializer:Sign in with an user using cognito user pools:
AWSMobileClient.default().signIn(username: username, password: password)
Close app
Reopen app, and call
AWSMobileClient.default().isSignedIn
. This returnsfalse
but I expecttrue
Which AWS service(s) are affected?
Cognito, AWSAmplify
Expected behavior I expect user to be signed in after closing and reopening the app
Environment(please complete the following information):
Device Information (please complete the following information):