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

fix(core): auth Swift support requires FLTFirebaseCorePlugin & messages to be shared #16774

Merged
merged 8 commits into from
Dec 4, 2024

Conversation

russellwheatley
Copy link
Member

@russellwheatley russellwheatley commented Nov 26, 2024

Description

I've been testing this on my own copy of FlutterFire. You can see all iterations of this here: russellwheatley/test-flutterfire@5e6f02c...88b09c9

Changes made

  • Moved (symlinked) all firebase core to root Sources/ directory for SPM. Necessary as firebase auth requires FLTFirebaseCorePlugin to be shared which, in turn, requires the last remaining class (and header file) in core which is messages.g.m.
  • Created dummy classes for firebase_core as it now has no files (because they are contained within shared firebase core in Sources/) when building on SPM and will throw an exception without any files.
  • Updated script for writing txt files in each plugin that has swift support to also update Package.swift file in root with latest firebase_core version and firebase-ios-sdk version.

Unfortunately - swift integration tests won't work until this is merged and release is cut which versions firebase core shared for SPM.

I used the dependency from my own FlutterFire version of this change to use for cloud_firestore example app, and it built successfully:

  example git:(update-core-spm) ✗ flutter run
Resolving dependencies... 
Downloading packages... 
! _flutterfire_internals 1.3.46 from path ../../../_flutterfire_internals (overridden in ./pubspec_overrides.yaml)
  async 2.11.0 (2.12.0 available)
  boolean_selector 2.1.1 (2.1.2 available)
  characters 1.3.0 (1.3.1 available)
  clock 1.1.1 (1.1.2 available)
! cloud_firestore 5.5.0 from path .. (overridden in ./pubspec_overrides.yaml)
! cloud_firestore_platform_interface 6.5.0 from path ../../cloud_firestore_platform_interface (overridden in ./pubspec_overrides.yaml)
! cloud_firestore_web 4.3.4 from path ../../cloud_firestore_web (overridden in ./pubspec_overrides.yaml)
  collection 1.19.0 (1.19.1 available)
  fake_async 1.3.1 (1.3.2 available)
  file 7.0.0 (7.0.1 available)
! firebase_core 3.8.0 from path ../../../firebase_core/firebase_core (overridden in ./pubspec_overrides.yaml)
! firebase_core_platform_interface 5.3.0 from path ../../../firebase_core/firebase_core_platform_interface (overridden in ./pubspec_overrides.yaml)
! firebase_core_web 2.18.1 from path ../../../firebase_core/firebase_core_web (overridden in ./pubspec_overrides.yaml)
  leak_tracker 10.0.7 (10.0.8 available)
  leak_tracker_flutter_testing 3.0.8 (3.0.9 available)
  matcher 0.12.16+1 (0.12.17 available)
  material_color_utilities 0.11.1 (0.12.0 available)
  meta 1.15.0 (1.16.0 available)
  path 1.9.0 (1.9.1 available)
  platform 3.1.5 (3.1.6 available)
  process 5.0.2 (5.0.3 available)
  string_scanner 1.3.0 (1.4.0 available)
  test_api 0.7.3 (0.7.4 available)
  vm_service 14.3.0 (15.0.0 available)
Got dependencies!
18 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Launching lib/main.dart on iPhone 15 in debug mode...
Warning: Missing build name (CFBundleShortVersionString).
Warning: Missing build number (CFBundleVersion).
Action Required: You must set a build name and number in the pubspec.yaml file version field before submitting to the App
Store.
Running Xcode build...                                                  
 └─Compiling, linking and signing...                        11.7s
Xcode build done.                                           53.9s
Syncing files to device iPhone 15...                               103ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on iPhone 15 is available at: http://127.0.0.1:51001/6xezxRyk0Y8=/
The Flutter DevTools debugger and profiler on iPhone 15 is available at:
http://127.0.0.1:9102?uri=http://127.0.0.1:51001/6xezxRyk0Y8=/

Related Issues

Replace this paragraph with a list of issues related to this PR from the issue database. Indicate, which of these issues are resolved or fixed by this PR. Note that you'll have to prefix the issue numbers with flutter/flutter#.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

@russellwheatley russellwheatley changed the title fix(core): auth also requires FLTFirebaseCorePlugin to be shared fix(core): auth Swift support requires FLTFirebaseCorePlugin to be shared Nov 26, 2024
@russellwheatley russellwheatley changed the title fix(core): auth Swift support requires FLTFirebaseCorePlugin to be shared fix(core): auth Swift support requires FLTFirebaseCorePlugin & messages to be shared Dec 4, 2024
@russellwheatley russellwheatley merged commit ba5f241 into main Dec 4, 2024
30 of 33 checks passed
@russellwheatley russellwheatley deleted the update-core-spm branch December 4, 2024 14:54
Lyokone pushed a commit that referenced this pull request Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants