Skip to content
This repository has been archived by the owner on Jun 11, 2018. It is now read-only.

Commit

Permalink
3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
danthorpe committed Sep 14, 2017
2 parents 48e6e88 + cb8e313 commit 0d9605e
Show file tree
Hide file tree
Showing 11 changed files with 82 additions and 14 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
23 changes: 23 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -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"
]
)
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 7 additions & 0 deletions Sources/ValueCoding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

/**
Expand All @@ -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.
Expand All @@ -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 {

/**
Expand All @@ -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.
Expand All @@ -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 {

/**
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down
8 changes: 6 additions & 2 deletions Supporting Files/ValueCoding.h
Original file line number Diff line number Diff line change
@@ -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 <Foundation/Foundation.h>
Expand Down
11 changes: 8 additions & 3 deletions Supporting Files/ValueCoding.xcconfig
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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

Expand Down
12 changes: 11 additions & 1 deletion Supporting Files/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -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
14 changes: 12 additions & 2 deletions Supporting Files/Warnings.xcconfig
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion ValueCoding.podspec
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions ValueCoding.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0810"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
Expand Down Expand Up @@ -56,6 +57,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down

0 comments on commit 0d9605e

Please sign in to comment.