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 diff --git a/README.md b/README.md index 098610c..ebe583c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # 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) + ![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. 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? }