Skip to content

feat: add custom events support#1151

Merged
fadi-george merged 12 commits intomainfrom
fg/custom-events
Jan 30, 2026
Merged

feat: add custom events support#1151
fadi-george merged 12 commits intomainfrom
fg/custom-events

Conversation

@fadi-george
Copy link
Copy Markdown
Collaborator

@fadi-george fadi-george commented Jan 29, 2026

Description

One Line Summary

  • add custom events support for the cordova sdk

Cordova ios custom events

Screenshot 2026-01-28 at 4 06 06 PM

Cordova android custom events

Screenshot 2026-01-28 at 3 42 45 PM

Example app:

Screenshot 2025-10-09 at 12 05 48 PM Screenshot 2026-01-30 at 10 39 16 AM

Details

  • updates ios dependency (to 5.4.0) and android dep. (to 5.6.1)
  • updates example file to test the new trackEvent method with complex properties
  • updates OneSignalController.java & OneSignalPush.java to expose new android sdk trackEvent method. Adds Map helper functions to deal with complex object properties
  • updates OneSignalPush.m (& header) to expose new track ios sdk trackEvent method
  • updates main UserNamespace.ts file to have new trackEvent method to call respective platform's trackEvent function

Motivation

Want to allow usage for custom events method to more sdks / developers.

Testing

  • You can run the example file and check the dashboard custom events logs
  • For android run: ionic capacitor run android
  • For ios run: ionic capacitor run ios

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

This change is Reviewable

@fadi-george fadi-george requested a review from a team as a code owner January 29, 2026 19:59
@claude
Copy link
Copy Markdown

claude bot commented Jan 29, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Copy link
Copy Markdown
Contributor

@nan-li nan-li left a comment

Choose a reason for hiding this comment

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

LGTM thx!

@fadi-george fadi-george merged commit a85fbab into main Jan 30, 2026
9 checks passed
@fadi-george fadi-george deleted the fg/custom-events branch January 30, 2026 19:09
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