fix: use the non-deprecated Live Activities enter/exit on iOS - #68
Merged
fadi-george merged 2 commits intoSep 30, 2026
Merged
fadi-george merged 2 commits into
fadi-george merged 2 commits into
Conversation
The withSuccess/withFailure variants are deprecated in the iOS SDK and warn at build time. They call the plain enter/exit and then always invoke withSuccess; withFailure is never called. Call the plain methods and resolve directly, which keeps the same JS behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shivapoudel
force-pushed
the
fix/ios-live-activities-deprecated-callbacks
branch
from
September 25, 2026 19:13
e6e2610 to
3d2ad91
Compare
Contributor
|
Hey thanks for the pr. i would try to address these issues. if you can't get to it then I can try to fix myself when I have time:
|
Co-authored-by: Cursor <cursoragent@cursor.com>
fadi-george
approved these changes
Sep 30, 2026
shivapoudel
deleted the
fix/ios-live-activities-deprecated-callbacks
branch
September 30, 2026 00:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
One Line Summary
Call
OneSignal.LiveActivities.enter(_:withToken:)andexit(_:)instead of the deprecated callback variants, removing two iOS build warnings.Details
Motivation
enterLiveActivityandexitLiveActivityuseenter(_:withToken:withSuccess:withFailure:)andexit(_:withSuccess:withFailure:), which are deprecated in the OneSignal iOS SDK, so every app that includes the plugin gets two deprecation warnings.In the SDK (
OneSignalLiveActivitiesManagerImpl.swift), those variants call the plainenter/exitand then always callwithSuccesson the main queue.withFailureis never called.Scope
iOS only. The plugin now calls the plain methods and resolves the call right away. The JS API doesn't change: the promise still resolves and can't reject from the SDK, just as before. The input validation rejects are unchanged.
Two small behavior differences:
OneSignalLiveActivitiesdirectly, so this is not expected in practice.The plain
enter/exitneed iOS SDK 5.2.0+, so the SPM minimum is raised from 5.0.0 to 5.2.0. The plugin already used APIs from 5.2.0 or later, and the podspec pins 5.7.0.Testing
Unit testing
None added. There is no iOS test target for the plugin, and the change only removes callback plumbing.
Manual testing
Applied as a local patch on 1.2.0 in a Capacitor 8 app and built it with Xcode for the iOS simulator and an iPhone. The two deprecation warnings are gone and the build has no warnings. The Live Activity flow itself wasn't exercised; that app doesn't use Live Activities.
Affected code checklist
Checklist
Overview
Testing
Final pass
🤖 Generated with Claude Code