Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash in OneSignalAttachmentHandler trimURLSpacing #1411

Merged
merged 3 commits into from
Apr 29, 2024

Commits on Apr 18, 2024

  1. Consolidate helper method into one place

    * The method `trimURLSpacing` is defined in both OneSignalCoreHelper and OneSignalAttachmentHandler
    * Let's just use it in one place, the OneSignalCoreHelper, as this method is also used elsewhere.
    nan-li committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    72c1437 View commit details
    Browse the repository at this point in the history
  2. Add unit test for trimURLSpacing

    * This is not testable in Swift due to type safety, making it hard to pass in NSNull
    * But it is very possible for this method that expects NSString to receive NSNull due to processing a payload
    * Therefore, a test file in OneSignalCoreTests is created in Objective-C
    * As tests expand, these can be moved to more specific files
    nan-li committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    b5d1542 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d570649 View commit details
    Browse the repository at this point in the history