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

Đang mở
#18,980 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 4 ngày

@moosyroot đang làm issue này rồi.

Từ ngày 18/11/2026.

  • #18981 của @moosyroot — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
firebase, flutter, swift
Lĩnh vực
build-system, mobile

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Dart
Star
9.3k
Fork
4.1k
Merge trung bình
4 ngày 17 giờ
Pull request đã merge (30 ngày)
49

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của firebase/flutterfire

Tất cả issue của firebase/flutterfire

Issue tương tự

Thêm issue về Dart

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.