diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 6984073..a1f2ab0 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -20,9 +20,11 @@ jobs: uses: actions/checkout@v4 - name: Check PR title format + # Title through env, never inline ${{ }} — same injection vector as the + # description check below ($(…) in a PR title would execute here). + env: + PR_TITLE: ${{ github.event.pull_request.title }} run: | - PR_TITLE="${{ github.event.pull_request.title }}" - # Valid formats: feat: / fix: / docs: / test: / refactor: / chore: if ! echo "$PR_TITLE" | grep -qE '^(feat|fix|docs|test|refactor|chore|ci|perf|style): .+'; then echo "❌ Invalid PR title format!" @@ -44,8 +46,13 @@ jobs: echo "✅ PR title format is valid" - name: Check for description + # PR body goes through env, NEVER inline ${{ }} into the script: inlined + # bodies both break the shell on quotes/parens and allow command + # injection ($(…) in a PR description would execute on the runner). + env: + PR_BODY: ${{ github.event.pull_request.body }} run: | - BODY_LENGTH=$(echo '${{ github.event.pull_request.body }}' | wc -c) + BODY_LENGTH=$(printf '%s' "$PR_BODY" | wc -c) if [ "$BODY_LENGTH" -lt 20 ]; then echo "⚠️ Warning: PR description is very short or empty" echo "Consider adding more context about the changes" diff --git a/CHANGELOG.md b/CHANGELOG.md index f3bdba7..a79130f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- +## [1.4.3] - 2026-07-17 + +### Fixed + +- **iOS SwiftPM: manifest rejected by stricter SwiftPM toolchains.** + `Package.swift` declared a test target with `path: "../Tests"`, which escapes + the package root. Newer SwiftPM (Xcode 26.x) tolerates the escape, but stricter + toolchains reject the **entire manifest** at load time with *"target + 'NativeWorkManagerTests' in package 'native_workmanager' is outside the package + root"* — which breaks dependency resolution for every SPM-enabled consumer app + on those toolchains, the same failure mode as #49/#52. The test target is + removed from the consumer-facing manifest (nothing ever executed it — no + workflow or script invokes `swift test` — so no coverage is lost; the Swift + test sources remain in the repo). Root cause confirmed by a controlled + experiment: the CI job that reproduced the failure on the stricter toolchain + goes green with the target removed. + + This closes the last known gap in the SwiftPM install path. All four layers + are now verified automatically on every PR: remote binary target resolution, + hyphenated product-name resolution, a full `flutter build` of a consuming app + with SwiftPM enabled, and compile under SPM's strict module isolation. + +--- + ## [1.4.2] - 2026-07-17 ### Fixed diff --git a/README.md b/README.md index aca2b8c..46cedf4 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ No boilerplate. No native code to write. No `AndroidManifest.xml` changes. Each ```yaml dependencies: - native_workmanager: ^1.4.2 + native_workmanager: ^1.4.3 ``` **2. Initialize once in `main()`:** diff --git a/doc/ANDROID_SETUP.md b/doc/ANDROID_SETUP.md index 26dc8cc..6bde1cd 100644 --- a/doc/ANDROID_SETUP.md +++ b/doc/ANDROID_SETUP.md @@ -81,7 +81,7 @@ Add to your `pubspec.yaml`: ```yaml dependencies: - native_workmanager: ^1.4.2 + native_workmanager: ^1.4.3 ``` Run: diff --git a/doc/GETTING_STARTED.md b/doc/GETTING_STARTED.md index 899f5c8..c5c6bf5 100644 --- a/doc/GETTING_STARTED.md +++ b/doc/GETTING_STARTED.md @@ -34,7 +34,7 @@ Or manually: ```yaml dependencies: - native_workmanager: ^1.4.2 + native_workmanager: ^1.4.3 ``` Then run: diff --git a/doc/MIGRATION_GUIDE.md b/doc/MIGRATION_GUIDE.md index 5b292d8..eb045f6 100644 --- a/doc/MIGRATION_GUIDE.md +++ b/doc/MIGRATION_GUIDE.md @@ -152,7 +152,7 @@ dependencies: **After:** ```yaml dependencies: - native_workmanager: ^1.4.2 + native_workmanager: ^1.4.3 ``` **Then run:** @@ -865,7 +865,7 @@ Use this checklist to track your migration progress: ```yaml dependencies: workmanager: ^0.5.0 - native_workmanager: ^1.4.2 + native_workmanager: ^1.4.3 ``` Migrate tasks one at a time, then remove workmanager when done. diff --git a/doc/MIGRATION_TOOL_README.md b/doc/MIGRATION_TOOL_README.md index b6aca01..4085ad3 100644 --- a/doc/MIGRATION_TOOL_README.md +++ b/doc/MIGRATION_TOOL_README.md @@ -142,7 +142,7 @@ Updated dependencies file: dependencies: flutter: sdk: flutter - native_workmanager: ^1.4.2 # Replaced workmanager + native_workmanager: ^1.4.3 # Replaced workmanager ``` **Usage:** diff --git a/example/pubspec.lock b/example/pubspec.lock index f005ced..f12600b 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -261,7 +261,7 @@ packages: path: ".." relative: true source: path - version: "1.4.2" + version: "1.4.3" objective_c: dependency: transitive description: diff --git a/ios/native_workmanager.podspec b/ios/native_workmanager.podspec index 8cf5bb9..8a06eec 100644 --- a/ios/native_workmanager.podspec +++ b/ios/native_workmanager.podspec @@ -4,7 +4,7 @@ # Pod::Spec.new do |s| s.name = 'native_workmanager' - s.version = '1.4.2' + s.version = '1.4.3' s.summary = 'Background task manager for Flutter using platform-native APIs.' s.description = <<-DESC Native WorkManager is a Flutter plugin that provides native background task scheduling diff --git a/ios/native_workmanager/Package.swift b/ios/native_workmanager/Package.swift index 3b6587a..6b92add 100644 --- a/ios/native_workmanager/Package.swift +++ b/ios/native_workmanager/Package.swift @@ -71,10 +71,15 @@ let package = Package( .process("PrivacyInfo.xcprivacy"), ] ), - .testTarget( - name: "NativeWorkManagerTests", - dependencies: ["native_workmanager"], - path: "../Tests" - ), + // NOTE: no .testTarget here — deliberately. The Swift unit tests live in + // ios/Tests/ (outside this package root) and a testTarget with + // path: "../Tests" makes some SwiftPM toolchains reject the ENTIRE + // manifest at load time with "target 'NativeWorkManagerTests' in package + // 'native_workmanager' is outside the package root" — which breaks + // dependency resolution for every SPM-enabled consumer app on those + // toolchains (newer SwiftPM tolerates it, so local builds can pass while + // consumers fail). Consumer-facing plugin manifests must not declare test + // targets; run the Swift tests through the example app's Xcode workspace + // (RunnerTests) or a dev-only manifest instead. ] ) diff --git a/native_workmanager_gen/CHANGELOG.md b/native_workmanager_gen/CHANGELOG.md index 165a9a2..d1c11e8 100644 --- a/native_workmanager_gen/CHANGELOG.md +++ b/native_workmanager_gen/CHANGELOG.md @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). --- +## [1.4.3] - 2026-07-17 + +- Version bump synchronized with `native_workmanager` 1.4.3. No codegen changes — + the 1.4.3 fix (iOS SwiftPM manifest: test target outside the package root) is + entirely in the main package's `Package.swift`. + +--- + ## [1.4.2] - 2026-07-17 - Version bump synchronized with `native_workmanager` 1.4.2. No codegen changes — the diff --git a/native_workmanager_gen/pubspec.yaml b/native_workmanager_gen/pubspec.yaml index de1f886..cf22657 100644 --- a/native_workmanager_gen/pubspec.yaml +++ b/native_workmanager_gen/pubspec.yaml @@ -1,5 +1,5 @@ name: native_workmanager_gen -version: 1.4.2 +version: 1.4.3 description: > Code generator for native_workmanager. Generates type-safe DartWorker callback IDs and worker registry from diff --git a/pubspec.yaml b/pubspec.yaml index 5be6ea3..90ba0e3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: native_workmanager description: "Background task scheduling for Flutter — 25+ native workers (HTTP, image, crypto, file), task chains, zero Flutter Engine overhead." -version: 1.4.2 +version: 1.4.3 homepage: https://github.com/brewkits/native_workmanager repository: https://github.com/brewkits/native_workmanager issue_tracker: https://github.com/brewkits/native_workmanager/issues