humhub / app

22 stars 8 forks source link

iOS: Cannot go back to opener #142

Closed luke- closed 10 months ago

luke- commented 12 months ago

Test 1

  1. Opened HumHub Site using opener

  2. Logged in

  3. Logged out

  4. Login Page appear instead of App Opener (No possibility to return to opener)

  5. Tried to restart iPhone no success.

    Test 2

  6. Deinstalled the App

  7. Restarted IPhone

  8. Reinstalled in Testflight

  9. Still not the opener appears, the previous selected HumHub site is still active

Any idea?

PrimozRatej commented 10 months ago

Hey @luke-

This behavior seems strange. I've tested it on the "community" instance and the "sometestproject12345" on Android, and it appears to work.

On IOS when I invoke the JavaScript from within the web view, the postMessage method triggers, and the listener registers as expected. The functionality also works from the mobile debug page (showOpener button).

However, there is an issue when calling it from the fcm-push module – the listener fails to trigger. My initial thought was that this request is not registered as a mobile app request. Even tho the debug page indicates that it is a mobile app request, the listener isn't responding.

It might be worth to check if the condition is met at the time of calling:

source

if (!static::isAppRequest()) {
    return;
}

Perhaps we could show a dialog for testing purposes to confirm whether this condition is true during execution.

luke- commented 10 months ago

@PrimozRatej Thanks for the tipp, indeed the problem is related to the isAppRequest detection.

I've added following new issues: