Skip to content

hotfix/cp-11317-ios-android-ensure-channelid-validation-before-executing-api#374

Merged
snuricp merged 2 commits into
masterfrom
hotfix/cp-11317-ios-android-ensure-channelid-validation-before-executing-api
Apr 16, 2026
Merged

hotfix/cp-11317-ios-android-ensure-channelid-validation-before-executing-api#374
snuricp merged 2 commits into
masterfrom
hotfix/cp-11317-ios-android-ensure-channelid-validation-before-executing-api

Conversation

@cpandya25
Copy link
Copy Markdown
Contributor

@cpandya25 cpandya25 commented Apr 16, 2026

Added functionality for preventing the API calls if there is no channel ID


Summary by cubic

Validate channelId before executing API calls across the iOS SDK to prevent invalid requests and noisy errors. Implements CP-11317 by only calling the backend when a valid channelId is present.

  • Bug Fixes
    • Added CPUtils isNullOrEmpty channelId guards across CleverPushInstance, CPAppBannerModuleInstance, and CPInboxView (banners and banner events, subscription sync/unsubscribe, notifications delivered/clicked, tags/attributes/topics and attribute push/pull, sessions start/end, analytics/conversions/follow-ups, inbox clicked, live activities, campaigns, notifications fetch).
    • Standardized “skipping API call” logs and early returns; reset subscriptionInProgress on sync; return cached notifications if channelId is missing; keep callbacks where applicable.

Written for commit 292736c. Summary will update on new commits.

…ing-api

Added functionality for preventing the API calls if there is no channelID
@cpandya25 cpandya25 requested a review from snuricp April 16, 2026 11:21
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 3 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="CleverPush/Source/CleverPushInstance.m">

<violation number="1" location="CleverPush/Source/CleverPushInstance.m:1191">
P1: Early return on empty channelId skips unsubscribe completion handling (no callback/failure/local cleanup).</violation>

<violation number="2" location="CleverPush/Source/CleverPushInstance.m:1191">
P1: Early return on empty channelId can deadlock `removeSubscriptionTags` completion (dispatch group never leaves).</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread CleverPush/Source/CleverPushInstance.m
Comment thread CleverPush/Source/CleverPushInstance.m
…ing-api

Added functionality for preventing the API calls if there is no channelID
@snuricp snuricp merged commit 25620c5 into master Apr 16, 2026
4 checks passed
@snuricp snuricp deleted the hotfix/cp-11317-ios-android-ensure-channelid-validation-before-executing-api branch April 16, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants