Skip to content

FirebaseAppCheck ≥ 12.15.0 fails to compile via CocoaPods: 'GACRecaptchaProvider' does not exist in the AppCheckCore pod (reCAPTCHA provider is SPM-only) #16477

Description

@jayatech-jp

Description

Since 12.15.0, the FirebaseAppCheck podspec ships
FirebaseAppCheck/Sources/RecaptchaProvider/FIRRecaptchaProvider.m and
FIRRecaptchaProviderFactory.m (they are matched by the podspec's
source_files glob FirebaseAppCheck/Sources/**/*.[mh]).

These files reference GACRecaptchaProvider, which is implemented in the
AppCheckRecaptchaProvider Swift target of google/app-check — an
SPM-only module. The published AppCheckCore podspec only packages
AppCheckCore/Sources/**/*.[mh] (Objective-C only, no Swift sources), and
there is no AppCheckRecaptchaProvider pod.

As a result, the import chain in FIRRecaptchaProvider.m can never succeed
in a CocoaPods installation:

  • #if SWIFT_PACKAGE — false under CocoaPods
  • #elif __has_include(<AppCheckCore/AppCheckCore-Swift.h>) — never exists;
    the pod contains no Swift sources, so no -Swift.h is generated
    regardless of linkage (static libs, static frameworks, or dynamic)
  • #elif __has_include("AppCheckCore-Swift.h") — same

So GACRecaptchaProvider is an unknown symbol and any CocoaPods install
that compiles FirebaseAppCheck for iOS fails to build
.

Verified:

  • The unguarded references exist in tags CocoaPods-12.15.0 through
    CocoaPods-12.18.0 (latest). 12.14.0 is the last version that compiles
    (no RecaptchaProvider sources).
  • Latest published AppCheckCore is 11.3.1 (ObjC only); FirebaseAppCheck
    depends on 'AppCheckCore', '~> 11.3', so no resolvable combination works.
  • No other FirebaseAppCheck source references the FIRRecaptchaProvider
    classes, so excluding the two .m files from the target is a viable local
    workaround (which we are using).

Context: hit via react-native-firebase v26 with SPM opted out
($RNFirebaseDisableSPM = true), static libraries + use_modular_headers!.
This likely went unnoticed because RNFB v26 defaults to SPM, leaving the
CocoaPods path rarely exercised for App Check.

Possible fixes:

  1. Guard the RecaptchaProvider sources with __has_include so they
    compile to a no-op when the SPM module is unavailable, or
  2. Exclude RecaptchaProvider/* from the podspec source_files, or
  3. Publish the reCAPTCHA provider for CocoaPods (ship the Swift sources in
    AppCheckCore or as a new pod).

Reproducing the issue

No React Native required — a minimal CocoaPods project reproduces it:

  1. Podfile (static libraries, the CocoaPods default):

    platform :ios, '16.4'
    use_modular_headers!
    target 'App' do
    pod 'FirebaseAppCheck', '12.17.0'
    end

  2. pod install → resolves FirebaseAppCheck (12.17.0) + AppCheckCore (11.3.1)

  3. Build for an iOS target

  4. Compilation of FIRRecaptchaProvider.m fails

Firebase SDK Version

12.17.0 (also 12.15.0, 12.16.0, 12.18.0)

Xcode Version

26.6 (17F113)

Installation Method

CocoaPods

Firebase Product(s)

App Check

Targeted Platforms

iOS

Relevant Log Output

/Pods/FirebaseAppCheck/FirebaseAppCheck/Sources/RecaptchaProvider/FIRRecaptchaProvider.m:52:11: error: unknown receiver 'GACRecaptchaProvider'; did you mean 'FIRRecaptchaProvider'?
   52 |   return [GACRecaptchaProvider isSupported];
/Pods/FirebaseAppCheck/FirebaseAppCheck/Sources/RecaptchaProvider/FIRRecaptchaProvider.m:104:3: error: unknown type name 'GACRecaptchaProvider'; did you mean 'FIRRecaptchaProvider'?
  104 |   GACRecaptchaProvider *recaptchaProvider =
/Pods/FirebaseAppCheck/FirebaseAppCheck/Sources/RecaptchaProvider/FIRRecaptchaProvider.m:105:9: error: unknown receiver 'GACRecaptchaProvider'; did you mean 'FIRRecaptchaProvider'?
  105 |       [[GACRecaptchaProvider alloc] initWithSiteKey:siteKey
/Pods/FirebaseAppCheck/FirebaseAppCheck/Sources/RecaptchaProvider/FIRRecaptchaProvider.m:105:9: error: no visible @interface for 'FIRRecaptchaProvider' declares the selector 'initWithSiteKey:resourceName:APIKey:requestHooks:'

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Relevant excerpt (full lockfile not retained; CI build via Expo EAS):

  • AppCheckCore (11.3.1)
  • FirebaseAppCheck (12.17.0):
    • AppCheckCore (~> 11.3)
    • FirebaseAppCheckInterop (12.17.0)
    • FirebaseCore (12.17.0)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions