From be6ed467d232b98f5fbd4f76dca1f7f64fd9dbe1 Mon Sep 17 00:00:00 2001 From: Bohdan Oshovskyi Date: Fri, 4 Sep 2026 13:09:34 +0300 Subject: [PATCH 1/2] fix(ios): include the Obj-C shim in the podspec source_files The shim added in 11.0.2 is never compiled under CocoaPods, so 11.0.2 still fails exactly like 11.0.1 (#395, #396): Semantic Issue (Xcode): Unknown receiver 'FlutterForegroundTaskPlugin'; did you mean 'SwiftFlutterForegroundTaskPlugin'? ios/Runner/GeneratedPluginRegistrant.m Both globs in source_files are resolved relative to the podspec's directory (ios/). The Swift glob carries the `flutter_foreground_task/` prefix, but the Obj-C one does not, so CocoaPods looks for ios/Classes/ while the files actually live in ios/flutter_foreground_task/Classes/. The glob matches nothing and the shim is silently dropped from the pod. Add the missing prefix so the shim is compiled. Verified on a CocoaPods (non-SPM) app, clean Pods/ and build/ each time, changing only this glob: before -> Unknown receiver ...; 0 references to FlutterForegroundTaskPlugin.m in the generated Pods.xcodeproj after -> builds and links; 4 references --- ios/flutter_foreground_task.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/flutter_foreground_task.podspec b/ios/flutter_foreground_task.podspec index 0efef77..bda3a88 100644 --- a/ios/flutter_foreground_task.podspec +++ b/ios/flutter_foreground_task.podspec @@ -13,7 +13,7 @@ A new Flutter plugin. s.license = { :file => '../LICENSE' } s.author = { 'Your Company' => 'email@example.com' } s.source = { :path => '.' } - s.source_files = 'flutter_foreground_task/Sources/flutter_foreground_task/**/*.swift', 'Classes/**/*.{h,m}' + s.source_files = 'flutter_foreground_task/Sources/flutter_foreground_task/**/*.swift', 'flutter_foreground_task/Classes/**/*.{h,m}' s.dependency 'Flutter' s.platform = :ios, '12.0' From 3da36f005844a4a95ecc88ab3da435a9aeb93c69 Mon Sep 17 00:00:00 2001 From: Bohdan Oshovskyi Date: Fri, 4 Sep 2026 13:22:25 +0300 Subject: [PATCH 2/2] release: 11.0.3 Ship the podspec fix so CocoaPods users are unblocked; 11.0.2 still fails with "Unknown receiver 'FlutterForegroundTaskPlugin'" because the shim it added never reaches the pod. --- CHANGELOG.md | 4 ++++ pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 147c4fd..d1740c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 11.0.3 + +* [**FIX-iOS**] Include the objective-c shim in the podspec source_files so it is compiled under CocoaPods + ## 11.0.2 * [**FIX-iOS**] Add objective-c shim for FlutterForegroundTaskPlugin diff --git a/pubspec.yaml b/pubspec.yaml index e5a6f80..ecb8f66 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_foreground_task description: This plugin is used to implement a foreground service on the Android platform. -version: 11.0.2 +version: 11.0.3 homepage: https://github.com/Dev-hwang/flutter_foreground_task environment: