From d2efa4a9a3d5196fb06677e9938b5644bef5ef0b Mon Sep 17 00:00:00 2001 From: Kyle Hammond Date: Fri, 5 May 2023 14:26:48 -0500 Subject: [PATCH 1/4] Update copyright info for 2023 and simply "Jamf". --- .github/workflows/publish_docs.yml | 3 +++ .github/workflows/run_tests.yml | 3 +++ LICENSE | 2 +- README.md | 6 ++---- Sources/ManagedAppConfigLib/AppConfig.swift | 2 +- Sources/ManagedAppConfigLib/AppConfigPlain.swift | 8 ++++---- Sources/ManagedAppConfigLib/AppConfigService.swift | 2 +- Sources/ManagedAppConfigLib/ManagedAppConfig.swift | 2 +- Tests/ManagedAppConfigLibTests/AppConfigPlainTests.swift | 2 +- 9 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish_docs.yml b/.github/workflows/publish_docs.yml index dbba42a..91623b7 100644 --- a/.github/workflows/publish_docs.yml +++ b/.github/workflows/publish_docs.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: MIT +# Copyright (c) 2022-2023 Jamf + name: Build and Publish Docs on: diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index bb1b68e..cc58e44 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: MIT +# Copyright (c) 2022-2023 Jamf + name: Run unit tests on: diff --git a/LICENSE b/LICENSE index 00c475d..367378c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2022 Jamf Open Source Community +Copyright 2023 Jamf 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: diff --git a/README.md b/README.md index bce591f..f8dd755 100644 --- a/README.md +++ b/README.md @@ -27,13 +27,11 @@ dependencies: [ ], ``` -## Complete Documentation +## Learn More [The documentation](https://jamf.github.io/ManagedAppConfigLib/documentation/managedappconfiglib/) for this package was generated by [DocC](https://developer.apple.com/documentation/docc) -from GitHub Actions. Take a look at the workflow file -[publish_docs.yml](https://github.com/jamf/ManagedAppConfigLib/blob/main/.github/workflows/publish_docs.yml) -for more details. +using [publish_docs.yml](https://github.com/jamf/ManagedAppConfigLib/blob/main/.github/workflows/publish_docs.yml) with GitHub Actions. ## Basic Usage You will need to `import ManagedAppConfigLib` in each Swift file you wish to use it. diff --git a/Sources/ManagedAppConfigLib/AppConfig.swift b/Sources/ManagedAppConfigLib/AppConfig.swift index 8083112..4237b3a 100644 --- a/Sources/ManagedAppConfigLib/AppConfig.swift +++ b/Sources/ManagedAppConfigLib/AppConfig.swift @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: MIT - Copyright (c) 2022 Jamf Open Source Community + Copyright (c) 2022-2023 Jamf */ import Foundation diff --git a/Sources/ManagedAppConfigLib/AppConfigPlain.swift b/Sources/ManagedAppConfigLib/AppConfigPlain.swift index fa54b44..5a1485f 100644 --- a/Sources/ManagedAppConfigLib/AppConfigPlain.swift +++ b/Sources/ManagedAppConfigLib/AppConfigPlain.swift @@ -1,7 +1,7 @@ /* - SPDX-License-Identifier: MIT - Copyright (c) 2022 Jamf Open Source Community -*/ + SPDX-License-Identifier: MIT + Copyright (c) 2022-2023 Jamf + */ import Foundation @@ -25,7 +25,7 @@ import Foundation AppConfigService.shared.use(userDefaults: store) value = AppConfigService.shared.value(for: key, store) ?? defaultValue subscriber = NotificationCenter.default.addObserver(forName: .appConfigMayHaveChanged, - object: store, queue: nil) { [weak self] _ in + object: store, queue: nil) { [weak self] _ in guard let self = self else { return } self.value = AppConfigService.shared.value(for: key, store) ?? defaultValue } diff --git a/Sources/ManagedAppConfigLib/AppConfigService.swift b/Sources/ManagedAppConfigLib/AppConfigService.swift index a83c5ba..0826a67 100644 --- a/Sources/ManagedAppConfigLib/AppConfigService.swift +++ b/Sources/ManagedAppConfigLib/AppConfigService.swift @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: MIT - Copyright (c) 2022 Jamf Open Source Community + Copyright (c) 2022-2023 Jamf */ import Foundation diff --git a/Sources/ManagedAppConfigLib/ManagedAppConfig.swift b/Sources/ManagedAppConfigLib/ManagedAppConfig.swift index b03eef9..2109713 100644 --- a/Sources/ManagedAppConfigLib/ManagedAppConfig.swift +++ b/Sources/ManagedAppConfigLib/ManagedAppConfig.swift @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: MIT - Copyright (c) 2017-2022 Jamf Open Source Community + Copyright (c) 2017-2023 Jamf */ import Foundation diff --git a/Tests/ManagedAppConfigLibTests/AppConfigPlainTests.swift b/Tests/ManagedAppConfigLibTests/AppConfigPlainTests.swift index 3c825a0..c4a6629 100644 --- a/Tests/ManagedAppConfigLibTests/AppConfigPlainTests.swift +++ b/Tests/ManagedAppConfigLibTests/AppConfigPlainTests.swift @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: MIT - Copyright (c) 2017-2022 Jamf Open Source Community + Copyright (c) 2017-2023 Jamf */ import ManagedAppConfigLib From 38b252b8731ecefa049236316c443c478717e8fb Mon Sep 17 00:00:00 2001 From: Kyle Hammond Date: Fri, 5 May 2023 14:28:03 -0500 Subject: [PATCH 2/4] Update GitHub action to run tests on iOS and tvOS as well as macOS. --- .github/workflows/run_tests.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index cc58e44..24e2cf6 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -17,12 +17,17 @@ concurrency: cancel-in-progress: true jobs: - spm_tests: - name: Run package tests - runs-on: macos-12 - steps: - - name: Checkout - uses: actions/checkout@v3 + Unit Tests: + runs-on: macos-latest + name: Run unit tests - - name: Unit Test + steps: + - uses: actions/checkout@v3 + - name: Unit Test (macOS) run: swift test -v + + - name: Unit Test (iOS) + run: xcodebuild test -scheme ManagedAppConfigLib -sdk iphonesimulator16.2 -destination "OS=16.2,name=iPhone 13" + + - name: Unit Test (tvOS) + run: xcodebuild test -scheme ManagedAppConfigLib -sdk appletvsimulator16.1 -destination "OS=16.1,name=Apple TV" From 32dab0696428ee00dbc16414c7e8e31e04afc0ef Mon Sep 17 00:00:00 2001 From: Kyle Hammond Date: Sat, 6 May 2023 11:52:50 -0500 Subject: [PATCH 3/4] Added a CODEOWNERS file and updated version number, CHANGELOG, and the minimum macOS version of the Swift Package. --- .github/CODEOWNERS | 5 +++++ CHANGELOG.md | 11 +++++++++++ ManagedAppConfigLib.podspec | 2 +- Package.swift | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..bab0429 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: MIT +# Copyright (c) 2022-2023 Jamf + + +* @macblazer @jamf/apple-natives-write diff --git a/CHANGELOG.md b/CHANGELOG.md index b0cab56..1c04b1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.1] - 2023-05-08 +### Added +- Added CODEOWNERS file. + +### Fixed +- Fixed issue compiling for iOS and tvOS [PR #6](https://github.com/jamf/ManagedAppConfigLib/pull/6) [@crakaC](https://github.com/crakaC). + +### Changed +- Updated GitHub action to run tests on macOS, iOS, and tvOS. +- Updated copyright to be simply "Jamf". + ## [1.1.0] - 2022-10-28 ### Added - Property wrapper for SwiftUI and non-SwiftUI to make grabbing AppConfig values very simple. diff --git a/ManagedAppConfigLib.podspec b/ManagedAppConfigLib.podspec index 4ab0961..ee4cd38 100644 --- a/ManagedAppConfigLib.podspec +++ b/ManagedAppConfigLib.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "ManagedAppConfigLib" - s.version = "1.1.0" + s.version = "1.1.1" s.summary = "Simplify working with Managed App Configuration and Feedback." s.description = <<-DESC diff --git a/Package.swift b/Package.swift index 4ab4d92..2652b5e 100644 --- a/Package.swift +++ b/Package.swift @@ -4,7 +4,7 @@ import PackageDescription let package = Package( name: "ManagedAppConfigLib", platforms: [ - .macOS(.v10_15), + .macOS(.v11), .iOS(.v8), .tvOS(.v10) ], From 5ab4b737b1ba26a8624e2f25e885ed341673fadf Mon Sep 17 00:00:00 2001 From: Kyle Hammond Date: Sat, 6 May 2023 12:04:36 -0500 Subject: [PATCH 4/4] Fix the GitHub Action workflow identifier. --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 24e2cf6..7333c8c 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -17,7 +17,7 @@ concurrency: cancel-in-progress: true jobs: - Unit Tests: + UnitTests: runs-on: macos-latest name: Run unit tests