Nikita,
This seems to be very close to resolved contrary to my earlier message we are still having some issues on an actual iPhone rather than the iPhone simulator. The iPhone simulator is keeping the users logged in session open when the app is closed as is expected. On the physical iPhone when the app is closed the user is logged out and must log in to the app again to restore a session.
Any thoughts? What can we provide to you to help troubleshoot this issue?
Regards,
Matt Olson
Hello, @Matt_Olson.
I cannot reproduce your issue in real device.
- Run app.
- Login and get token.
- Close app and get token again(successful).
Maybe i did something wrong?
Regards, Nikita.
We seem to have identified a discrepancy between building the app in release mode vs debug mode. Debug mode behaves properly however release mode on both android and apple are not working as intended(successfully resubmitting the token). The error we are getting is from the function “isValidLogin” the message we are receiving on iOS is PlatformException(3840, The data couldn’t be read because it isn’t in the correct format. null, null)
Hello, @Matt_Olson.
We are investigation this issue.
Regards, Nikita.
Hello, @Matt_Olson
I still cannot reproduce your issue. I attached the video with steps that I did.
RPReplay_Final1682519475.MP4.zip (7.2 MB)
Regards, Nikita.
sample.mov.zip (8.6 MB)
@Nikita_Fedorishchev Here is a sample of what our issue is looking like, would you be willing to share your code so we can compare to ours?
I cut off the first movie, attached is a little more extended version so you can see the behavior more than once.
sample2.mov.zip (9.6 MB)
login btn:
await Backendless.userService.login('hdhdhd@gmail.com', '123234', true);
Get data btn:
var user = await Backendless.userService.getCurrentUser();
isValid = await Backendless.userService.isValidLogin();
setState(() {
user_id = user != null ? user!.getObjectId() : null;
Backendless.userService
.getUserToken()
.then((value) => user_token = value);
});
We seem to have gotten to a good working state after refactoring some of our app initialization process. Testing so far has resulted in no session-dropping errors.
Thank you very much for your assistance with this! As always it is very much appreciated.
2 Likes