IOS app forces login on app open every time

Once you close the app from the app tray and try to re-open the app it reloads the splashscreen and takes the user to the login page again.

Session length is set for 30 days, but it is not saving the current app user at all if the app is closed. Everything else works as expected and notifications work if the app is minimized and closed/removed from app tray.

Forked from this commit

Hello, @joe

In regards to the statement, I would like to clarify on a couple of things:

  • Does that mean that the log out happens directly after you close the app even if you just logged in a moment ago?

  • Is it also happening to every user, various devices?

    • Can you also share the environment that you are running on?
    • Mattermost Server version
    • Mattermost iOS app version
    • iOS version

Same here:

The app forces login after the app has terminated.

Mattermost Version: 5.36.1
Database Schema Version: 5.36.1
iOS 14.6
Xcode Project MM Version 1.45.0 build 362

Hi, @softmastx

Do you have any mobile device management configured for your mobile app? Also, does it happen every time you close the app (swiping up) and launching it again?

I would like to take that into consideration as well since I was unable to reproduce this issue on my end.

Hi, @ahmaddanial

It turned out that changing AppGroupIdentifier in Xcode was not reflected correctly for somehow!
So, manually edit the Info.plist for each target solved the problem.

I have raised this issue on GitHub and closed already.

Thanks

1 Like