From 4db5342123e9dd15f86c379e39b7e613a63a0565 Mon Sep 17 00:00:00 2001 From: Fadi George Date: Wed, 1 Apr 2026 14:08:32 -0700 Subject: [PATCH 1/9] chore: deprecate exitLiveActivity API and remove demo UI --- .../widgets/sections/live_activities_section.dart | 12 ------------ lib/src/liveactivities.dart | 3 ++- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/examples/demo/lib/widgets/sections/live_activities_section.dart b/examples/demo/lib/widgets/sections/live_activities_section.dart index dbe82125..6e5729e4 100644 --- a/examples/demo/lib/widgets/sections/live_activities_section.dart +++ b/examples/demo/lib/widgets/sections/live_activities_section.dart @@ -82,18 +82,6 @@ class _LiveActivitiesSectionState extends State { : () => vm.updateLiveActivity(), ), AppSpacing.gapBox, - SizedBox( - width: double.infinity, - child: OutlinedButton( - onPressed: activityEmpty ? null : () => vm.exitLiveActivity(), - style: OutlinedButton.styleFrom( - foregroundColor: AppColors.osPrimary, - side: const BorderSide(color: AppColors.osPrimary), - ), - child: const Text('STOP UPDATING LIVE ACTIVITY'), - ), - ), - AppSpacing.gapBox, SizedBox( width: double.infinity, child: OutlinedButton( diff --git a/lib/src/liveactivities.dart b/lib/src/liveactivities.dart index 7021b835..30d885f6 100644 --- a/lib/src/liveactivities.dart +++ b/lib/src/liveactivities.dart @@ -5,7 +5,7 @@ class OneSignalLiveActivities { // private channels used to bridge to ObjC/Java MethodChannel _channel = const MethodChannel('OneSignal#liveactivities'); - /// Indicate this device has exited a live activity, identified within OneSignal by the [activityId]. The + /// Indicate this device has entered a live activity, identified within OneSignal by the [activityId]. The /// [token] is the ActivityKit's update token that will be used to update the live activity. /// /// Only applies to iOS. @@ -19,6 +19,7 @@ class OneSignalLiveActivities { /// Indicate this device has exited a live activity, identified within OneSignal by the [activityId]. /// /// Only applies to iOS. + @Deprecated('This API is no longer supported and will be removed in a future release.') Future exitLiveActivity(String activityId) async { if (defaultTargetPlatform == TargetPlatform.iOS) { return await _channel.invokeMethod( From 7036d5add1dee920a0ff2ad7d9506d98ea95a22f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 1 Apr 2026 21:09:52 +0000 Subject: [PATCH 2/9] Release 5.5.0 --- .../src/main/java/com/onesignal/flutter/OneSignalPlugin.java | 2 +- .../Sources/onesignal_flutter/OneSignalPlugin.m | 2 +- pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/src/main/java/com/onesignal/flutter/OneSignalPlugin.java b/android/src/main/java/com/onesignal/flutter/OneSignalPlugin.java index 510a8ad3..0472bb4a 100644 --- a/android/src/main/java/com/onesignal/flutter/OneSignalPlugin.java +++ b/android/src/main/java/com/onesignal/flutter/OneSignalPlugin.java @@ -24,7 +24,7 @@ private void init(Context context, BinaryMessenger messenger) { this.messenger = messenger; OneSignalWrapper.setSdkType("flutter"); // For 5.0.0, hard code to reflect SDK version - OneSignalWrapper.setSdkVersion("050406"); + OneSignalWrapper.setSdkVersion("050500"); channel = new MethodChannel(messenger, "OneSignal"); channel.setMethodCallHandler(this); diff --git a/ios/onesignal_flutter/Sources/onesignal_flutter/OneSignalPlugin.m b/ios/onesignal_flutter/Sources/onesignal_flutter/OneSignalPlugin.m index 951463bb..6e24a265 100644 --- a/ios/onesignal_flutter/Sources/onesignal_flutter/OneSignalPlugin.m +++ b/ios/onesignal_flutter/Sources/onesignal_flutter/OneSignalPlugin.m @@ -56,7 +56,7 @@ + (instancetype)sharedInstance { + (void)registerWithRegistrar:(NSObject *)registrar { OneSignalWrapper.sdkType = @"flutter"; - OneSignalWrapper.sdkVersion = @"050406"; + OneSignalWrapper.sdkVersion = @"050500"; [OneSignal initialize:nil withLaunchOptions:nil]; OneSignalPlugin.sharedInstance.channel = diff --git a/pubspec.yaml b/pubspec.yaml index a324717d..7d791759 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: onesignal_flutter description: OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your flutter app with OneSignal -version: 5.4.6 +version: 5.5.0 homepage: https://github.com/OneSignal/OneSignal-Flutter-SDK # Uses rps package for scripts From f9b01d77bde6d999d089e9884895720edc4f7ff1 Mon Sep 17 00:00:00 2001 From: Fadi George Date: Wed, 1 Apr 2026 14:13:23 -0700 Subject: [PATCH 3/9] test: suppress deprecation warning for exitLiveActivity --- test/liveactivities_test.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/test/liveactivities_test.dart b/test/liveactivities_test.dart index e2cfce14..3905b99c 100644 --- a/test/liveactivities_test.dart +++ b/test/liveactivities_test.dart @@ -39,6 +39,7 @@ void main() { group('exitLiveActivity', () { test('invokes OneSignal#exitLiveActivity with activityId', () async { + // ignore: deprecated_member_use_from_same_package await liveActivities.exitLiveActivity(activityId); expect(channelController.state.liveActivityExited, true); From 111e9034b19567cbc9d0afa7650350d35b86f779 Mon Sep 17 00:00:00 2001 From: Fadi George Date: Wed, 1 Apr 2026 14:19:16 -0700 Subject: [PATCH 4/9] style: reformat deprecated annotation --- lib/src/liveactivities.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/liveactivities.dart b/lib/src/liveactivities.dart index 30d885f6..f7f436da 100644 --- a/lib/src/liveactivities.dart +++ b/lib/src/liveactivities.dart @@ -19,7 +19,8 @@ class OneSignalLiveActivities { /// Indicate this device has exited a live activity, identified within OneSignal by the [activityId]. /// /// Only applies to iOS. - @Deprecated('This API is no longer supported and will be removed in a future release.') + @Deprecated( + 'This API is no longer supported and will be removed in a future release.') Future exitLiveActivity(String activityId) async { if (defaultTargetPlatform == TargetPlatform.iOS) { return await _channel.invokeMethod( From 43644d5912a6faeaecccb010d99667ad6293fc1f Mon Sep 17 00:00:00 2001 From: Fadi George Date: Wed, 1 Apr 2026 14:22:53 -0700 Subject: [PATCH 5/9] chore: bump version to 5.5.0 across platforms --- .github/workflows/create-release-pr.yml | 8 ++++++++ android/build.gradle | 2 +- ios/onesignal_flutter.podspec | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml index dcd36495..4abf4c80 100644 --- a/.github/workflows/create-release-pr.yml +++ b/.github/workflows/create-release-pr.yml @@ -158,6 +158,14 @@ jobs: sed -i '' "s/^version:.*/version: $NEW_VERSION/" pubspec.yaml echo "✓ Updated pubspec.yaml version to ${NEW_VERSION}" + # Update podspec version + sed -i '' "s|s.version = '[^']*'|s.version = '${NEW_VERSION}'|" ios/onesignal_flutter.podspec + echo "✓ Updated ios/onesignal_flutter.podspec version to ${NEW_VERSION}" + + # Update android build.gradle version + sed -i '' "s|^version '[^']*'|version '${NEW_VERSION}'|" android/build.gradle + echo "✓ Updated android/build.gradle version to ${NEW_VERSION}" + # Update OneSignalPlugin.java wrapper version sed -i '' "s/OneSignalWrapper\.setSdkVersion(\"[^\"]*\")/OneSignalWrapper.setSdkVersion(\"$WRAPPER_VERSION\")/g" android/src/main/java/com/onesignal/flutter/OneSignalPlugin.java diff --git a/android/build.gradle b/android/build.gradle index 8afc6e69..443f4d46 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ group 'com.onesignal.flutter' -version '5.3.4' +version '5.5.0' buildscript { repositories { diff --git a/ios/onesignal_flutter.podspec b/ios/onesignal_flutter.podspec index 84f9d30d..03591391 100644 --- a/ios/onesignal_flutter.podspec +++ b/ios/onesignal_flutter.podspec @@ -3,7 +3,7 @@ # Pod::Spec.new do |s| s.name = 'onesignal_flutter' - s.version = '5.3.4' + s.version = '5.5.0' s.summary = 'The OneSignal Flutter SDK' s.description = 'Allows you to easily add OneSignal to your flutter projects, to make sending and handling push notifications easy' s.homepage = 'https://www.onesignal.com' From 778364843d459aa23010ea1a0d9b421050d7a40c Mon Sep 17 00:00:00 2001 From: Fadi George Date: Wed, 1 Apr 2026 14:26:11 -0700 Subject: [PATCH 6/9] chore(ios): add OneSignalLiveActivities dependency --- examples/demo/ios/Podfile.lock | 4 ++-- ios/onesignal_flutter/Package.swift | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/demo/ios/Podfile.lock b/examples/demo/ios/Podfile.lock index 236ac9ea..91840489 100644 --- a/examples/demo/ios/Podfile.lock +++ b/examples/demo/ios/Podfile.lock @@ -1,6 +1,6 @@ PODS: - Flutter (1.0.0) - - onesignal_flutter (5.3.4): + - onesignal_flutter (5.5.0): - Flutter - OneSignalXCFramework (= 5.5.0) - OneSignalXCFramework (5.5.0): @@ -78,7 +78,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 - onesignal_flutter: fa28e94a7baa3cd8b503fc4d760103405882f47f + onesignal_flutter: 786a2ae8d69120f3041f0f1de326bee63b319e3e OneSignalXCFramework: 943852e7d70d719f73e9669d48620aeec1b93022 shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b diff --git a/ios/onesignal_flutter/Package.swift b/ios/onesignal_flutter/Package.swift index 4a75bdc8..1c276a04 100644 --- a/ios/onesignal_flutter/Package.swift +++ b/ios/onesignal_flutter/Package.swift @@ -22,6 +22,7 @@ let package = Package( .product(name: "OneSignalInAppMessages", package: "OneSignal-XCFramework"), .product(name: "OneSignalLocation", package: "OneSignal-XCFramework"), .product(name: "OneSignalExtension", package: "OneSignal-XCFramework"), + .product(name: "OneSignalLiveActivities", package: "OneSignal-XCFramework"), ], cSettings: [ .headerSearchPath("include/onesignal_flutter") From ae0f9752885e7b33cafe2e987bf6505de57a4dab Mon Sep 17 00:00:00 2001 From: Fadi George Date: Wed, 1 Apr 2026 16:26:33 -0700 Subject: [PATCH 7/9] docs: soften exitLiveActivity deprecation message --- .github/workflows/create-release-pr.yml | 2 +- lib/src/liveactivities.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml index 4abf4c80..abce977f 100644 --- a/.github/workflows/create-release-pr.yml +++ b/.github/workflows/create-release-pr.yml @@ -159,7 +159,7 @@ jobs: echo "✓ Updated pubspec.yaml version to ${NEW_VERSION}" # Update podspec version - sed -i '' "s|s.version = '[^']*'|s.version = '${NEW_VERSION}'|" ios/onesignal_flutter.podspec + sed -i '' "s|s\.version[[:space:]]*=[[:space:]]*'[^']*'|s.version = '${NEW_VERSION}'|" ios/onesignal_flutter.podspec echo "✓ Updated ios/onesignal_flutter.podspec version to ${NEW_VERSION}" # Update android build.gradle version diff --git a/lib/src/liveactivities.dart b/lib/src/liveactivities.dart index f7f436da..3eadbe85 100644 --- a/lib/src/liveactivities.dart +++ b/lib/src/liveactivities.dart @@ -20,7 +20,7 @@ class OneSignalLiveActivities { /// /// Only applies to iOS. @Deprecated( - 'This API is no longer supported and will be removed in a future release.') + 'Currently unsupported, avoid using this method.') Future exitLiveActivity(String activityId) async { if (defaultTargetPlatform == TargetPlatform.iOS) { return await _channel.invokeMethod( From 2915e34ef8abf1926fa210a63d13e7eef6149057 Mon Sep 17 00:00:00 2001 From: Fadi George Date: Wed, 1 Apr 2026 16:58:48 -0700 Subject: [PATCH 8/9] chore(ios): remove OneSignalLiveActivities dependency --- ios/onesignal_flutter/Package.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/ios/onesignal_flutter/Package.swift b/ios/onesignal_flutter/Package.swift index 1c276a04..4a75bdc8 100644 --- a/ios/onesignal_flutter/Package.swift +++ b/ios/onesignal_flutter/Package.swift @@ -22,7 +22,6 @@ let package = Package( .product(name: "OneSignalInAppMessages", package: "OneSignal-XCFramework"), .product(name: "OneSignalLocation", package: "OneSignal-XCFramework"), .product(name: "OneSignalExtension", package: "OneSignal-XCFramework"), - .product(name: "OneSignalLiveActivities", package: "OneSignal-XCFramework"), ], cSettings: [ .headerSearchPath("include/onesignal_flutter") From 0d85cebad9c4bbe72cebab8969b9740a030f5b99 Mon Sep 17 00:00:00 2001 From: Fadi George Date: Wed, 1 Apr 2026 17:05:56 -0700 Subject: [PATCH 9/9] style: format deprecated annotation on single line --- lib/src/liveactivities.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/src/liveactivities.dart b/lib/src/liveactivities.dart index 3eadbe85..819e496c 100644 --- a/lib/src/liveactivities.dart +++ b/lib/src/liveactivities.dart @@ -19,8 +19,7 @@ class OneSignalLiveActivities { /// Indicate this device has exited a live activity, identified within OneSignal by the [activityId]. /// /// Only applies to iOS. - @Deprecated( - 'Currently unsupported, avoid using this method.') + @Deprecated('Currently unsupported, avoid using this method.') Future exitLiveActivity(String activityId) async { if (defaultTargetPlatform == TargetPlatform.iOS) { return await _channel.invokeMethod(