build(mobile): link iOS plugins through Swift Package Manager (#9597)

## Summary

The iOS app stops opting out of Flutter's Swift Package Manager
integration. The 19 iOS plugins that ship a Swift package are now linked
through it. The three that don't (`google_mlkit_commons`,
`google_mlkit_selfie_segmentation` and `open_filex`) keep installing
through CocoaPods, which Flutter supports side by side.

Why now:

- CocoaPods is winding down: its spec repo [becomes read-only on
December 2, 2026](https://blog.cocoapods.org/CocoaPods-Specs-Repo/), and
plugin releases have started to ship as Swift packages only. Staying
opted out pins those plugins at their last CocoaPods release.
- The opt-out dates from the Flutter 3.47 upgrade (#8419), which kept
the existing CocoaPods integration. With it removed, the app builds and
runs as before.

What is in the diff:

- `pubspec.yaml`: the opt-out is removed.
- `project.pbxproj` and `Runner.xcscheme`: the edits Flutter's own tool
makes on the first build with the integration on (a local reference to
its generated plugin package, and a scheme pre-action that prepares the
Flutter framework). They are committed so a build does not dirty the
tree.
- `Podfile.lock`: only the three CocoaPods plugins and their
dependencies remain.

No Dart code, plugin version or remote Swift package changes. All 19
packages resolve to local paths in the pub cache, so `Package.resolved`
is untouched and builds fetch nothing new.

### Related issue

N/A. No existing issue or PR for this was found.

### Regressions

- **App behavior:** the same plugin code at the same versions. The 19
plugins are linked statically into the app binary instead of embedded as
dynamic frameworks, which leaves fewer libraries to load at launch and a
slightly smaller app (numbers below). One resource bundle is lost; see
the second accepted tradeoff.
- **Extensions:** the notification service extension links no plugins,
so it is unchanged.
- **Build and release:** CocoaPods is still required for the three
remaining plugins, so the Podfile, its post-install steps and the
release tooling are unchanged. The first build after this change spends
about 17 extra seconds adding the integration.
- **Accepted tradeoff, build warning:** Flutter now prints a warning
naming the three plugins without Swift packages. It goes away when those
plugins add support or are replaced.
- **Accepted tradeoff, one privacy manifest dropped:** the app no longer
bundles `app_badge_plus`'s privacy manifest, and Xcode prints `Invalid
Resource 'Resources': File not found` for it. Version 1.2.10's Swift
package looks for `Resources` under its source directory, but the
manifest sits at the package root, so the Swift package bundles nothing
where the podspec bundled it. This is harmless: that manifest declares
only UserDefaults access, and the plugin's single source file never
touches UserDefaults. The other 16 plugin privacy manifests are still in
the release app. Fixing it means a plugin bump, which is left out of
this PR.
- **Android:** unaffected.

### Validation

Unsigned release build, this branch against unmodified `main`:

| | `main` | This branch |
| --- | --- | --- |
| App size | 87.0 MB | 85.6 MB |
| Embedded frameworks | 31 | 12 |

Focused existing validation: the three iOS steps CI runs (simulator
debug build, the 116 native `RunnerTests`, and the unsigned release
build) pass locally.

Full-app run on an iOS 27 simulator (iPhone 17 Pro), driven by an agent,
with the debug build from this branch installed over an existing
signed-in install:

- The app stayed signed in and loaded its channel list and message
history (keychain, preferences and local storage plugins).
- Photo library picker, attaching a photo, and sending a video, which
uploaded and played back.
- Image viewer, the share sheet, and saving an image to Photos.
- The file picker, and the camera and microphone permission prompts.
- A link in a message opened in the browser, and a `buzz://` deep link
reached the app.

Two failures showed up and both reproduce identically on unmodified
`main` on the same simulator, so neither comes from this change: a
recorded voice note is empty because the host Mac has no microphone, and
saving an image adds it to Photos but then reports "Could not save
image".

Limits: no physical device run. Camera capture, QR scanning, selfie
segmentation and biometric prompts cannot be exercised on a simulator.
Voice note playback was not exercised.

Human testing is waived for this PR under the author's standing policy
for mobile changes; the agent-driven run above stands in for it.

Signed-off-by: Tom Brow <tomb@squareup.com>
Co-authored-by: Tom Brow <tomb@squareup.com>
Co-authored-by: judge <7615ec4b7ddf99f0bb48e913297f99f8f772d289a1c9ef54e1d906dd55a93ba8@buzz.block.builderlab.xyz>
This commit is contained in:
Tom Brow
2026-11-17 09:11:28 -08:00
committed by GitHub
parent 6b4a398829
commit 148585c804
4 changed files with 32 additions and 124 deletions

View File

@@ -1,20 +1,5 @@
PODS:
- app_badge_plus (1.2.10):
- Flutter
- app_links (6.4.1):
- Flutter
- audio_session (0.0.1):
- Flutter
- camera_avfoundation (0.0.1):
- Flutter
- connectivity_plus (0.0.1):
- Flutter
- file_selector_ios (0.0.1):
- Flutter
- Flutter (1.0.0)
- flutter_secure_storage_darwin (10.0.0):
- Flutter
- FlutterMacOS
- google_mlkit_commons (0.12.0):
- Flutter
- MLKitVision (~> 10.0.0)
@@ -45,14 +30,6 @@ PODS:
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- GTMSessionFetcher/Core (3.5.0)
- image_picker_ios (0.0.1):
- Flutter
- just_audio (0.0.1):
- Flutter
- FlutterMacOS
- local_auth_darwin (0.0.1):
- Flutter
- FlutterMacOS
- MLImage (1.0.0-beta8)
- MLKitCommon (14.0.0):
- GoogleDataTransport (~> 10.0)
@@ -75,9 +52,6 @@ PODS:
- MLKitXenoCommon (1.0.0-beta16):
- MLKitCommon (~> 14.0)
- MLKitVision (~> 10.0)
- mobile_scanner (7.0.0):
- Flutter
- FlutterMacOS
- nanopb (3.30910.0):
- nanopb/decode (= 3.30910.0)
- nanopb/encode (= 3.30910.0)
@@ -85,52 +59,13 @@ PODS:
- nanopb/encode (3.30910.0)
- open_filex (0.0.2):
- Flutter
- package_info_plus (0.4.5):
- Flutter
- photo_manager (3.11.0):
- Flutter
- FlutterMacOS
- PromisesObjC (2.4.0)
- record_ios (1.2.1):
- Flutter
- share_plus (0.0.1):
- Flutter
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- sqflite_darwin (0.0.4):
- Flutter
- FlutterMacOS
- url_launcher_ios (0.0.1):
- Flutter
- video_player_avfoundation (0.0.1):
- Flutter
- FlutterMacOS
DEPENDENCIES:
- app_badge_plus (from `.symlinks/plugins/app_badge_plus/ios`)
- app_links (from `.symlinks/plugins/app_links/ios`)
- audio_session (from `.symlinks/plugins/audio_session/ios`)
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- file_selector_ios (from `.symlinks/plugins/file_selector_ios/ios`)
- Flutter (from `Flutter`)
- flutter_secure_storage_darwin (from `.symlinks/plugins/flutter_secure_storage_darwin/darwin`)
- google_mlkit_commons (from `.symlinks/plugins/google_mlkit_commons/ios`)
- google_mlkit_selfie_segmentation (from `.symlinks/plugins/google_mlkit_selfie_segmentation/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- just_audio (from `.symlinks/plugins/just_audio/darwin`)
- local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`)
- mobile_scanner (from `.symlinks/plugins/mobile_scanner/darwin`)
- open_filex (from `.symlinks/plugins/open_filex/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- photo_manager (from `.symlinks/plugins/photo_manager/darwin`)
- record_ios (from `.symlinks/plugins/record_ios/ios`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
SPEC REPOS:
trunk:
@@ -149,62 +84,17 @@ SPEC REPOS:
- PromisesObjC
EXTERNAL SOURCES:
app_badge_plus:
:path: ".symlinks/plugins/app_badge_plus/ios"
app_links:
:path: ".symlinks/plugins/app_links/ios"
audio_session:
:path: ".symlinks/plugins/audio_session/ios"
camera_avfoundation:
:path: ".symlinks/plugins/camera_avfoundation/ios"
connectivity_plus:
:path: ".symlinks/plugins/connectivity_plus/ios"
file_selector_ios:
:path: ".symlinks/plugins/file_selector_ios/ios"
Flutter:
:path: Flutter
flutter_secure_storage_darwin:
:path: ".symlinks/plugins/flutter_secure_storage_darwin/darwin"
google_mlkit_commons:
:path: ".symlinks/plugins/google_mlkit_commons/ios"
google_mlkit_selfie_segmentation:
:path: ".symlinks/plugins/google_mlkit_selfie_segmentation/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
just_audio:
:path: ".symlinks/plugins/just_audio/darwin"
local_auth_darwin:
:path: ".symlinks/plugins/local_auth_darwin/darwin"
mobile_scanner:
:path: ".symlinks/plugins/mobile_scanner/darwin"
open_filex:
:path: ".symlinks/plugins/open_filex/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
photo_manager:
:path: ".symlinks/plugins/photo_manager/darwin"
record_ios:
:path: ".symlinks/plugins/record_ios/ios"
share_plus:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sqflite_darwin:
:path: ".symlinks/plugins/sqflite_darwin/darwin"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
video_player_avfoundation:
:path: ".symlinks/plugins/video_player_avfoundation/darwin"
SPEC CHECKSUMS:
app_badge_plus: 09939f19a075cc742cc155d8ed85e6d8601f0104
app_links: 3dbc685f76b1693c66a6d9dd1e9ab6f73d97dc0a
audio_session: 9bb7f6c970f21241b19f5a3658097ae459681ba0
camera_avfoundation: 968a9a5323c79a99c166ad9d7866bfd2047b5a9b
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
file_selector_ios: ec57ec07954363dd730b642e765e58f199bb621a
Flutter: 71a624a5bc0c04062bf19101d501e466baf2fb47
flutter_secure_storage_darwin: acdb3f316ed05a3e68f856e0353b133eec373a23
google_mlkit_commons: b4dfe2f6ae4cbf24010dc6640a28984d01343c86
google_mlkit_selfie_segmentation: 7fc41b3ef8ba238abf8dc76724da50e44de8aaf0
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
@@ -212,27 +102,15 @@ SPEC CHECKSUMS:
GoogleToolboxForMac: d1a2cbf009c453f4d6ded37c105e2f67a32206d8
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
image_picker_ios: e0ece4aa2a75771a7de3fa735d26d90817041326
just_audio: 4e391f57b79cad2b0674030a00453ca5ce817eed
local_auth_darwin: c3ee6cce0a8d56be34c8ccb66ba31f7f180aaebb
MLImage: 0de5c6c2bf9e93b80ef752e2797f0836f03b58c0
MLKitCommon: 47d47b50a031d00db62f1b0efe5a1d8b09a3b2e6
MLKitSegmentationCommon: f634fb3c20c1d8bace22a2c026bdaa0ca17613d9
MLKitSegmentationSelfie: 62371f35c33d49c3e7474443677b6a0c7ac9c98b
MLKitVision: 39a5a812db83c4a0794445088e567f3631c11961
MLKitXenoCommon: 1a4268c1222a6043047af5bb9435028206c63287
mobile_scanner: 9157936403f5a0644ca3779a38ff8404c5434a93
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
open_filex: 432f3cd11432da3e39f47fcc0df2b1603854eff1
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
photo_manager: 6ab48c2ce7ec21aa06d59e6cc049f0b6d9ba7f94
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
record_ios: 980fd386a97a35987d0fce3dfda4b26a38c90f4c
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b
video_player_avfoundation: dd410b52df6d2466a42d28550e33e4146928280a
PODFILE CHECKSUM: ed10001903303a0ae660957e1d727012a3136046

View File

@@ -72,6 +72,7 @@
AB1200022F40400100A17E01 /* NativeReactionDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB1200122F40400100A17E01 /* NativeReactionDetails.swift */; };
AB1200032F40400100A17E01 /* NativeMessageImageLoaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB1200132F40400100A17E01 /* NativeMessageImageLoaderTests.swift */; };
AB1200032F40400100A17E09 /* IdentityFilePluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB1200132F40400100A17E09 /* IdentityFilePluginTests.swift */; };
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -189,6 +190,7 @@
AB1200122F40400100A17E01 /* NativeReactionDetails.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativeReactionDetails.swift; sourceTree = "<group>"; };
AB1200132F40400100A17E01 /* NativeMessageImageLoaderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativeMessageImageLoaderTests.swift; sourceTree = "<group>"; };
AB1200132F40400100A17E09 /* IdentityFilePluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IdentityFilePluginTests.swift; sourceTree = "<group>"; };
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -212,6 +214,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
BZZ00000000000000000025 /* BuzzPushKit in Frameworks */,
33ADD70AB275E0EC81295559 /* Pods_Runner.framework in Frameworks */,
);
@@ -260,6 +263,7 @@
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
@@ -414,6 +418,7 @@
);
name = Runner;
packageProductDependencies = (
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
BZZ00000000000000000022 /* BuzzPushKit */,
);
productName = Runner;
@@ -473,6 +478,7 @@
);
mainGroup = 97C146E51CF9000F007C117D;
packageReferences = (
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
BZZ00000000000000000021 /* XCLocalSwiftPackageReference "BuzzPushKit" */,
);
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
@@ -719,6 +725,10 @@
isa = XCLocalSwiftPackageReference;
relativePath = BuzzPushKit;
};
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
};
/* End XCLocalSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
@@ -727,6 +737,10 @@
package = BZZ00000000000000000021 /* XCLocalSwiftPackageReference "BuzzPushKit" */;
productName = BuzzPushKit;
};
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
isa = XCSwiftPackageProductDependency;
productName = FlutterGeneratedPluginSwiftPackage;
};
/* End XCSwiftPackageProductDependency section */
/* Begin PBXVariantGroup section */

View File

@@ -5,6 +5,24 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<PreActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Prepare Flutter Framework Script"
scriptText = "/bin/sh &quot;$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh&quot; prepare&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Buzz.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
</ExecutionAction>
</PreActions>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"

View File

@@ -83,8 +83,6 @@ dev_dependencies:
video_player_platform_interface: ^6.6.0
flutter:
config:
enable-swift-package-manager: false
uses-material-design: true
shaders:
- shaders/toast_island.frag