Skip to content

[firebase_auth]: iOS build fails with 'Undefined symbol: _OBJC_CLASS_' when using firebase_auth 6.1.3 #17934

@mandogtent

Description

@mandogtent

Title: iOS build fails with "Undefined symbol: OBJC_CLASS$_FLTFirebaseAuthPlugin" when using firebase_auth 6.1.3

Repository: FirebaseExtended/flutterfire (firebase_auth package)

Summary

Building iOS with firebase_auth 6.1.3 causes a Release link failure: the app fails to link because the Objective-C class FLTFirebaseAuthPlugin is undefined. Pinning firebase_auth to 6.1.2 resolves the issue and a Release build succeeds.

Reproduction steps

  1. Set firebase_auth: ^6.1.3 in pubspec.yaml (or upgrade to 6.1.3).
  2. flutter clean
  3. flutter pub get
  4. cd ios && pod install --repo-update
  5. xcodebuild -workspace Runner.xcworkspace -scheme Runner -configuration Release -destination 'generic/platform=iOS' clean build CODE_SIGNING_ALLOWED=NO CODE_SIGNING_IDENTITY="" CODE_SIGNING_REQUIRED=NO

Observed

Linker fails with:

Undefined symbols for architecture arm64:
"OBJC_CLASS$_FLTFirebaseAuthPlugin", referenced from:
in GeneratedPluginRegistrant.o
_OBJC$CATEGORY_FLTFirebaseAuthPlugin$_ASPresentation in firebase_auth6
ld: symbol(s) not found for architecture arm64

Diagnosis / Evidence

  • The built firebase_auth.framework binary contains Pigeon- and API-related symbols but the Objective-C class symbol for FLTFirebaseAuthPlugin is not exported.
    • Example inspection:
      • strings on firebase_auth.framework shows occurrences of FLTFirebaseAuthPlugin and source file paths, but nm -gU on the same binary does not show _OBJC_CLASS_$_FLTFirebaseAuthPlugin.
  • In the 6.1.3 package, + (void)registerWithRegistrar: appears to be present in the macOS implementation but not in the compiled iOS sources that end up in the framework (the iOS source contains only an ASPresentation category stub in the failing version).
  • Temporary workaround confirmed: pinning firebase_auth to 6.1.2 then running pod install and a Release xcodebuild yields BUILD SUCCEEDED.

Files/paths referenced

  • ios/Runner/GeneratedPluginRegistrant.m references FLTFirebaseAuthPlugin:
    • [FLTFirebaseAuthPlugin registerWithRegistrar:...]
  • Plugin source locations (in my environment):
    • .pub-cache/hosted/pub.dev/firebase_auth-6.1.3/ios/firebase_auth/Sources/firebase_auth/FLTFirebaseAuthPlugin.m (contains ASPresentation category only)
    • .pub-cache/hosted/pub.dev/firebase_auth-6.1.3/macos/firebase_auth/Sources/firebase_auth/FLTFirebaseAuthPlugin.m (contains +registerWithRegistrar: implementation)
  • Derived products inspected:
    • ~/Library/Developer/Xcode/DerivedData/.../Build/Products/Release-iphoneos/firebase_auth/firebase_auth.framework
    • xcodebuild log: see local xcodebuild.log captured during reproduction

Suggested fixes

  • Ensure + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar is implemented and compiled into the iOS target of firebase_auth 6.1.3 (or publish a patch release that restores the iOS registration symbol).
  • Optionally add a unit or CI check that builds an iOS Release to detect regressions where the plugin registration symbol is missing.

Temporary workaround

Pin firebase_auth to 6.1.2 in pubspec.yaml and run flutter pub get, then cd ios && pod install --repo-update. This resolves the linker failure.

Additional notes

  • CocoaPods in my build emitted a note about base configuration but this did not cause the linker failure; the missing symbol is the root cause.

Logs & artifacts

  • I can provide the full xcodebuild.log, nm and strings outputs on request or attach them to the issue.

--
I can open this issue on GitHub if you want — I used this repro locally and pinned the plugin to 6.1.2 as a temporary fix (commit: chore(iOS): pin firebase_auth to 6.1.2 to avoid iOS linker regression).

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked: customer-responseWaiting for customer response, e.g. more information was requested.platform: iosIssues / PRs which are specifically for iOS.plugin: authtype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions