Conversation
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
…tionPriority feature for version 1.3.0
Addresses #169