OneSignal / OneSignal-iOS-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native iOS app with OneSignal. https://onesignal.com
Other
496 stars 263 forks source link

[debug] Internal dump method infrastucture #1472

Open nan-li opened 2 months ago

nan-li commented 2 months ago

Description

One Line Summary

Add OneSignal.Debug._dump method to help log different services for debugging and testing.

Details

OSDebug namespace will have _dump added, but it will be implemented in the OneSignal module instead of the OneSignalCore module where the primary implementation of OneSignalLog lives. This is so OneSignal can call sub modules to log themselves such as services in the User module.

A new protocol called OSLoggable is added with a single method to logSelf().

Motivation

Scope

Just skeleton for dumping information.

Testing

Unit testing

None

Manual testing

Affected code checklist

Checklist

Overview

Testing

Final pass


This change is Reviewable

nan-li commented 2 months ago

Hmm the test OneSignalNotificationsTests.testClearBadgesWhenAppEntersForeground() keeps failing in the CI but succeeds locally..

Running the CI in [Fix] Handle incorrect 404, delay making requests to new IDs which passed last week to see if something changed unrelated to this PR, and that PR fails for this now too.

nan-li commented 2 months ago

Nevermind, I can revisit that test later down the line.