fix?(ios): Always connect socket onAppear - #1908
Open
KaylaBrady wants to merge 3 commits into
Open
Conversation
KaylaBrady
force-pushed
the
kb-shimmer-loading-again
branch
from
July 31, 2026 14:06
af1fecb to
83bb6ae
Compare
boringcactus
approved these changes
Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ticket: another pass at "infinite shimmer loading"
What is this PR for?
This attempts to fix the infinite shimmer issue by considering if there is some condition under which we don't call
socket.attachwhen the app is launched.Currently, we only call
socket.attachin anonChange(of: scenePhase). The swift docs say: "How you interpret the value depends on where it’s read from. If you read the phase from inside a View instance, you obtain a value that reflects the phase of the scene that contains the view." In my local testing, theContentViewalways went from inactive => active on launch which would trigger the socket to attach. The innerNearbyViewalways started out as active. What if there are some conditions under whichContentViewalways starts out as active?We previously called
socket.attachin both theonChangeandonAppear, but that was leading to some race conditions that caused crashes. That behavior has since changed and should be fixed in SwiftPhoenixClient.This also adds information about socket connection to the debug view so that if we continue to have reports of this issue we can see the socket status.
iOS
android
withContext(Dispatchers.Default)where possible (ideally in shared code)Testing
What testing have you done?