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

Rename OneSignalCore class to prevent conflict with the framework name #1382

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

nan-li
Copy link
Contributor

@nan-li nan-li commented Mar 6, 2024

Description

One Line Summary

Rename OneSignalCore class to prevent conflict with the framework name, which was causing Swift apps to have build errors.

Details

Motivation

After we released v5.1.1 with the new CD action and then v5.1.2 manually (thinking the error was due to the CD process), both releases caused Swift build errors in apps that looked like this.

Screenshot 2024-03-06 at 11 31 06 AM

I noticed only OneSignalFramework import was erroring. Using OneSignalUser or OneSignalCore directly was ok.

It is because of adding a class called OneSignalCore in the OneSignalCore framework in #1371. The Swift interface in OneSignalFramework had a conflict between the class name and framework name. No other modules have a Swift interface.

Screenshot 2024-03-06 at 11 31 31 AM

Renamed the class to OneSignalCoreImpl but considered other choices like "manager", "controller", etc.

Scope

Renaming internal class

Testing

Unit testing

None

Manual testing

  • I tested this on my iphone 13 with ios 17.2
  • I added the OneSignalXCFramework pod to a project using the local path to the iOS SDK and confirmed the error went away and the app built and ran successfully.
  • I also confirmed I was using the correct version by testing a behavior change in Change OSPushSubscriptionState's "nil" json values to be "" #1373

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
  • 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.
  • I have reviewed this PR myself, ensuring it meets each checklist item

This change is Reviewable

Named `OneSignalCore` class to `OneSignalCoreImpl`
@nan-li nan-li merged commit 67ef02b into main Mar 6, 2024
4 checks passed
@nan-li nan-li deleted the fix/OneSignalCore_naming branch March 6, 2024 20:31
@nan-li nan-li mentioned this pull request Mar 6, 2024
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.

None yet

2 participants