Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure currentUser is available upon startup #51

Merged
merged 3 commits into from
Feb 5, 2025

Conversation

Supereg
Copy link
Member

@Supereg Supereg commented Feb 4, 2025

Make sure currentUser is available upon startup

♻️ Current situation & Problem

We experience problems, where the Firebase currentUser was not directly available upon startup and therefore required busy-waiting approaches to make sure a firebase user is available on startup actions (e.g., see StanfordBDHG/PediatricAppleWatchStudy#83 (comment)).
Firebase v11.6.0 fixes this issue with firebase/firebase-ios-sdk#14141, making sure that the currentUser is available immediately. We raise the minimum required Firebase version to the latest one and updated our code comments.

⚙️ Release Notes

  • Fixed an issue where the user account might not be available immediately.
  • Raised minimum required Firebase SDK

📚 Documentation

Updated inline docs.

✅ Testing

Added UI test to verify that user account is available inside configure() if user is logged in.

📝 Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

@Supereg Supereg requested a review from PSchmiedmayer February 4, 2025 20:54
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.70%. Comparing base (5dd57f9) to head (c6f3565).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
- Coverage   68.72%   68.70%   -0.02%     
==========================================
  Files          19       19              
  Lines        1202     1201       -1     
==========================================
- Hits          826      825       -1     
  Misses        376      376              
Files with missing lines Coverage Δ
.../SpeziFirebaseAccount/FirebaseAccountService.swift 73.56% <100.00%> (-0.03%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5dd57f9...c6f3565. Read the comment docs.

Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for all the updates & adding the automated tests; looks great!

@PSchmiedmayer PSchmiedmayer added the enhancement New feature or request label Feb 5, 2025
@Supereg Supereg merged commit fde302d into main Feb 5, 2025
9 checks passed
@Supereg Supereg deleted the fix/current-user-availability branch February 5, 2025 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants