Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand All @@ -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"
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()`:**
Expand Down
2 changes: 1 addition & 1 deletion doc/ANDROID_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Add to your `pubspec.yaml`:

```yaml
dependencies:
native_workmanager: ^1.4.2
native_workmanager: ^1.4.3
```

Run:
Expand Down
2 changes: 1 addition & 1 deletion doc/GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Or manually:

```yaml
dependencies:
native_workmanager: ^1.4.2
native_workmanager: ^1.4.3
```

Then run:
Expand Down
4 changes: 2 additions & 2 deletions doc/MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ dependencies:
**After:**
```yaml
dependencies:
native_workmanager: ^1.4.2
native_workmanager: ^1.4.3
```

**Then run:**
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion doc/MIGRATION_TOOL_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:**
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.4.2"
version: "1.4.3"
objective_c:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion ios/native_workmanager.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 10 additions & 5 deletions ios/native_workmanager/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
]
)
8 changes: 8 additions & 0 deletions native_workmanager_gen/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion native_workmanager_gen/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading