diff --git a/CLAUDE.md b/CLAUDE.md index c5389f1c..34e6e35d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,3 +1,12 @@ +## Version Management +- **DO NOT manually edit CHANGELOG.md files** - Melos handles changelog generation automatically +- **Use semantic commit messages** for proper versioning: + - `fix:` for bug fixes (patch version bump) + - `feat:` for new features (minor version bump) + - `BREAKING CHANGE:` or `!` for breaking changes (major version bump) + - Example: `fix: prevent iOS build errors with Logger availability` +- Melos will generate changelog entries from commit messages during release + ## Pre-Commit Requirements **CRITICAL**: Always run from project root before ANY commit: 1. `dart analyze` (check for code errors) diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx index 11437995..a54d114f 100644 --- a/docs/quickstart.mdx +++ b/docs/quickstart.mdx @@ -23,6 +23,15 @@ flutter pub get Android works automatically - no additional setup required! ✅ ### iOS + + +**iOS Minimum Deployment Target:** iOS 14.0 or later is required. Update your project's deployment target in Xcode: +1. Open `ios/Runner.xcodeproj` in Xcode +2. Select the Runner target +3. Set "Minimum Deployments" to iOS 14.0 or later +4. Or edit `ios/Runner.xcodeproj/project.pbxproj` and set `IPHONEOS_DEPLOYMENT_TARGET = 14.0;` + + iOS requires a 5-minute setup in Xcode. Choose your approach based on your needs: #### Option A: Periodic Tasks (Recommended for most use cases) diff --git a/workmanager_android/android/src/main/kotlin/dev/fluttercommunity/workmanager/WorkmanagerPlugin.kt b/workmanager_android/android/src/main/kotlin/dev/fluttercommunity/workmanager/WorkmanagerPlugin.kt index 4799ada1..d7774bcc 100644 --- a/workmanager_android/android/src/main/kotlin/dev/fluttercommunity/workmanager/WorkmanagerPlugin.kt +++ b/workmanager_android/android/src/main/kotlin/dev/fluttercommunity/workmanager/WorkmanagerPlugin.kt @@ -47,7 +47,14 @@ class WorkmanagerPlugin : callback: (Result) -> Unit, ) { try { - preferenceManager.saveCallbackDispatcherHandleKey(request.callbackHandle) + val handle = request.callbackHandle + + // Save to SharedPreferences + preferenceManager.saveCallbackDispatcherHandleKey(handle) + + // Update the local variable to match + currentDispatcherHandle = handle + callback(Result.success(Unit)) } catch (e: Exception) { callback(Result.failure(e)) diff --git a/workmanager_android/android/src/main/kotlin/dev/fluttercommunity/workmanager/pigeon/WorkmanagerApi.g.kt b/workmanager_android/android/src/main/kotlin/dev/fluttercommunity/workmanager/pigeon/WorkmanagerApi.g.kt index 8d9ec9a1..f274eeac 100644 --- a/workmanager_android/android/src/main/kotlin/dev/fluttercommunity/workmanager/pigeon/WorkmanagerApi.g.kt +++ b/workmanager_android/android/src/main/kotlin/dev/fluttercommunity/workmanager/pigeon/WorkmanagerApi.g.kt @@ -1,7 +1,7 @@ // // Copyright 2024 The Flutter Workmanager Authors. All rights reserved. // // Use of this source code is governed by a MIT-style license that can be // // found in the LICENSE file. -// Autogenerated from Pigeon (v26.0.0), do not edit directly. +// Autogenerated from Pigeon (v26.0.1), do not edit directly. // See also: https://pub.dev/packages/pigeon @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") diff --git a/workmanager_apple/ios/Sources/workmanager_apple/LoggingDebugHandler.swift b/workmanager_apple/ios/Sources/workmanager_apple/LoggingDebugHandler.swift index 7966251e..2394e07c 100644 --- a/workmanager_apple/ios/Sources/workmanager_apple/LoggingDebugHandler.swift +++ b/workmanager_apple/ios/Sources/workmanager_apple/LoggingDebugHandler.swift @@ -3,7 +3,9 @@ import os /** * A debug handler that outputs debug information to iOS's unified logging system. + * Note: This class requires iOS 14.0 or later due to the use of os.Logger. */ +@available(iOS 14.0, *) public class LoggingDebugHandler: WorkmanagerDebug { private let logger = os.Logger(subsystem: "dev.fluttercommunity.workmanager", category: "debug") diff --git a/workmanager_apple/ios/Sources/workmanager_apple/pigeon/WorkmanagerApi.g.swift b/workmanager_apple/ios/Sources/workmanager_apple/pigeon/WorkmanagerApi.g.swift index 7ed61adb..b5b845ad 100644 --- a/workmanager_apple/ios/Sources/workmanager_apple/pigeon/WorkmanagerApi.g.swift +++ b/workmanager_apple/ios/Sources/workmanager_apple/pigeon/WorkmanagerApi.g.swift @@ -1,7 +1,7 @@ // // Copyright 2024 The Flutter Workmanager Authors. All rights reserved. // // Use of this source code is governed by a MIT-style license that can be // // found in the LICENSE file. -// Autogenerated from Pigeon (v26.0.0), do not edit directly. +// Autogenerated from Pigeon (v26.0.1), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation diff --git a/workmanager_platform_interface/lib/src/pigeon/workmanager_api.g.dart b/workmanager_platform_interface/lib/src/pigeon/workmanager_api.g.dart index 780c357d..75474851 100644 --- a/workmanager_platform_interface/lib/src/pigeon/workmanager_api.g.dart +++ b/workmanager_platform_interface/lib/src/pigeon/workmanager_api.g.dart @@ -1,7 +1,7 @@ // // Copyright 2024 The Flutter Workmanager Authors. All rights reserved. // // Use of this source code is governed by a MIT-style license that can be // // found in the LICENSE file. -// Autogenerated from Pigeon (v26.0.0), do not edit directly. +// Autogenerated from Pigeon (v26.0.1), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers