Commit 0acb014
Fix Swizzling Test
• This is a *temporary* solution to a bug we've had with an old test.
• The `testSwizzling` test causes the `UNUserNotificationCenterDelegate` to get nullified on the notification center singleton.
• Since some tests use this delegate to mock a push notification delivery, this can break these tests
• Since XCTest cases are run in alphabetical order, we've been lucky that we've never noticed this in the past since `testSwizzling` was run AFTER all of our tests that use the `UNUserNotificationCenterDelegate.willPresentNotification...` method are alphabetically BEFORE the testSwizzling test
• TODO: The notification center delegate gets set to a dummy instance then nullified. We COULD fix this by simply resetting it back to the original value - but this causes issues with swizzling
• We will probably need to change the `setOneSignalUNDelegate` swizzle method to make sure it allows the UNUserNotificationCenterDelegate to be reset without messing up the swizzling which causes infinite loops, etc.1 parent c40cf0f commit 0acb014
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1918 | 1918 | | |
1919 | 1919 | | |
1920 | 1920 | | |
1921 | | - | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
1922 | 1925 | | |
1923 | 1926 | | |
1924 | 1927 | | |
| |||
0 commit comments