Add Swift Package Manager support to remaining Apple plugins - #496
Merged
Conversation
Migrate the native source layouts for desktop_keep_screen_on, desktop_lifecycle, fts5_simple, and ogg_opus_player while retaining CocoaPods compatibility. Package the existing native libraries as local binary targets for SwiftPM.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Swift Package Manager support for four Apple-platform plugins while preserving CocoaPods compatibility and updating bundled native libraries.
Changes:
- Adds standard SwiftPM manifests and source layouts.
- Packages Ogg/Opus and libsimple native binaries as XCFramework dependencies.
- Ignores SwiftPM-generated workspace metadata.
Reviewed changes
Copilot reviewed 24 out of 80 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.gitignore |
Ignores SwiftPM build metadata. |
packages/desktop_keep_screen_on/macos/desktop_keep_screen_on/Package.swift |
Adds the macOS Swift package. |
packages/desktop_keep_screen_on/macos/desktop_keep_screen_on/Sources/desktop_keep_screen_on/DesktopKeepScreenOnPlugin.swift |
Relocates the plugin implementation. |
packages/desktop_keep_screen_on/macos/desktop_keep_screen_on.podspec |
Updates the CocoaPods source path. |
packages/desktop_lifecycle/macos/desktop_lifecycle/Package.swift |
Adds the macOS Swift package. |
packages/desktop_lifecycle/macos/desktop_lifecycle/Sources/desktop_lifecycle/DesktopLifecyclePlugin.swift |
Relocates the lifecycle implementation. |
packages/desktop_lifecycle/macos/desktop_lifecycle.podspec |
Updates the CocoaPods source path. |
packages/fts5_simple/macos/fts5_simple/Package.swift |
Adds SwiftPM and libsimple targets. |
packages/fts5_simple/macos/fts5_simple/Sources/fts5_simple/Fts5SimplePlugin.swift |
Relocates the plugin class. |
packages/fts5_simple/macos/fts5_simple/Libs/README.md |
Documents libsimple provenance and assembly. |
packages/fts5_simple/macos/fts5_simple/Libs/libsimple.xcframework/Info.plist |
Describes the universal libsimple binary. |
packages/fts5_simple/macos/fts5_simple.podspec |
Updates CocoaPods sources and library path. |
packages/ogg_opus_player/pubspec.yaml |
Registers the Swift Darwin plugin directly. |
packages/ogg_opus_player/darwin/ogg_opus_player/Package.swift |
Defines shared Swift, C, and binary targets. |
packages/ogg_opus_player/darwin/ogg_opus_player.podspec |
Repoints CocoaPods to the shared layout. |
packages/ogg_opus_player/darwin/function.sh |
Outputs XCFrameworks in the package layout. |
packages/ogg_opus_player/darwin/Classes/OggOpusPlayerPlugin.m |
Removes the Objective-C registration shim. |
packages/ogg_opus_player/darwin/Classes/OggOpusPlayerPlugin.h |
Removes the Objective-C plugin declaration. |
packages/ogg_opus_player/darwin/Classes/ogg_opus_player.h |
Removes the empty legacy header. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player/SwiftOggOpusPlayerPlugin.swift |
Provides shared Darwin registration and channels. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player/OggOpusPlayer.swift |
Relocates playback functionality. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player/OggOpusRecorder.swift |
Relocates recording functionality. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player/OggOpusReader.swift |
Imports the SwiftPM C target. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player/OggOpusWriter.swift |
Imports the SwiftPM C target. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player/OggOpusSpeechTranscriber.swift |
Relocates speech transcription support. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player/AudioMetadata.swift |
Relocates recording metadata. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player/MixinServices/Queue.swift |
Relocates queue utilities. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player/MixinServices/Synchronized.swift |
Relocates synchronization utilities. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player/AudioSession/AudioSession.swift |
Relocates iOS audio-session management. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player/AudioSession/AudioSessionClient.swift |
Relocates the audio-session client protocol. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player/AudioSession/AudioSessionClientPriority.swift |
Relocates audio-session priorities. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player_c/opusenc_set_bitrate.c |
Adds a non-variadic bitrate wrapper. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player_c/include/ogg_opus_player_c/opusenc_set_bitrate.h |
Declares the bitrate wrapper. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player_c/include/ogg_opus_player_c/opusfile.h |
Uses package-local headers. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player_c/include/ogg_opus_player_c/opusenc.h |
Uses the package-local Opus header. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player_c/include/ogg_opus_player_c/opus_types.h |
Adds Opus type declarations. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player_c/include/ogg_opus_player_c/opus_projection.h |
Adds the Opus projection API. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player_c/include/ogg_opus_player_c/ogg.hh |
Uses the package-local Ogg type header. |
packages/ogg_opus_player/darwin/ogg_opus_player/Sources/ogg_opus_player_c/include/ogg_opus_player_c/ogg_os_types.h |
Adds portable Ogg type declarations. |
packages/ogg_opus_player/darwin/ogg_opus_player/Frameworks/libogg.xcframework/Info.plist |
Adds the universal macOS libogg slice. |
packages/ogg_opus_player/darwin/ogg_opus_player/Frameworks/libopus.xcframework/Info.plist |
Adds the universal macOS libopus slice. |
packages/ogg_opus_player/darwin/ogg_opus_player/Frameworks/libopusenc.xcframework/Info.plist |
Adds the universal macOS encoder slice. |
packages/ogg_opus_player/darwin/ogg_opus_player/Frameworks/libopusfile.xcframework/Info.plist |
Adds the universal macOS decoder slice. |
packages/ogg_opus_player/darwin/ogg_opus_player/Frameworks/libopusenc.xcframework/ios-arm64/Headers/opus/opusenc.h |
Adds device encoder headers. |
packages/ogg_opus_player/darwin/ogg_opus_player/Frameworks/libopusenc.xcframework/ios-arm64_x86_64-simulator/Headers/opus/opusenc.h |
Adds simulator encoder headers. |
packages/ogg_opus_player/darwin/ogg_opus_player/Frameworks/libopus.xcframework/ios-arm64/Headers/opus/opus_types.h |
Adds device Opus types. |
packages/ogg_opus_player/darwin/ogg_opus_player/Frameworks/libopus.xcframework/ios-arm64/Headers/opus/opus_projection.h |
Adds device projection headers. |
packages/ogg_opus_player/darwin/ogg_opus_player/Frameworks/libopus.xcframework/ios-arm64_x86_64-simulator/Headers/opus/opus_types.h |
Adds simulator Opus types. |
packages/ogg_opus_player/darwin/ogg_opus_player/Frameworks/libopus.xcframework/ios-arm64_x86_64-simulator/Headers/opus/opus_projection.h |
Adds simulator projection headers. |
packages/ogg_opus_player/darwin/ogg_opus_player/Frameworks/libogg.xcframework/ios-arm64/Headers/ogg/os_types.h |
Adds device Ogg platform types. |
packages/ogg_opus_player/darwin/ogg_opus_player/Frameworks/libogg.xcframework/ios-arm64/Headers/ogg/ogg.h |
Adds the device Ogg API. |
packages/ogg_opus_player/darwin/ogg_opus_player/Frameworks/libogg.xcframework/ios-arm64/Headers/ogg/config_types.h |
Adds device configured Ogg types. |
packages/ogg_opus_player/darwin/ogg_opus_player/Frameworks/libogg.xcframework/ios-arm64_x86_64-simulator/Headers/ogg/os_types.h |
Adds simulator Ogg platform types. |
packages/ogg_opus_player/darwin/ogg_opus_player/Frameworks/libogg.xcframework/ios-arm64_x86_64-simulator/Headers/ogg/ogg.h |
Adds the simulator Ogg API. |
packages/ogg_opus_player/darwin/ogg_opus_player/Frameworks/libogg.xcframework/ios-arm64_x86_64-simulator/Headers/ogg/config_types.h |
Adds simulator configured Ogg types. |
馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
desktop_keep_screen_on,desktop_lifecycle, andfts5_simpleon macOSogg_opus_player, including its C target and local binary targets for iOS and macOSfts5_simpleto the official libsimple v0.7.1 macOS release and combine its arm64 and x86_64 artifacts into a universal dylibThe audit also confirmed that
desktop_multi_windowalready gained macOS SwiftPM support in #482. However, pub.dev still serves 0.3.0 while the fix is in the unreleased 0.3.1 onmain, so publishing that version remains necessary for users affected by #494.Verification
Using Flutter 3.47.1:
ogg_opus_player: SwiftPM simulator debug build passedogg_opus_player: CocoaPods simulator debug build passedsimple_queryandsimple_highlightsqlite3_simple_initflutter testpassed fordesktop_lifecycle; the other three packages do not have test directoriesplutil -lintRelated to #494.