diff --git a/.gitignore b/.gitignore index 27df659..48a5272 100644 --- a/.gitignore +++ b/.gitignore @@ -36,8 +36,7 @@ playground.xcworkspace # Swift Package Manager # # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -# Package.pins +.swiftpm/ .build/ # CocoaPods diff --git a/CodableKeychain.podspec b/CodableKeychain.podspec index b25636c..062a351 100644 --- a/CodableKeychain.podspec +++ b/CodableKeychain.podspec @@ -13,6 +13,7 @@ Pod::Spec.new do |s| s.osx.deployment_target = '10.10' s.tvos.deployment_target = '9.0' s.watchos.deployment_target = '2.0' + s.swift_versions = ['4.2', '5.0'] s.source_files = 'Sources/*.swift' end diff --git a/Package.swift b/Package.swift index 3b2abf4..232d57f 100644 --- a/Package.swift +++ b/Package.swift @@ -1,3 +1,4 @@ +// swift-tools-version:5.0 // // Package.swift // @@ -24,4 +25,29 @@ import PackageDescription -let package = Package(name: "CodableKeychain", dependencies: [], exclude: ["Tests", "MobileHost"]) +let package = Package( + name: "CodableKeychain", + platforms: [ + .iOS(.v9), + .tvOS(.v9), + .macOS(.v10_10), + .watchOS(.v2) + ], + products: [ + .library( + name: "CodableKeychain", + targets: ["CodableKeychain"] + ) + ], + targets: [ + .target( + name: "CodableKeychain", + path: "Sources", + exclude: ["Info.plist"] + ) + ], + swiftLanguageVersions: [ + .v4_2, + .v5 + ] +) diff --git a/Package@swift-4.2.swift b/Package@swift-4.2.swift new file mode 100644 index 0000000..c0c4b40 --- /dev/null +++ b/Package@swift-4.2.swift @@ -0,0 +1,43 @@ +// swift-tools-version:4.2 +// +// Package.swift +// +// Copyright (c) 2017 Todd Kramer (http://www.tekramer.com) +// +// 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: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import PackageDescription + +let package = Package( + name: "CodableKeychain", + products: [ + .library( + name: "CodableKeychain", + targets: ["CodableKeychain"] + ) + ], + targets: [ + .target( + name: "CodableKeychain", + path: "Sources", + exclude: ["Info.plist"] + ) + ] +) diff --git a/README.md b/README.md index 96b58a8..2b253ec 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # CodableKeychain -![CocoaPods Version](https://cocoapod-badges.herokuapp.com/v/CodableKeychain/badge.png) [![Swift](https://img.shields.io/badge/swift-4.2-orange.svg?style=flat)](https://developer.apple.com/swift/) ![Platform](https://cocoapod-badges.herokuapp.com/p/CodableKeychain/badge.png) [![Swift Package Manager compatible](https://img.shields.io/badge/SPM-compatible-4BC51D.svg?style=flat)](https://github.com/apple/swift-package-manager) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +![CocoaPods Version](https://cocoapod-badges.herokuapp.com/v/CodableKeychain/badge.png) [![Swift](https://img.shields.io/badge/swift-5.0_4.2-orange.svg?style=flat)](https://developer.apple.com/swift/) ![Platform](https://cocoapod-badges.herokuapp.com/p/CodableKeychain/badge.png) [![Swift Package Manager compatible](https://img.shields.io/badge/SPM-compatible-4BC51D.svg?style=flat)](https://github.com/apple/swift-package-manager) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) ## Overview @@ -83,7 +83,7 @@ do { ## Installation -> _Note:_ CodableKeychain requires Swift 4 (and [Xcode][] 9) or greater. +> _Note:_ CodableKeychain requires Swift 4.2 (and [Xcode][] 10) or greater. > > Targets using CodableKeychain must support embedded Swift frameworks.