From e3382927d1e90d0a42e1ff777b469aad2bfcdba2 Mon Sep 17 00:00:00 2001 From: Sebastian Roth Date: Thu, 31 Jul 2025 21:46:19 +0100 Subject: [PATCH 1/5] feat: restructure iOS plugin for SPM compatibility - Phase 1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Create SPM-compliant directory structure: Sources/workmanager_apple/ - Move all Swift files from Classes/ to Sources/workmanager_apple/ - Preserve pigeon subdirectory structure - Update podspec to reference new file locations: Sources/workmanager_apple/**/* - Update Pigeon configuration to generate Swift files in new location - Add comprehensive SPM migration plan documentation ✅ Verified: CocoaPods builds successfully with new structure ✅ Backward compatibility: No breaking changes for existing users This prepares the foundation for Swift Package Manager support while maintaining full CocoaPods compatibility. --- SPM_MIGRATION_PLAN.md | 182 ++++++++++++++++++ example/ios/Podfile.lock | 2 +- .../BackgroundTaskOperation.swift | 0 .../workmanager_apple}/BackgroundWorker.swift | 0 .../workmanager_apple}/Extensions.swift | 0 .../LoggingDebugHandler.swift | 0 .../NotificationDebugHandler.swift | 0 .../workmanager_apple}/SimpleLogger.swift | 0 .../ThumbnailGenerator.swift | 0 .../UserDefaultsHelper.swift | 0 .../workmanager_apple}/WMPError.swift | 0 .../WorkmanagerDebugHandler.swift | 0 .../WorkmanagerPlugin.swift | 0 .../pigeon/WorkmanagerApi.g.swift | 0 .../ios/workmanager_apple.podspec | 2 +- .../pigeons/workmanager_api.dart | 2 +- 16 files changed, 185 insertions(+), 3 deletions(-) create mode 100644 SPM_MIGRATION_PLAN.md rename workmanager_apple/ios/{Classes => Sources/workmanager_apple}/BackgroundTaskOperation.swift (100%) rename workmanager_apple/ios/{Classes => Sources/workmanager_apple}/BackgroundWorker.swift (100%) rename workmanager_apple/ios/{Classes => Sources/workmanager_apple}/Extensions.swift (100%) rename workmanager_apple/ios/{Classes => Sources/workmanager_apple}/LoggingDebugHandler.swift (100%) rename workmanager_apple/ios/{Classes => Sources/workmanager_apple}/NotificationDebugHandler.swift (100%) rename workmanager_apple/ios/{Classes => Sources/workmanager_apple}/SimpleLogger.swift (100%) rename workmanager_apple/ios/{Classes => Sources/workmanager_apple}/ThumbnailGenerator.swift (100%) rename workmanager_apple/ios/{Classes => Sources/workmanager_apple}/UserDefaultsHelper.swift (100%) rename workmanager_apple/ios/{Classes => Sources/workmanager_apple}/WMPError.swift (100%) rename workmanager_apple/ios/{Classes => Sources/workmanager_apple}/WorkmanagerDebugHandler.swift (100%) rename workmanager_apple/ios/{Classes => Sources/workmanager_apple}/WorkmanagerPlugin.swift (100%) rename workmanager_apple/ios/{Classes => Sources/workmanager_apple}/pigeon/WorkmanagerApi.g.swift (100%) diff --git a/SPM_MIGRATION_PLAN.md b/SPM_MIGRATION_PLAN.md new file mode 100644 index 00000000..f523c325 --- /dev/null +++ b/SPM_MIGRATION_PLAN.md @@ -0,0 +1,182 @@ +# Swift Package Manager Migration Plan + +## Overview +Migrate `workmanager_apple` plugin to support Swift Package Manager (SPM) while maintaining full CocoaPods backward compatibility. + +## Current Structure Analysis +``` +workmanager_apple/ios/ +├── Assets/ +├── Classes/ +│ ├── BackgroundTaskOperation.swift +│ ├── BackgroundWorker.swift +│ ├── Extensions.swift +│ ├── LoggingDebugHandler.swift +│ ├── NotificationDebugHandler.swift +│ ├── SimpleLogger.swift +│ ├── ThumbnailGenerator.swift +│ ├── UserDefaultsHelper.swift +│ ├── WMPError.swift +│ ├── WorkmanagerDebugHandler.swift +│ ├── WorkmanagerPlugin.swift +│ └── pigeon/ +│ └── WorkmanagerApi.g.swift +├── Resources/ +│ └── PrivacyInfo.xcprivacy +└── workmanager_apple.podspec +``` + +## Migration Strategy + +### Phase 1: SPM Structure Setup +1. Create `workmanager_apple/ios/Package.swift` +2. Create new directory structure: + ``` + workmanager_apple/ios/ + ├── Sources/ + │ └── workmanager_apple/ + │ ├── include/ + │ │ └── workmanager_apple-umbrella.h (if needed) + │ └── [all .swift files moved here] + └── Resources/ + └── PrivacyInfo.xcprivacy + ``` + +### Phase 2: File Migration +- **Move Swift files** from `Classes/` to `Sources/workmanager_apple/` +- **Preserve pigeon structure** as `Sources/workmanager_apple/pigeon/` +- **Update import statements** if needed +- **Handle resources** - PrivacyInfo.xcprivacy + +### Phase 3: Configuration Files +- **Create Package.swift** with proper target definitions +- **Update podspec** to reference new file locations +- **Maintain backward compatibility** for CocoaPods users + +### Phase 4: Testing Strategy +- **Dual build testing** in GitHub Actions +- **CocoaPods build**: Test existing workflow +- **SPM build**: New workflow for SPM validation +- **Example app testing**: Both dependency managers + +## Implementation Details + +### Package.swift Configuration +```swift +// swift-tools-version: 5.9 +import PackageDescription + +let package = Package( + name: "workmanager_apple", + platforms: [ + .iOS(.v14) + ], + products: [ + .library(name: "workmanager_apple", targets: ["workmanager_apple"]) + ], + targets: [ + .target( + name: "workmanager_apple", + resources: [.process("Resources")] + ) + ] +) +``` + +### GitHub Actions Strategy + +**Matrix Strategy using Flutter SPM configuration:** +- **CocoaPods Build**: `flutter config --no-enable-swift-package-manager` + build +- **SPM Build**: `flutter config --enable-swift-package-manager` + build + +**Key Features:** +1. **Flutter-native approach**: Use `flutter config` flags to switch dependency managers +2. **Simple validation**: Does example app build and run with both configurations? +3. **Matrix builds**: Test both `--enable-swift-package-manager` and `--no-enable-swift-package-manager` + +**GitHub Actions Matrix:** +```yaml +strategy: + matrix: + spm_enabled: [true, false] + include: + - spm_enabled: true + config_cmd: "flutter config --enable-swift-package-manager" + name: "SPM" + - spm_enabled: false + config_cmd: "flutter config --no-enable-swift-package-manager" + name: "CocoaPods" +``` + +## Risk Mitigation + +### Backward Compatibility +- **Keep CocoaPods support** indefinitely +- **Update podspec paths** to point to new locations +- **Test both build systems** in CI + +### File Organization +- **Maintain logical grouping** of Swift files +- **Preserve pigeon integration** with generated files +- **Handle resources properly** in both systems + +### Dependencies +- **No external Swift dependencies** currently - simplifies migration +- **Flutter framework dependency** handled by both systems + +## Testing Requirements + +### Pre-Migration Tests +- [ ] Current CocoaPods build works +- [ ] Example app builds and runs +- [ ] All functionality works on physical device + +### Verification Strategy +**Simple test**: Does the example app build and run with both dependency managers? + +**CocoaPods Build:** +```bash +flutter config --no-enable-swift-package-manager +cd example && flutter build ios --debug --no-codesign +``` + +**SPM Build:** +```bash +flutter config --enable-swift-package-manager +cd example && flutter build ios --debug --no-codesign +``` + +**Flutter Requirements:** +- Flutter 3.24+ required for SPM support +- SPM is off by default, must be explicitly enabled + +### CI/CD Integration +- Use Flutter's built-in SPM configuration flags +- Test both dependency managers via matrix builds +- No separate long-lived branches needed + +## Implementation Phases + +### Phase 1: Directory Restructure (First Commit) +1. Create SPM-compliant directory structure +2. Move all Swift files to `Sources/workmanager_apple/` +3. Update podspec to reference new locations +4. Ensure CocoaPods + Pigeon still work +5. **Verification**: Example app builds and runs with CocoaPods + +### Phase 2: SPM Configuration (Second Commit) +1. Add `Package.swift` with proper configuration +2. Handle resources (PrivacyInfo.xcprivacy) +3. **Verification**: Example app builds and runs with SPM + +### Phase 3: CI Integration (Third Commit) +1. Update GitHub Actions to test both dependency managers +2. Use Flutter config flags for SPM/CocoaPods selection + +## Success Criteria +- ✅ SPM support working in Flutter projects +- ✅ Full CocoaPods backward compatibility maintained +- ✅ All existing functionality preserved +- ✅ CI/CD tests both dependency managers +- ✅ No breaking changes for existing users +- ✅ Proper resource and privacy manifest handling \ No newline at end of file diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index a5a6792b..2582d5bc 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -41,7 +41,7 @@ SPEC CHECKSUMS: path_provider_foundation: 608fcb11be570ce83519b076ab6a1fffe2474f05 permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7 - workmanager_apple: 46692e3180809ea34232c2c29ad16d35ab793ded + workmanager_apple: 904529ae31e97fc5be632cf628507652294a0778 PODFILE CHECKSUM: bf5d48b0f58a968d755f5b593e79332a40015529 diff --git a/workmanager_apple/ios/Classes/BackgroundTaskOperation.swift b/workmanager_apple/ios/Sources/workmanager_apple/BackgroundTaskOperation.swift similarity index 100% rename from workmanager_apple/ios/Classes/BackgroundTaskOperation.swift rename to workmanager_apple/ios/Sources/workmanager_apple/BackgroundTaskOperation.swift diff --git a/workmanager_apple/ios/Classes/BackgroundWorker.swift b/workmanager_apple/ios/Sources/workmanager_apple/BackgroundWorker.swift similarity index 100% rename from workmanager_apple/ios/Classes/BackgroundWorker.swift rename to workmanager_apple/ios/Sources/workmanager_apple/BackgroundWorker.swift diff --git a/workmanager_apple/ios/Classes/Extensions.swift b/workmanager_apple/ios/Sources/workmanager_apple/Extensions.swift similarity index 100% rename from workmanager_apple/ios/Classes/Extensions.swift rename to workmanager_apple/ios/Sources/workmanager_apple/Extensions.swift diff --git a/workmanager_apple/ios/Classes/LoggingDebugHandler.swift b/workmanager_apple/ios/Sources/workmanager_apple/LoggingDebugHandler.swift similarity index 100% rename from workmanager_apple/ios/Classes/LoggingDebugHandler.swift rename to workmanager_apple/ios/Sources/workmanager_apple/LoggingDebugHandler.swift diff --git a/workmanager_apple/ios/Classes/NotificationDebugHandler.swift b/workmanager_apple/ios/Sources/workmanager_apple/NotificationDebugHandler.swift similarity index 100% rename from workmanager_apple/ios/Classes/NotificationDebugHandler.swift rename to workmanager_apple/ios/Sources/workmanager_apple/NotificationDebugHandler.swift diff --git a/workmanager_apple/ios/Classes/SimpleLogger.swift b/workmanager_apple/ios/Sources/workmanager_apple/SimpleLogger.swift similarity index 100% rename from workmanager_apple/ios/Classes/SimpleLogger.swift rename to workmanager_apple/ios/Sources/workmanager_apple/SimpleLogger.swift diff --git a/workmanager_apple/ios/Classes/ThumbnailGenerator.swift b/workmanager_apple/ios/Sources/workmanager_apple/ThumbnailGenerator.swift similarity index 100% rename from workmanager_apple/ios/Classes/ThumbnailGenerator.swift rename to workmanager_apple/ios/Sources/workmanager_apple/ThumbnailGenerator.swift diff --git a/workmanager_apple/ios/Classes/UserDefaultsHelper.swift b/workmanager_apple/ios/Sources/workmanager_apple/UserDefaultsHelper.swift similarity index 100% rename from workmanager_apple/ios/Classes/UserDefaultsHelper.swift rename to workmanager_apple/ios/Sources/workmanager_apple/UserDefaultsHelper.swift diff --git a/workmanager_apple/ios/Classes/WMPError.swift b/workmanager_apple/ios/Sources/workmanager_apple/WMPError.swift similarity index 100% rename from workmanager_apple/ios/Classes/WMPError.swift rename to workmanager_apple/ios/Sources/workmanager_apple/WMPError.swift diff --git a/workmanager_apple/ios/Classes/WorkmanagerDebugHandler.swift b/workmanager_apple/ios/Sources/workmanager_apple/WorkmanagerDebugHandler.swift similarity index 100% rename from workmanager_apple/ios/Classes/WorkmanagerDebugHandler.swift rename to workmanager_apple/ios/Sources/workmanager_apple/WorkmanagerDebugHandler.swift diff --git a/workmanager_apple/ios/Classes/WorkmanagerPlugin.swift b/workmanager_apple/ios/Sources/workmanager_apple/WorkmanagerPlugin.swift similarity index 100% rename from workmanager_apple/ios/Classes/WorkmanagerPlugin.swift rename to workmanager_apple/ios/Sources/workmanager_apple/WorkmanagerPlugin.swift diff --git a/workmanager_apple/ios/Classes/pigeon/WorkmanagerApi.g.swift b/workmanager_apple/ios/Sources/workmanager_apple/pigeon/WorkmanagerApi.g.swift similarity index 100% rename from workmanager_apple/ios/Classes/pigeon/WorkmanagerApi.g.swift rename to workmanager_apple/ios/Sources/workmanager_apple/pigeon/WorkmanagerApi.g.swift diff --git a/workmanager_apple/ios/workmanager_apple.podspec b/workmanager_apple/ios/workmanager_apple.podspec index 915b175b..f71ee7cc 100644 --- a/workmanager_apple/ios/workmanager_apple.podspec +++ b/workmanager_apple/ios/workmanager_apple.podspec @@ -12,7 +12,7 @@ Flutter Android Workmanager s.license = { :file => '../LICENSE' } s.author = { 'Your Company' => 'email@example.com' } s.source = { :path => '.' } - s.source_files = 'Classes/**/*' + s.source_files = 'Sources/workmanager_apple/**/*' s.dependency 'Flutter' s.ios.deployment_target = '14.0' diff --git a/workmanager_platform_interface/pigeons/workmanager_api.dart b/workmanager_platform_interface/pigeons/workmanager_api.dart index f56c1b59..695276f2 100644 --- a/workmanager_platform_interface/pigeons/workmanager_api.dart +++ b/workmanager_platform_interface/pigeons/workmanager_api.dart @@ -9,7 +9,7 @@ import 'package:pigeon/pigeon.dart'; kotlinOptions: KotlinOptions( package: 'dev.fluttercommunity.workmanager.pigeon', ), - swiftOut: '../workmanager_apple/ios/Classes/pigeon/WorkmanagerApi.g.swift', + swiftOut: '../workmanager_apple/ios/Sources/workmanager_apple/pigeon/WorkmanagerApi.g.swift', copyrightHeader: 'pigeons/copyright.txt', dartPackageName: 'workmanager_platform_interface', )) From 2ad7db3b070768b80bba1b6e55ec1a60e08a2459 Mon Sep 17 00:00:00 2001 From: Sebastian Roth Date: Thu, 31 Jul 2025 22:43:13 +0100 Subject: [PATCH 2/5] feat: add Swift Package Manager support - Phase 2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add Package.swift with iOS 14+ target and proper resource handling - Configure SPM target for workmanager_apple with Sources/workmanager_apple path - Include Resources/PrivacyInfo.xcprivacy processing for SPM - Support Swift tools version 5.9 ✅ Verified: SPM builds successfully with flutter config --enable-swift-package-manager ✅ Verified: CocoaPods backward compatibility maintained ✅ Verified: Both dependency managers work independently Users can now choose their preferred dependency manager: - CocoaPods: flutter config --no-enable-swift-package-manager - SPM: flutter config --enable-swift-package-manager This completes the core SPM migration while maintaining full backward compatibility. --- workmanager_apple/ios/Package.swift | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 workmanager_apple/ios/Package.swift diff --git a/workmanager_apple/ios/Package.swift b/workmanager_apple/ios/Package.swift new file mode 100644 index 00000000..e4e92050 --- /dev/null +++ b/workmanager_apple/ios/Package.swift @@ -0,0 +1,26 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "workmanager_apple", + platforms: [ + .iOS(.v14) + ], + products: [ + .library( + name: "workmanager_apple", + targets: ["workmanager_apple"] + ) + ], + targets: [ + .target( + name: "workmanager_apple", + path: "Sources/workmanager_apple", + resources: [ + .process("../Resources") + ] + ) + ] +) \ No newline at end of file From c4986c50f805cf7cbfed0b53d28ad21cca481e3f Mon Sep 17 00:00:00 2001 From: Sebastian Roth Date: Fri, 1 Aug 2025 07:00:04 +0100 Subject: [PATCH 3/5] feat: add dual CI testing for iOS SPM and CocoaPods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Integrates Swift Package Manager testing into the examples.yml workflow: - Matrix build strategy tests both dependency managers - SPM build removes Podfile for pure testing - Maintains backward compatibility with CocoaPods 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/examples.yml | 29 +++++++++++++++++-- example/ios/Podfile | 4 +-- example/ios/Podfile.lock | 15 +--------- example/ios/Runner.xcodeproj/project.pbxproj | 26 ++++++++++++++--- .../xcshareddata/xcschemes/Runner.xcscheme | 18 ++++++++++++ 5 files changed, 69 insertions(+), 23 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 6ebe9fe3..aa61f67f 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -28,6 +28,20 @@ jobs: example_ios: runs-on: macos-latest + strategy: + fail-fast: false + matrix: + dependency_manager: [cocoapods, spm] + include: + - dependency_manager: cocoapods + build_name: "CocoaPods" + flutter_config: "flutter config --no-enable-swift-package-manager" + cleanup_step: "echo 'Using CocoaPods - no cleanup needed'" + - dependency_manager: spm + build_name: "Swift Package Manager" + flutter_config: "flutter config --enable-swift-package-manager" + cleanup_step: "cd example/ios && rm -f Podfile Podfile.lock && rm -rf Pods" + name: iOS Example (${{ matrix.build_name }}) steps: - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2 @@ -35,8 +49,19 @@ jobs: channel: "stable" cache: true - - name: build + - name: Configure Flutter for ${{ matrix.build_name }} + run: ${{ matrix.flutter_config }} + + - name: Bootstrap project run: | dart pub global activate melos melos bootstrap - cd example && flutter build ios --debug --no-codesign + + - name: Cleanup for ${{ matrix.build_name }} + run: ${{ matrix.cleanup_step }} + + - name: Build iOS example with ${{ matrix.build_name }} + run: | + cd example + flutter clean + flutter build ios --debug --no-codesign diff --git a/example/ios/Podfile b/example/ios/Podfile index afde56aa..e549ee22 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '14.0' +# platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -29,10 +29,8 @@ flutter_ios_podfile_setup target 'Runner' do use_frameworks! - use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) - target 'RunnerTests' do inherit! :search_paths end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 2582d5bc..143f5aa1 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,48 +1,35 @@ PODS: - Flutter (1.0.0) - - integration_test (0.0.1): - - Flutter - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - permission_handler_apple (9.3.0): - Flutter - - shared_preferences_foundation (0.0.1): - - Flutter - - FlutterMacOS - workmanager_apple (0.0.1): - Flutter DEPENDENCIES: - Flutter (from `Flutter`) - - integration_test (from `.symlinks/plugins/integration_test/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - workmanager_apple (from `.symlinks/plugins/workmanager_apple/ios`) EXTERNAL SOURCES: Flutter: :path: Flutter - integration_test: - :path: ".symlinks/plugins/integration_test/ios" path_provider_foundation: :path: ".symlinks/plugins/path_provider_foundation/darwin" permission_handler_apple: :path: ".symlinks/plugins/permission_handler_apple/ios" - shared_preferences_foundation: - :path: ".symlinks/plugins/shared_preferences_foundation/darwin" workmanager_apple: :path: ".symlinks/plugins/workmanager_apple/ios" SPEC CHECKSUMS: Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 - integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e path_provider_foundation: 608fcb11be570ce83519b076ab6a1fffe2474f05 permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d - shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7 workmanager_apple: 904529ae31e97fc5be632cf628507652294a0778 -PODFILE CHECKSUM: bf5d48b0f58a968d755f5b593e79332a40015529 +PODFILE CHECKSUM: 4305caec6b40dde0ae97be1573c53de1882a07e5 COCOAPODS: 1.16.2 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index b32dca93..01efe3a0 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -10,6 +10,7 @@ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; @@ -73,6 +74,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, A4F342DE9D752B13EF553010 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -196,6 +198,9 @@ dependencies = ( ); name = Runner; + packageProductDependencies = ( + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, + ); productName = Runner; productReference = 97C146EE1CF9000F007C117D /* Runner.app */; productType = "com.apple.product-type.application"; @@ -251,6 +256,9 @@ Base, ); mainGroup = 97C146E51CF9000F007C117D; + packageReferences = ( + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, + ); productRefGroup = 97C146EF1CF9000F007C117D /* Products */; projectDirPath = ""; projectRoot = ""; @@ -361,16 +369,12 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/integration_test/integration_test.framework", "${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework", - "${BUILT_PRODUCTS_DIR}/shared_preferences_foundation/shared_preferences_foundation.framework", "${BUILT_PRODUCTS_DIR}/workmanager_apple/workmanager_apple.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/integration_test.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_foundation.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/workmanager_apple.framework", ); runOnlyForDeploymentPostprocessing = 0; @@ -840,6 +844,20 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { + isa = XCSwiftPackageProductDependency; + productName = FlutterGeneratedPluginSwiftPackage; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 97C146E61CF9000F007C117D /* Project object */; } diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 58c125ed..577f5b39 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -5,6 +5,24 @@ + + + + + + + + + + Date: Fri, 1 Aug 2025 07:02:48 +0100 Subject: [PATCH 4/5] fix: restore original Podfile configuration Reverts unintended changes to Podfile that were accidentally included in the previous commit --- example/ios/Podfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/ios/Podfile b/example/ios/Podfile index e549ee22..04c36cf4 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '12.0' +platform :ios, '14.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -29,6 +29,7 @@ flutter_ios_podfile_setup target 'Runner' do use_frameworks! + use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do From 68635f882032cbadd290d49f56ec21cbfc0a5bfc Mon Sep 17 00:00:00 2001 From: Sebastian Roth Date: Fri, 1 Aug 2025 07:07:37 +0100 Subject: [PATCH 5/5] chore: apply linting fixes and update dependencies - Apply swiftlint fixes to Package.swift - Apply dart formatting to workmanager_api.dart - Update Podfile.lock checksum after iOS build --- example/ios/Podfile.lock | 2 +- workmanager_apple/ios/Package.swift | 2 +- workmanager_platform_interface/pigeons/workmanager_api.dart | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 143f5aa1..63dad78d 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -30,6 +30,6 @@ SPEC CHECKSUMS: permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d workmanager_apple: 904529ae31e97fc5be632cf628507652294a0778 -PODFILE CHECKSUM: 4305caec6b40dde0ae97be1573c53de1882a07e5 +PODFILE CHECKSUM: 1959d098c91d8a792531a723c4a9d7e9f6a01e38 COCOAPODS: 1.16.2 diff --git a/workmanager_apple/ios/Package.swift b/workmanager_apple/ios/Package.swift index e4e92050..66351ca9 100644 --- a/workmanager_apple/ios/Package.swift +++ b/workmanager_apple/ios/Package.swift @@ -23,4 +23,4 @@ let package = Package( ] ) ] -) \ No newline at end of file +) diff --git a/workmanager_platform_interface/pigeons/workmanager_api.dart b/workmanager_platform_interface/pigeons/workmanager_api.dart index 695276f2..a5fb3adb 100644 --- a/workmanager_platform_interface/pigeons/workmanager_api.dart +++ b/workmanager_platform_interface/pigeons/workmanager_api.dart @@ -9,7 +9,8 @@ import 'package:pigeon/pigeon.dart'; kotlinOptions: KotlinOptions( package: 'dev.fluttercommunity.workmanager.pigeon', ), - swiftOut: '../workmanager_apple/ios/Sources/workmanager_apple/pigeon/WorkmanagerApi.g.swift', + swiftOut: + '../workmanager_apple/ios/Sources/workmanager_apple/pigeon/WorkmanagerApi.g.swift', copyrightHeader: 'pigeons/copyright.txt', dartPackageName: 'workmanager_platform_interface', ))