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/.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..7333c8c 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: @@ -14,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 + UnitTests: + 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" 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/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/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) ], 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