You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We have recently updated our SDK to the latest version 2.36.3. We noticed that the initialize method is causing significant hanging on our app. This is significant for us as it is part of our logic in which we check if the user is logged in or not - in which we redirect the user either on our welcome screen or our main home screen. Note that the previous used version was a older version of this sdk 2.17.0. We have also tried to check this user state via currentUserState but the sdk must initialize before we can access this value. Similiar to this we also encounter speed changes to AWSMobileClient getTokens method.
To Reproduce
Steps to reproduce the behavior:
Update SDK Version from 2.17.0 to 2.36.3
Initialize mobileClient on didFinishLaunching(with options)
Observed Behavior
There is a 4-5 sec delay when the app is launched
Expected Behavior
The app should launch as soon as the LaunchScreen is dismissed
Code Snippet
let mobileClient = AWSMobileClient(configuration: APIConstants.AWSCredentials.mobileClientEndpoint)
func initializeUser(completion: @escaping GenericClosure) {
DispatchQueue.global(qos: .userInitiated).async {
mobileClient.initialize { (userState, _) in
if let userState = userState {
switch userState {
case .signedIn:
completion(true, "Success", nil)
default:
completion(false, "Failed", nil)
}
} else {
completion(false, "Failed", nil)
}
}
}
}
Areas of the SDK you are using (AWSMobileClient, Cognito, Pinpoint, IoT, etc)?
AWSMobileClient
Screenshots
If applicable, add screenshots to help explain your problem.
Environment(please complete the following information):
SDK Version: 2.36.3
Dependency Manager: CocoaPods
Swift Version : 4.0
Xcode Version: 15.4
Device Information (please complete the following information):
Device: iPhone 14 Plus
iOS Version: 17.5.1
Specific to simulators:
All devices are being effected
The text was updated successfully, but these errors were encountered:
Thank you for posting the issue - could you please share verbose logs with sensitive information removed and reproduction steps? Have you made any changes to your backend resources recently? Which region is the cognito resource located in and from which region is it accessed?
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
We have recently updated our SDK to the latest version 2.36.3. We noticed that the initialize method is causing significant hanging on our app. This is significant for us as it is part of our logic in which we check if the user is logged in or not - in which we redirect the user either on our welcome screen or our main home screen. Note that the previous used version was a older version of this sdk 2.17.0. We have also tried to check this user state via currentUserState but the sdk must initialize before we can access this value. Similiar to this we also encounter speed changes to AWSMobileClient getTokens method.
To Reproduce
Steps to reproduce the behavior:
Observed Behavior
Expected Behavior
Code Snippet
Areas of the SDK you are using (AWSMobileClient, Cognito, Pinpoint, IoT, etc)?
Screenshots
If applicable, add screenshots to help explain your problem.
Environment(please complete the following information):
Device Information (please complete the following information):
The text was updated successfully, but these errors were encountered: