[firebase_app_check]: iOS Swift package always embeds the closed-source reCAPTCHA Enterprise SDK, even when the app never uses AppleReCaptchaProvider
维护者通常 4 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 领域
- build-system, mobile
调研方向
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 内容生成。
描述
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
flutter create app && cd app && flutter pub add firebase_core firebase_app_check- Activate App Check with
providerApple: const AppleAppAttestProvider()only. flutter build ios --release --no-codesignfind 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 小时
- 30 天内合并 PR
- 49
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
firebase/flutterfire 的其他 Issue
-
[cloud_functions]: Apple platforms ignore custom domains passed as region可能已有人在做 @ragavendranbala-TSL 今天认领。 未关闭Needs Attention platform: ios platform: macos plugin: functions type: bug
难度 2/5 1-3 小时 新手友好度 78/100
firebase/flutterfire#19015 · 2 条评论 ·
维护者通常 4 天内回复
-
Needs Attention platform: android plugin: messaging type: bug
难度 4/5 3-5 天 新手友好度 45/100
firebase/flutterfire#19017 ·
维护者通常 4 天内回复
-
Needs Attention platform: web plugin: crashlytics type: enhancement
难度 5/5 一周以上 新手友好度 34/100
firebase/flutterfire#19014 · 1 条评论 ·
维护者通常 4 天内回复
-
[firebase_messaging]: Android getToken() errors lose their cause since firebase-messaging 25.1.0 ("FCM Registration failed!")可能已有人在做 @SelaseKay 于 3 天前认领。 未关闭Needs Attention platform: android plugin: messaging reproduced type: bug
难度 4/5 3-5 天 新手友好度 22/100
firebase/flutterfire#18997 · 1 条评论 ·
维护者通常 4 天内回复
-
[firebase_storage]: Windows: getData() crashes with access violation (use-after-free of StorageReference in ReferenceGetData)可能已有人在做 @SelaseKay 于 4 天前认领。 未关闭blocked: customer-response platform: windows plugin: storage type: bug type: crash
难度 4/5 3-5 天 新手友好度 35/100
firebase/flutterfire#18994 · 2 条评论 ·
维护者通常 4 天内回复
查看 firebase/flutterfire 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
Anxcye/anx-reader#1024 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
RevenueCat/purchases-flutter#2048 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
hajisensai/Fushi#4543 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
fix(backup): decisions.jsonl is exported but never merged on restore可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
laugustyniak/augustyniak-capture#477 ·
维护者通常 1 天内回复