From bb60c99d1427013d05a992eeace6f4213608eb51 Mon Sep 17 00:00:00 2001 From: Elliot Mawby Date: Wed, 26 Jun 2024 12:07:41 -0700 Subject: [PATCH] cleanup comments for notifications tests and bundle utils --- .../OneSignalCore/Source/OSBundleUtils.h | 28 ++++++++++++----- .../OneSignalCore/Source/OSBundleUtils.m | 28 ++++++++++++----- .../OneSignalNotificationsTests.swift | 30 ++++++++++++++----- 3 files changed, 64 insertions(+), 22 deletions(-) diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSBundleUtils.h b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSBundleUtils.h index a00b07de3..d86f1940f 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSBundleUtils.h +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSBundleUtils.h @@ -1,10 +1,24 @@ -// -// OSBundleUtils.h -// OneSignal -// -// Created by Elliot Mawby on 6/20/24. -// Copyright © 2024 Hiptic. All rights reserved. -// +/* + Modified MIT License + Copyright 2024 OneSignal + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ @interface OSBundleUtils : NSObject + (BOOL)isAppUsingUIScene; diff --git a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSBundleUtils.m b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSBundleUtils.m index 45bf5090c..dfd407799 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSBundleUtils.m +++ b/iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSBundleUtils.m @@ -1,10 +1,24 @@ -// -// OSBundleUtils.m -// OneSignalCore -// -// Created by Elliot Mawby on 6/17/24. -// Copyright © 2024 Hiptic. All rights reserved. -// +/* + Modified MIT License + Copyright 2024 OneSignal + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ #import #import "OSBundleUtils.h" diff --git a/iOS_SDK/OneSignalSDK/OneSignalNotificationsTests/OneSignalNotificationsTests.swift b/iOS_SDK/OneSignalSDK/OneSignalNotificationsTests/OneSignalNotificationsTests.swift index e452ae22e..69df25803 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalNotificationsTests/OneSignalNotificationsTests.swift +++ b/iOS_SDK/OneSignalSDK/OneSignalNotificationsTests/OneSignalNotificationsTests.swift @@ -1,10 +1,24 @@ -// -// OneSignalNotificationsTests.swift -// OneSignalNotificationsTests -// -// Created by Elliot Mawby on 6/17/24. -// Copyright © 2024 Hiptic. All rights reserved. -// +/* + Modified MIT License + Copyright 2024 OneSignal + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + 1. The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + 2. All copies of substantial portions of the Software may only be used in connection + with services provided by OneSignal. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ import XCTest import OneSignalNotifications @@ -48,7 +62,7 @@ final class OneSignalNotificationsTests: XCTestCase { OneSignalCoreMocks.resignActive() // App becomes active the app OneSignalCoreMocks.becomeActive() - // Ensure that badge count == 0 + // Ensure that badge count == 1 XCTAssertEqual(UIApplication.shared.applicationIconBadgeNumber, 1) }