diff --git a/CHANGELOG.md b/CHANGELOG.md index 541116e..cbc7bcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ +# 3.0.0 +This is for Xcode 9, Swift 4.0. + +**Please note that _ValueCoding_ is marked as deprecated, as it has been rendered obsolete by Apple introducing the `Codable` protocol. The project has been mothballed, and will no longer be maintained.** + # 2.2.0 -This is for Xcode 9, Swift 3.2 +This is for Xcode 9, Swift 3.2. # 2.1.0 This is for Xcode 8.1, Swift 3.0.1 diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..8981a60 --- /dev/null +++ b/Package.swift @@ -0,0 +1,23 @@ +// +// ValueCoding +// File created on 14/09/2017. +// +// Copyright (c) 2015-2017 Daniel Thorpe +// +// ValueCoding is licensed under the MIT License. Read the full license at +// https://github.com/danthorpe/ValueCoding/blob/master/LICENSE +// + +// swift-tools-version:4.0 + +import PackageDescription + +let package = Package( + name: "ValueCoding", + targets: [ + Target(name: "ValueCoding") + ], + exclude: [ + "Tests" + ] +) diff --git a/README.md b/README.md index 507b15d..a602821 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ # ValueCoding +**Please note that _ValueCoding_ is marked as deprecated, as it has been rendered obsolete by Apple introducing the `Codable` protocol with Swift 4.0. The project has been mothballed, and will no longer be maintained.** + ValueCoding is a simple pair of protocols to support the coding of Swift value types. It works by allowing a value type, which must conform to `ValueCoding` to define via a typealias its *coder*. The coder is another type which implements the `CoderType` protocol. This type will typically be an `NSObject` which implements `NSCoding` and is an adaptor which is responsible for encoding and decoding the properties of the value. diff --git a/Sources/ValueCoding.swift b/Sources/ValueCoding.swift index 7f48790..051360b 100644 --- a/Sources/ValueCoding.swift +++ b/Sources/ValueCoding.swift @@ -12,6 +12,7 @@ import Foundation // MARK: - CodingProtocol +@available(*, deprecated, message: "ValueCoding is deprecated as it has been rendered obsolete by Codable in Swift 4.") public protocol CodedValue { /** @@ -29,6 +30,7 @@ public protocol CodedValue { A generic protocol for classes which can encode/decode value types. */ +@available(*, deprecated, message: "ValueCoding is deprecated as it has been rendered obsolete by Codable in Swift 4.") public protocol CodingProtocol: CodedValue { /// Required initializer receiving the wrapped value type. @@ -41,6 +43,7 @@ public protocol CodingProtocol: CodedValue { A generic protocol for value types which require coding. */ +@available(*, deprecated, message: "ValueCoding is deprecated as it has been rendered obsolete by Codable in Swift 4.") public protocol ValueCoding { /** @@ -53,6 +56,7 @@ public protocol ValueCoding { // MARK: - Protocol Extensions +@available(*, deprecated, message: "ValueCoding is deprecated as it has been rendered obsolete by Codable in Swift 4.") public extension Sequence where Iterator.Element: CodingProtocol { /// Access the values from a sequence of coders. @@ -65,6 +69,7 @@ public extension Sequence where Iterator.Element: CodingProtocol { Static methods for decoding `AnyObject` to Self, and returning encoded object of Self. */ +@available(*, deprecated, message: "ValueCoding is deprecated as it has been rendered obsolete by Codable in Swift 4.") public extension ValueCoding where Coder: NSCoding, Coder.Value == Self { /** @@ -119,6 +124,7 @@ public extension ValueCoding where Coder: NSCoding, Coder.Value == Self { } } +@available(*, deprecated, message: "ValueCoding is deprecated as it has been rendered obsolete by Codable in Swift 4.") extension Sequence where Iterator.Element: ValueCoding, Iterator.Element.Coder: NSCoding, @@ -140,6 +146,7 @@ extension Sequence where } } +@available(*, deprecated, message: "ValueCoding is deprecated as it has been rendered obsolete by Codable in Swift 4.") extension Sequence where Iterator.Element: Sequence, Iterator.Element.Iterator.Element: ValueCoding, diff --git a/Supporting Files/ValueCoding.h b/Supporting Files/ValueCoding.h index fee0b27..209afe7 100644 --- a/Supporting Files/ValueCoding.h +++ b/Supporting Files/ValueCoding.h @@ -1,7 +1,11 @@ // -// ValueCoding +// ValueCoding +// File created on 11/10/2015. // -// Copyright © 2016 Daniel Thorpe. All rights reserved. +// Copyright (c) 2015-2017 Daniel Thorpe +// +// ValueCoding is licensed under the MIT License. Read the full license at +// https://github.com/danthorpe/ValueCoding/blob/master/LICENSE // #import diff --git a/Supporting Files/ValueCoding.xcconfig b/Supporting Files/ValueCoding.xcconfig index b4b4359..c43afeb 100644 --- a/Supporting Files/ValueCoding.xcconfig +++ b/Supporting Files/ValueCoding.xcconfig @@ -1,7 +1,11 @@ // -// ValueCoding +// ValueCoding +// File created on 11/10/2015. // -// Copyright © 2016 Daniel Thorpe. All rights reserved. +// Copyright (c) 2015-2017 Daniel Thorpe +// +// ValueCoding is licensed under the MIT License. Read the full license at +// https://github.com/danthorpe/ValueCoding/blob/master/LICENSE // #include "Version.xcconfig" @@ -24,7 +28,8 @@ APPLICATION_EXTENSION_API_ONLY_xctest = NO APPLICATION_EXTENSION_API_ONLY = $(APPLICATION_EXTENSION_API_ONLY_$(WRAPPER_EXTENSION)) // Build Settings -SWIFT_VERSION = 3.2 +SWIFT_VERSION = 4.0 +SWIFT_SWIFT3_OBJC_INFERENCE = YES SUPPORTED_PLATFORMS = macosx iphoneos appletvos watchos appletvsimulator iphonesimulator watchsimulator CLANG_ENABLE_CODE_COVERAGE = YES diff --git a/Supporting Files/Version.xcconfig b/Supporting Files/Version.xcconfig index f7555ee..b25b4c5 100644 --- a/Supporting Files/Version.xcconfig +++ b/Supporting Files/Version.xcconfig @@ -1 +1,11 @@ -VALUECODING_VERSION = 2.2.0 +// +// ValueCoding +// File created on 11/10/2015. +// +// Copyright (c) 2015-2017 Daniel Thorpe +// +// ValueCoding is licensed under the MIT License. Read the full license at +// https://github.com/danthorpe/ValueCoding/blob/master/LICENSE +// + +VALUECODING_VERSION = 3.0.0 diff --git a/Supporting Files/Warnings.xcconfig b/Supporting Files/Warnings.xcconfig index 676b23d..dd30784 100644 --- a/Supporting Files/Warnings.xcconfig +++ b/Supporting Files/Warnings.xcconfig @@ -1,7 +1,11 @@ // -// ValueCoding +// ValueCoding +// File created on 11/10/2015. // -// Copyright © 2016 ProcedureKit. All rights reserved. +// Copyright (c) 2015-2017 Daniel Thorpe +// +// ValueCoding is licensed under the MIT License. Read the full license at +// https://github.com/danthorpe/ValueCoding/blob/master/LICENSE // CLANG_WARN_DOCUMENTATION_COMMENTS = YES @@ -25,3 +29,9 @@ GCC_WARN_UNUSED_FUNCTION = YES GCC_WARN_UNUSED_VARIABLE = YES CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR CLANG_ANALYZER_NONNULL = YES +CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES +CLANG_WARN_COMMA = YES +CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES +CLANG_WARN_OBJC_LITERAL_CONVERSION = YES +CLANG_WARN_RANGE_LOOP_ANALYSIS = YES +CLANG_WARN_STRICT_PROTOTYPES = YES diff --git a/ValueCoding.podspec b/ValueCoding.podspec index 1b1e9bc..c27b8b0 100644 --- a/ValueCoding.podspec +++ b/ValueCoding.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "ValueCoding" - s.version = "2.2.0" + s.version = "3.0.0" s.summary = "Swift protocols for encoding/decoding value types." s.description = <<-DESC diff --git a/ValueCoding.xcodeproj/project.pbxproj b/ValueCoding.xcodeproj/project.pbxproj index a822611..f2d1405 100644 --- a/ValueCoding.xcodeproj/project.pbxproj +++ b/ValueCoding.xcodeproj/project.pbxproj @@ -169,16 +169,16 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 0810; + LastUpgradeCheck = 0900; TargetAttributes = { 658A7B5B1D776B7600F897C8 = { CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; ProvisioningStyle = Automatic; }; 658A7B641D776B7600F897C8 = { CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; ProvisioningStyle = Automatic; }; }; diff --git a/ValueCoding.xcodeproj/xcshareddata/xcschemes/ValueCoding.xcscheme b/ValueCoding.xcodeproj/xcshareddata/xcschemes/ValueCoding.xcscheme index 089de83..9fad5a1 100644 --- a/ValueCoding.xcodeproj/xcshareddata/xcschemes/ValueCoding.xcscheme +++ b/ValueCoding.xcodeproj/xcshareddata/xcschemes/ValueCoding.xcscheme @@ -1,6 +1,6 @@ @@ -56,6 +57,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO"