Open BrooklinJazz opened 8 months ago
I tested cross-live_session
navigation and it works with the changes from #1226. However, unlike the web this should only be done from the root of the app with replace: true
. If done from a nested navigation route, the app will attempt to reconnect to the initial URL instead of the new one. Anything more complex gets tricky, because at that point you would probably need multiple LiveSessionCoordinator
s to manage the different sockets within a single navigation stack.
We could wait on aligning this until liveview-native-core
is handling navigation.
Acxcording to discussion with @carson-katri we have to implement this in core. FYI @simlay @bcardarella
What happened?
The navigation events currently disconnect the
LiveViewCoordinator
which manages a channel, but not theLiveSessionCoordinator
. which manages a socket.This means navigation functions such as
redirect/2
orpush_navigate/2
don't trigger the disconnected mount as they would normally be expected to.In addition to not matching the expected behaviour, I'm concerned this could lead to security issues. For example, I'd like to explore if the
:on_mount
for alive_session
group is triggered or not as normally usingpush_navigate/2
between differentlive_session
s would re-establish a socket connection. However this needs further exploration to determine if it's an issue or not.Library Version
main
Xcode Version
main
Swift Version
main
On which device or simulator are you running into the problem?
iPhone
Target Device Operating System Version
NA
Relevant log output
No response