From 7f7cafd66100c6f63936c31db083217f3a15e190 Mon Sep 17 00:00:00 2001 From: Benedek Kozma Date: Wed, 17 Jul 2024 23:43:09 +0200 Subject: [PATCH 1/4] Remove build status badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 098610c..6dc41ea 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # TypedNotificationCenter -[![Build Status](https://github.com/Cyberbeni/TypedNotificationCenter/workflows/Test%20latest%20OSs/badge.svg)](https://github.com/Cyberbeni/TypedNotificationCenter/actions) [![Code coverage](https://codecov.io/github/Cyberbeni/TypedNotificationCenter/coverage.svg?branch=master)](https://codecov.io/github/Cyberbeni/TypedNotificationCenter?branch=master) [![codebeat badge](https://codebeat.co/badges/a94b1565-4033-4efb-b60b-76ba952ff4ad)](https://codebeat.co/projects/github-com-cyberbeni-typednotificationcenter-master) [![GitHub release](https://img.shields.io/github/release/Cyberbeni/TypedNotificationCenter.svg)](https://GitHub.com/Cyberbeni/TypedNotificationCenter/releases/) +[![Code coverage](https://codecov.io/github/Cyberbeni/TypedNotificationCenter/coverage.svg?branch=master)](https://codecov.io/github/Cyberbeni/TypedNotificationCenter?branch=master) [![codebeat badge](https://codebeat.co/badges/a94b1565-4033-4efb-b60b-76ba952ff4ad)](https://codebeat.co/projects/github-com-cyberbeni-typednotificationcenter-master) [![GitHub release](https://img.shields.io/github/release/Cyberbeni/TypedNotificationCenter.svg)](https://GitHub.com/Cyberbeni/TypedNotificationCenter/releases/) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php) ![Platforms](https://img.shields.io/badge/platform-iOS%20%7C%20Linux%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS-lightgrey) [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Swift Package Manager Compatible](https://img.shields.io/badge/SwiftPM-compatible-4BC51D.svg?style=flat)](https://swift.org/package-manager/) [![CocoaPods Compatible](https://cocoapod-badges.herokuapp.com/v/TypedNotificationCenter/badge.png)](https://cocoapods.org/pods/TypedNotificationCenter) From 48822bc1c122829db28dd6c1ccc87c3d450e97d3 Mon Sep 17 00:00:00 2001 From: Benedek Kozma Date: Wed, 17 Jul 2024 23:52:37 +0200 Subject: [PATCH 2/4] Fix CocoaPods badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6dc41ea..ebe583c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Code coverage](https://codecov.io/github/Cyberbeni/TypedNotificationCenter/coverage.svg?branch=master)](https://codecov.io/github/Cyberbeni/TypedNotificationCenter?branch=master) [![codebeat badge](https://codebeat.co/badges/a94b1565-4033-4efb-b60b-76ba952ff4ad)](https://codebeat.co/projects/github-com-cyberbeni-typednotificationcenter-master) [![GitHub release](https://img.shields.io/github/release/Cyberbeni/TypedNotificationCenter.svg)](https://GitHub.com/Cyberbeni/TypedNotificationCenter/releases/) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php) - ![Platforms](https://img.shields.io/badge/platform-iOS%20%7C%20Linux%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS-lightgrey) [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Swift Package Manager Compatible](https://img.shields.io/badge/SwiftPM-compatible-4BC51D.svg?style=flat)](https://swift.org/package-manager/) [![CocoaPods Compatible](https://cocoapod-badges.herokuapp.com/v/TypedNotificationCenter/badge.png)](https://cocoapods.org/pods/TypedNotificationCenter) + ![Platforms](https://img.shields.io/badge/platform-iOS%20%7C%20Linux%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS-lightgrey) [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Swift Package Manager Compatible](https://img.shields.io/badge/SwiftPM-compatible-4BC51D.svg?style=flat)](https://swift.org/package-manager/) [![CocoaPods Compatible](https://img.shields.io/badge/CocoaPods-compatible-4BC51D.svg?style=flat)](https://cocoapods.org/pods/TypedNotificationCenter) This framework is about rethinking Apple's NotificationCenter to be more typesafe and about removing uncertainity of the needed value being present in the userInfo dictionary. It can be also used to handle NSNotification.Name subscriptions with better performance than NSNotificationCenter. From 8fcc6c51c00ff24b61aa51f247a31f35d881ff04 Mon Sep 17 00:00:00 2001 From: Benedek Kozma Date: Thu, 18 Jul 2024 00:00:11 +0200 Subject: [PATCH 3/4] Fix test workflow --- .github/workflows/run_tests.yml | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 2a40a25..c53f20b 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -11,8 +11,7 @@ jobs: - name: Install xcbeautify uses: Cyberbeni/install-swift-tool@v2 with: - url: https://github.com/Cyberbeni/xcbeautify - branch: measurement-parsing + url: https://github.com/cpisciotta/xcbeautify - name: Test shell: bash run: | @@ -29,21 +28,15 @@ jobs: test-performance: strategy: matrix: - os: [ubuntu-latest, macos-12] + os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v3 - - name: xcode-select - uses: maxim-lobanov/setup-xcode@v1 - if: runner.os == 'macOS' - with: - xcode-version: '14.2' - name: Install xcbeautify uses: Cyberbeni/install-swift-tool@v2 with: - url: https://github.com/Cyberbeni/xcbeautify - branch: measurement-parsing + url: https://github.com/cpisciotta/xcbeautify - name: Test shell: bash run: | @@ -54,14 +47,10 @@ jobs: strategy: matrix: os: [macOS, iOS, tvOS] - runs-on: macos-12 + runs-on: macos-latest steps: - name: Checkout uses: actions/checkout@v3 - - name: xcode-select - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: '14.2' - name: Test run: fastlane scan --scheme "TypedNotificationCenter ${{ matrix.os }}" --disable_slide_to_type false - name: Codecov @@ -73,14 +62,10 @@ jobs: strategy: matrix: os: [iOS] - runs-on: macos-12 + runs-on: macos-latest steps: - name: Checkout uses: actions/checkout@v3 - - name: xcode-select - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: '14.2' - name: Test run: fastlane scan --scheme "TNC UI Test Host ${{ matrix.os }}" - name: Codecov From 5f24d84997557b5366690b28868c6242ea487ea5 Mon Sep 17 00:00:00 2001 From: Cyberbeni Date: Wed, 17 Jul 2024 22:04:00 +0000 Subject: [PATCH 4/4] Commit from GitHub Actions (Manual Format) --- .../TypedNotificationCenter+GenericBridgedNotification.swift | 2 +- .../Core/TypedNotificationObservation.swift | 2 +- .../TypedNotificationCenter Test Host Mac/AppDelegate.swift | 2 +- .../TypedNotificationCenter Test Host TV/AppDelegate.swift | 2 +- .../TypedNotificationCenter Test Host iOS/AppDelegate.swift | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/TypedNotificationCenter/BridgedNotifications/GenericBridgedNotification/TypedNotificationCenter+GenericBridgedNotification.swift b/Sources/TypedNotificationCenter/BridgedNotifications/GenericBridgedNotification/TypedNotificationCenter+GenericBridgedNotification.swift index 30739c0..ddebf43 100644 --- a/Sources/TypedNotificationCenter/BridgedNotifications/GenericBridgedNotification/TypedNotificationCenter+GenericBridgedNotification.swift +++ b/Sources/TypedNotificationCenter/BridgedNotifications/GenericBridgedNotification/TypedNotificationCenter+GenericBridgedNotification.swift @@ -1,5 +1,5 @@ // -// TypedNotificationObservation+GenericBridgedNotification.swift +// TypedNotificationCenter+GenericBridgedNotification.swift // TypedNotificationCenter // // Created by Benedek Kozma on 2021. 03. 23. diff --git a/Sources/TypedNotificationCenter/Core/TypedNotificationObservation.swift b/Sources/TypedNotificationCenter/Core/TypedNotificationObservation.swift index b0491c2..0f71d67 100644 --- a/Sources/TypedNotificationCenter/Core/TypedNotificationObservation.swift +++ b/Sources/TypedNotificationCenter/Core/TypedNotificationObservation.swift @@ -27,7 +27,7 @@ import Foundation public class TypedNotificationObservation { - internal init() {} + init() {} deinit { invalidate() } diff --git a/UI Test host apps/TypedNotificationCenter Test Host Mac/AppDelegate.swift b/UI Test host apps/TypedNotificationCenter Test Host Mac/AppDelegate.swift index a6839df..e719719 100644 --- a/UI Test host apps/TypedNotificationCenter Test Host Mac/AppDelegate.swift +++ b/UI Test host apps/TypedNotificationCenter Test Host Mac/AppDelegate.swift @@ -27,7 +27,7 @@ import Cocoa import TypedNotificationCenter -@NSApplicationMain +@main class AppDelegate: NSObject, NSApplicationDelegate { var observation: Any? diff --git a/UI Test host apps/TypedNotificationCenter Test Host TV/AppDelegate.swift b/UI Test host apps/TypedNotificationCenter Test Host TV/AppDelegate.swift index 4766609..ceaf8f4 100644 --- a/UI Test host apps/TypedNotificationCenter Test Host TV/AppDelegate.swift +++ b/UI Test host apps/TypedNotificationCenter Test Host TV/AppDelegate.swift @@ -26,7 +26,7 @@ import UIKit -@UIApplicationMain +@main class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? } diff --git a/UI Test host apps/TypedNotificationCenter Test Host iOS/AppDelegate.swift b/UI Test host apps/TypedNotificationCenter Test Host iOS/AppDelegate.swift index 8d5f239..ab60d4a 100644 --- a/UI Test host apps/TypedNotificationCenter Test Host iOS/AppDelegate.swift +++ b/UI Test host apps/TypedNotificationCenter Test Host iOS/AppDelegate.swift @@ -26,7 +26,7 @@ import UIKit -@UIApplicationMain +@main class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? }