Skip to content

Commit a6fdff8

Browse files
authored
Merge pull request #9 from macblazer/fix/cocoapods_ios_target
Fix CocoaPods iOS target and update version number
2 parents d3c0091 + 5269f84 commit a6fdff8

File tree

5 files changed

+20
-7
lines changed

5 files changed

+20
-7
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.1.2] - 2023-08-11
8+
### Fixed
9+
- Updated podspec file to target iOS 9 and higher to work around a problem with CocoaPods and Xcode 14.3+ ([Issue #8](https://github.com/jamf/ManagedAppConfigLib/issues/8)) [@macblazer](https://github.com/macblazer).
10+
11+
### Changed
12+
- Simplified the nested `Listener` type definition inside of the two property wrappers to be Swift 6 compatible.
13+
- To improve code security, all commits going forward now require a [verified signature](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).
14+
715
## [1.1.1] - 2023-05-08
816
### Added
917
- Added CODEOWNERS file.

ManagedAppConfigLib.podspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
Pod::Spec.new do |s|
22
s.name = "ManagedAppConfigLib"
3-
s.version = "1.1.1"
3+
s.version = "1.1.2"
44
s.summary = "Simplify working with Managed App Configuration and Feedback."
55

66
s.description = <<-DESC
7-
The purpose of ManagedAppConfigLib is to make it easier to work with Apple's [Managed App Configuration](https://developer.apple.com/library/content/samplecode/sc2279/Introduction/Intro.html) by providing a couple property wrappers and an object-based approach.
7+
ManagedAppConfigLib makes it easier to work with Apple's [Managed App Configuration](https://developer.apple.com/library/content/samplecode/sc2279/Introduction/Intro.html) by providing a couple property wrappers and an object-based approach.
88
DESC
99

1010
s.homepage = "https://appconfig.org/"
1111
s.license = { :type => "MIT", :file => "LICENSE" }
1212
s.author = "Kyle Hammond", "James Felton"
1313

1414
s.swift_versions = "5.1"
15-
s.platform = :ios, "8.0"
15+
s.platform = :ios, "9.0" # Actually supports iOS 8, but CocoaPods issue #11839
1616
s.tvos.deployment_target = "10.2"
1717
s.macos.deployment_target = "11"
1818

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,8 @@ ManagedAppConfig.shared.addAppConfigChangedHook(myClosure)
8686
let numberOfErrors = 0
8787
ManagedAppConfig.shared.updateValue(numberOfErrors, forKey: "errorCount")
8888
```
89+
90+
## Contributing
91+
92+
This repository now requires verified signed commits. You can find out more about
93+
[signing commits on GitHub Docs](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).

Sources/ManagedAppConfigLib/AppConfig.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import SwiftUI
1616
@available(macOS 11, iOS 14.0, tvOS 14.0, *)
1717
@propertyWrapper public struct AppConfig<Value>: DynamicProperty {
1818
// Very simple listener that observes AppConfig changes, and has a local copy of the AppConfig's value.
19-
private final class Listener<Value>: ObservableObject {
19+
private final class Listener: ObservableObject {
2020
var subscriber: NSObjectProtocol?
2121
var value: Value? {
2222
willSet {
@@ -45,7 +45,7 @@ import SwiftUI
4545
///
4646
/// Thanks to `DynamicProperty` conformance, when this object sends it's `objectWillChange` message
4747
/// SwiftUI will redraw any views depending on this property wrapper.
48-
@StateObject private var core = Listener<Value>()
48+
@StateObject private var core = Listener()
4949
private let key: String
5050
private let defaults: UserDefaults
5151
private let defaultValue: Value

Sources/ManagedAppConfigLib/AppConfigPlain.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import Foundation
1616
@available(macOS 11, iOS 7.0, tvOS 10.2, *)
1717
@propertyWrapper public struct AppConfigPlain<Value> {
1818
// Very simple listener that observes AppConfig changes, and updates it's internal copy of the value as needed.
19-
private final class Listener<Value> {
19+
private final class Listener {
2020
var subscriber: NSObjectProtocol?
2121
var value: Value?
2222

@@ -38,7 +38,7 @@ import Foundation
3838
}
3939

4040
/// This object is the dynamic listener for changes to the app config and storage for the value.
41-
private var listener = Listener<Value>()
41+
private var listener = Listener()
4242
private let defaultValue: Value
4343

4444
/// The value from Managed App Configuration or the defaultValue provided to the initializer.

0 commit comments

Comments
 (0)