Skip to content

Add SPM support#223

Merged
fotiDim merged 6 commits intomainfrom
Add-SPM-support
Apr 2, 2026
Merged

Add SPM support#223
fotiDim merged 6 commits intomainfrom
Add-SPM-support

Conversation

@fotiDim
Copy link
Copy Markdown
Contributor

@fotiDim fotiDim commented Mar 27, 2026

Addresses #169

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the Darwin implementation to support Swift Package Manager (SPM) by adding a Package.swift file and reorganizing source files into a standard SPM structure. It removes CocoaPods dependencies from the example projects, updates Xcode project configurations to integrate the new SPM-based plugin package, and bumps the minimum Flutter and Dart SDK versions. Additionally, the iOS AppDelegate was updated to support the FlutterImplicitEngineDelegate for plugin registration. I have no feedback to provide.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Swift Package Manager (SPM) support for the Darwin (iOS/macOS) side of the universal_ble Flutter plugin, along with example app project updates to use SwiftPM-generated plugin packages instead of CocoaPods.

Changes:

  • Raise Dart/Flutter minimum SDK constraints and update example lockfile accordingly.
  • Introduce a SwiftPM package for the Darwin plugin sources and relocate/generated Pigeon Swift output into the SwiftPM target.
  • Update iOS/macOS example Xcode projects/schemes to run Flutter “prepare” steps and remove CocoaPods integration artifacts (Podfiles, xcconfig includes, Pods frameworks).

Reviewed changes

Copilot reviewed 18 out of 28 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pubspec.yaml Bumps Dart/Flutter SDK minimums.
pigeon/universal_ble.dart Updates Pigeon swiftOut path to SwiftPM target sources.
example/pubspec.lock Updates resolved deps and SDK constraints for the example.
example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme Adds pre-build “prepare Flutter framework” action.
example/macos/Runner.xcodeproj/project.pbxproj Migrates macOS example project away from CocoaPods towards SwiftPM packages.
example/macos/Podfile Removed (CocoaPods no longer used by example).
example/macos/Podfile.lock Removed (CocoaPods no longer used by example).
example/macos/Flutter/Flutter-Debug.xcconfig Removes Pods xcconfig include.
example/macos/Flutter/Flutter-Release.xcconfig Removes Pods xcconfig include.
example/ios/Runner/Info.plist Reorders/adds keys (Bluetooth usage strings retained, scene manifest added).
example/ios/Runner/AppDelegate.swift Adjusts plugin registration for implicit engine initialization.
example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme Adds pre-build “prepare” action.
example/ios/Runner.xcodeproj/project.pbxproj Migrates iOS example project away from CocoaPods towards SwiftPM packages; bumps iOS target to 13.1.
example/ios/Podfile Removed (CocoaPods no longer used by example).
example/ios/Podfile.lock Removed (CocoaPods no longer used by example).
example/ios/Flutter/Debug.xcconfig Removes Pods xcconfig include.
example/ios/Flutter/Release.xcconfig Removes Pods xcconfig include.
example/ios/Flutter/AppFrameworkInfo.plist Removes MinimumOSVersion entry (now controlled via project settings).
darwin/universal_ble/Package.swift Adds SwiftPM manifest for the plugin’s shared Darwin sources.
darwin/universal_ble.podspec Points CocoaPods to SwiftPM source layout; updates Swift version.
darwin/universal_ble/Sources/universal_ble/UniversalBlePlugin.swift New CoreBluetooth-based implementation for iOS/macOS shared Darwin source.
darwin/universal_ble/Sources/universal_ble/UniversalBleAsyncServiceDiscovery.swift Adds async service/characteristic/descriptor discovery helper.
darwin/universal_ble/Sources/universal_ble/UniversalBleFilterUtil.swift Adds custom scan filtering utilities.
darwin/universal_ble/Sources/universal_ble/UniversalBleHelper.swift Adds enums/helpers and error mapping utilities.
darwin/universal_ble/Sources/universal_ble/UniversalBleLogger.swift Adds log level-based logger.
darwin/universal_ble/Sources/universal_ble/UniversalBle.g.swift Adds regenerated Pigeon Swift bindings in SwiftPM layout.
darwin/universal_ble/Sources/universal_ble/include/universal_ble/.gitkeep Creates include dir placeholder for SwiftPM header search path.
.gitignore Ignores SwiftPM build artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fotiDim fotiDim merged commit dde6c08 into main Apr 2, 2026
2 checks passed
@fotiDim fotiDim deleted the Add-SPM-support branch April 2, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants