[firebase_app_check]: iOS Swift package always embeds the closed-source reCAPTCHA Enterprise SDK, even when the app never uses AppleReCaptchaProvider

オープン
#18,980 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

@moosyroot がすでに取り組んでいます。

2026年11月18日 から。

  • #18981 @moosyroot による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
firebase, flutter, swift

調査の方向性

Start by comparing the iOS Package.swift dependency and target product links with the CocoaPods podspec; the issue identifies the reCAPTCHA Enterprise package and product. Read the linked change #18261 and the native Firebase SDK’s optional-linking behavior described in the issue. Done means apps using other Apple providers can build without the reCAPTCHA binary, while selecting AppleReCaptchaProvider without its SDK reports an error instead of crashing; an open pull request #18981 is already linked.

索引モデルが issue の本文から書いたものです。

説明

Needs Attention platform: ios plugin: app_check reproduced type: bug
Is there an existing issue for this?
  • I have searched the existing issues.
Which plugins are affected?

App Check

Which platforms are affected?

iOS

Description

Since #18261 the iOS Package.swift of firebase_app_check unconditionally depends on
https://github.com/GoogleCloudPlatform/recaptcha-enterprise-mobile-sdk.git and links its
RecaptchaEnterprise product into the plugin target:

.package(
  url: "https://github.com/GoogleCloudPlatform/recaptcha-enterprise-mobile-sdk.git",
  from: "18.0.0"
),
...
.product(name: "RecaptchaEnterprise", package: "recaptcha-enterprise-mobile-sdk"),

With Swift Package Manager (the default for iOS on current Flutter), every app that depends
on firebase_app_check therefore ships RecaptchaEnterpriseSDK.xcframework (a prebuilt,
closed-source binary downloaded from dl.google.com; 18.9.1 at the time of writing) inside
Runner.app/Frameworks, including apps that only activate AppleAppAttestProvider,
AppleDeviceCheckProvider or AppleDebugProvider.

The CocoaPods podspec does not add this SDK, so the two integrations behave differently,
and there is no way for an SPM app to opt out short of vendoring the plugin.

Why it matters for apps that do not use reCAPTCHA on iOS:

  • an extra closed-source binary, with its own privacy manifest and license terms, has to be
    reviewed and listed in the app's third-party notices;
  • larger app size;
  • App Store privacy disclosures may need to account for an SDK the app never calls.

The native Firebase SDK already treats the reCAPTCHA Enterprise SDK as optional:
FIRRecaptchaProvider checks at runtime whether RecaptchaEnterprise.RCARecaptcha is linked
(AppCheckRecaptchaProvider.isSupported() in google/app-check).

Reproducing the issue
  1. flutter create app && cd app && flutter pub add firebase_core firebase_app_check
  2. Activate App Check with providerApple: const AppleAppAttestProvider() only.
  3. flutter build ios --release --no-codesign
  4. find build/ios/Release-iphoneos/Runner.app -iname '*recaptcha*' lists
    Frameworks/RecaptchaEnterpriseSDK.framework.
Expected behavior (part of Description)

Apps that do not use AppleReCaptchaProvider can build without the reCAPTCHA Enterprise SDK,
e.g. through a build-time switch like FIREBASE_ANALYTICS_WITHOUT_ADID in
firebase_analytics.

Firebase Core version

5.1.0

Flutter Version

3.47.4

Relevant Log Output

Not applicable (build output, no runtime error).

Flutter dependencies

Paste flutter pub deps -- --style=compact from the minimal repro app when filing.

Additional context and comments

A related crash exists today on CocoaPods: selecting AppleReCaptchaProvider without adding
the RecaptchaEnterprise pod makes RecaptchaProvider(app:siteKey:) raise an Objective-C
NSInternalInconsistencyException from the plugin's configure, instead of reporting an
error. I can send a PR covering both.

主要言語
Dart
スター
9.3k
フォーク
4.1k
平均マージ
4日 17時間
マージ済み PR(30日)
49

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

firebase/flutterfire のほかの issue

firebase/flutterfire の issue をすべて見る

似ている issue

Dart の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。