refactor(core,apple): migrate iOS/macOS plugin implementation to Swift - #18569
Conversation
Switch firebase_core from Pigeon objcOut to swiftOut and implement the HostApi in Swift. Custom auth domains now live on FLTFirebasePlugin so firebase_auth does not depend on the Core plugin class.
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
…ror conformance CocoaPods mixed Swift/ObjC builds require firebase_core/firebase_core.h, which the generated Swift overlay imports. Other Swift plugins inherit FlutterError: Error from firebase_core, so duplicate conformances are removed.
Description
Migrates
firebase_coreon iOS and macOS from the Pigeon Objective-C generator (objcOut) to Swift (swiftOut), matching recent plugin migrations such as Crashlytics.The HostApi implementation is now Swift (
FLTFirebaseCorePlugin), still registered aspluginClass: FLTFirebaseCorePlugin. Shared ObjC helpers (FLTFirebasePlugin/FLTFirebasePluginRegistry) stay ObjC in a separatefirebase_core_objcSPM target because SPM cannot mix Swift and ObjC in one target.FirebaseOptions.authDomainis not a native FirebaseApp field, so custom auth domains are stored onFLTFirebasePlugin(keyed by iOS app name) instead of the Core plugin class.firebase_authnow reads[FLTFirebasePlugin getCustomDomain:]and no longer importsFLTFirebaseCorePlugin.h.Android is unchanged in this PR (Java HostApi +
javaOutremain). A follow-up Kotlin PR will stack on this branch because both migrations editpigeons/messages.dart.Dart unit tests for
firebase_coreandfirebase_core_platform_interfacepassed locally. Native iOS/macOS builds andmelos run analyzewere not run in this change.Related Issues
None
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.yamland changelogs is not required.///).melos run analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?