feat(SDK-550): expose disableDeviceForAllUsers on the RN SDK - #901
Open
jferrao-itrbl wants to merge 1 commit into
Open
jferrao-itrbl wants to merge 1 commit into
jferrao-itrbl wants to merge 1 commit into
Conversation
Bridge Iterable.disableDeviceForAllUsers() so iOS can unregister this device's push token for every associated user. Android stays a logged no-op because the native SDK has no public equivalent. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Coverage Impact ⬆️ Merging this pull request will increase total coverage on Modified Files with Diff Coverage (2)
🛟 Help
|
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.

📝 Summary
Add
Iterable.disableDeviceForAllUsers()so RN apps can unregister this device's push token for every associated user on iOS.🎟️ Jira Ticket: SDK-550
📖 Description
The RN SDK only bridged
disableDeviceForCurrentUser. iOS already has publicIterableAPI.disableDeviceForAllUsers(); Android does not have a public "all users" equivalent (disablePush()is current-user only;disableToken(...)is protected).This PR adds
Iterable.disableDeviceForAllUsers()/IterableApi.disableDeviceForAllUsers()(no args, fire-and-forget):IterableAPI.disableDeviceForAllUsers().IterableLogger.w); does not throw. UsedisableDeviceForCurrentUser()for current-user disable.disableDeviceForCurrentUseris unchanged. Native Android public API and iOSasync throws/ callback variants are out of scope.🧪 How to test?
yarn typecheckandyarn testpass.Iterable.disableDeviceForAllUsers(), confirm the device token is disabled for all users associated with the device (same native behavior asIterableAPI.disableDeviceForAllUsers()).initialize()/ with no token — should not crash (native handles internally; RN does not surface success/failure).Iterable.disableDeviceForAllUsers()— warning in logcat, no crash;disableDeviceForCurrentUser()still disables push for the current user.NativeRNIterableAPI.tschange, regenerate codegen (cd example/ios && pod install). Note: fullpod installmay currently fail on the pre-existingIterable-iOS-SDKpin mismatch (podspec6.6.7vsPodfile.lock6.7.5, SDK-709). Codegen for this method already succeeds.🧾 Changelog
Unreleased: added
Iterable.disableDeviceForAllUsers()(iOS native forward; Android logged no-op).📹 Loom recording if applicable
N/A
🐞 Github Issues solved
N/A
📚 Docs PR if applicable
JSDoc on
Iterable.disableDeviceForAllUsers()documents the iOS-only effect and Android no-op (picked up by TypeDoc). Follow-up docs-repo PR if product docs should mention the new method.