diff --git a/Library/Core/ColorPaletteItemResource.swift b/Library/Core/ColorPaletteItemResource.swift new file mode 100644 index 0000000..f16cdd5 --- /dev/null +++ b/Library/Core/ColorPaletteItemResource.swift @@ -0,0 +1,55 @@ +// +// ColorPaletteItemResource.swift +// R.swift.Library +// +// Created by Tom Lokhorst on 2016-03-13. +// From: https://github.com/mac-cain13/R.swift.Library +// License: MIT License +// + +import Foundation + +public protocol ColorPaletteItemResourceType { + + /// Name of the color + var name: String { get } + + /// Red componenent of color + var red: CGFloat { get } + + /// Green componenent of color + var green: CGFloat { get } + + /// Blue componenent of color + var blue: CGFloat { get } + + /// Alpha componenent of color + var alpha: CGFloat { get } +} + +@available(*, deprecated: 11, message: "Use color assets instead") +public struct ColorPaletteItemResource: ColorPaletteItemResourceType { + + /// Name of the color + public let name: String + + /// Red componenent of color + public let red: CGFloat + + /// Green componenent of color + public let green: CGFloat + + /// Blue componenent of color + public let blue: CGFloat + + /// Alpha componenent of color + public let alpha: CGFloat + + public init(name: String, red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat) { + self.name = name + self.red = red + self.green = green + self.blue = blue + self.alpha = alpha + } +} diff --git a/Library/Core/ColorResource.swift b/Library/Core/ColorResource.swift index 1bff0ff..0f67b4e 100644 --- a/Library/Core/ColorResource.swift +++ b/Library/Core/ColorResource.swift @@ -11,44 +11,23 @@ import Foundation public protocol ColorResourceType { + /// Bundle this color is in + var bundle: Bundle { get } + /// Name of the color var name: String { get } - - /// Red componenent of color - var red: CGFloat { get } - - /// Green componenent of color - var green: CGFloat { get } - - /// Blue componenent of color - var blue: CGFloat { get } - - /// Alpha componenent of color - var alpha: CGFloat { get } } public struct ColorResource: ColorResourceType { + /// Bundle this color is in + public let bundle: Bundle + /// Name of the color public let name: String - /// Red componenent of color - public let red: CGFloat - - /// Green componenent of color - public let green: CGFloat - - /// Blue componenent of color - public let blue: CGFloat - - /// Alpha componenent of color - public let alpha: CGFloat - - public init(name: String, red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat) { + public init(bundle: Bundle, name: String) { + self.bundle = bundle self.name = name - self.red = red - self.green = green - self.blue = blue - self.alpha = alpha } } diff --git a/Library/Core/Core+Migration.swift b/Library/Core/Core+Migration.swift deleted file mode 100644 index c54a4b9..0000000 --- a/Library/Core/Core+Migration.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// Core+Migration.swift -// R.swift.Library -// -// Created by Tom Lokhorst on 2016-09-08. -// From: https://github.com/mac-cain13/R.swift.Library -// License: MIT License -// - -import Foundation - -// Renames from Swift 2 to Swift 3 - -public extension StoryboardSegueIdentifier { - - @available(*, unavailable, renamed: "storyboardSegue(withSource:)") - public func storyboardSegueWithSource(_ sourceViewController: Source) - -> StoryboardSegue - { - fatalError() - } -} - -public extension TypedStoryboardSegueInfo { - - @available(*, unavailable, renamed: "destination") - public var destinationViewController: Destination { fatalError() } - - @available(*, unavailable, renamed: "source") - public var sourceViewController: Source { fatalError() } -} - -public extension StoryboardSegue { - - @available(*, unavailable, renamed: "source") - public var sourceViewController: Source { fatalError() } - - @available(*, unavailable, renamed: "init(identifier:source:)") - public init(identifier: StoryboardSegueIdentifier, sourceViewController: Source) { - fatalError() - } -} diff --git a/Library/Core/Validatable.swift b/Library/Core/Validatable.swift index feec70c..3467513 100644 --- a/Library/Core/Validatable.swift +++ b/Library/Core/Validatable.swift @@ -27,23 +27,3 @@ public protocol Validatable { */ static func validate() throws } - -extension Validatable { - /** - Validates this entity and asserts if it encounters a invalid situation, a validatable should also validate it sub-validatables if it has any. In -O builds (the default for Xcode's Release configuration), validation is not evaluated, and there are no effects. - */ - @available(*, deprecated, message: "Use validate() instead, preferably from a testcase.") - public static func assertValid() { - assert( theRealAssert() ) - } - - fileprivate static func theRealAssert() -> Bool { - do { - try validate() - } catch { - assertionFailure("Validation of \(type(of: self)) failed with error: \(error)") - } - - return true - } -} diff --git a/Library/Foundation/Foundation+Migration.swift b/Library/Foundation/Foundation+Migration.swift deleted file mode 100644 index d41957a..0000000 --- a/Library/Foundation/Foundation+Migration.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// Foundation+Migration.swift -// R.swift.Library -// -// Created by Tom Lokhorst on 2016-09-08. -// From: https://github.com/mac-cain13/R.swift.Library -// License: MIT License -// - -import Foundation - -// Renames from Swift 2 to Swift 3 - -public extension Bundle { - - @available(*, unavailable, renamed: "url(forResource:)") - public func URLForResource(_ resource: FileResourceType) -> URL? { - fatalError() - } - - - @available(*, unavailable, renamed: "path(forResource:)") - public func pathForResource(_ resource: FileResourceType) -> String? { - fatalError() - } -} diff --git a/Library/UIKit/ColorResource+UIKit.swift b/Library/UIKit/ColorPaletteItemResource+UIKit.swift similarity index 67% rename from Library/UIKit/ColorResource+UIKit.swift rename to Library/UIKit/ColorPaletteItemResource+UIKit.swift index 3efe71b..cb10d7e 100644 --- a/Library/UIKit/ColorResource+UIKit.swift +++ b/Library/UIKit/ColorPaletteItemResource+UIKit.swift @@ -1,5 +1,5 @@ // -// ColorResource+UIKit.swift +// ColorPaletteItemResource+UIKit.swift // R.swift.Library // // Created by Tom Lokhorst on 2016-04-23. @@ -9,11 +9,11 @@ import UIKit -public extension ColorResourceType { +public extension ColorPaletteItemResourceType { /** Returns the a UIColor - - returns: A UIColor for this color resource + - returns: A UIColor for this color palette item resource */ func color() -> UIColor { return UIColor(red: red, green: green, blue: blue, alpha: alpha) diff --git a/Library/UIKit/UIColor+ColorResource.swift b/Library/UIKit/UIColor+ColorResource.swift new file mode 100644 index 0000000..800d338 --- /dev/null +++ b/Library/UIKit/UIColor+ColorResource.swift @@ -0,0 +1,26 @@ +// +// UIColor+ColorResource.swift +// R.swift.Library +// +// Created by Tom Lokhorst on 2017-06-06. +// From: https://github.com/mac-cain13/R.swift.Library +// License: MIT License +// + +import UIKit + +@available(iOS 11.0, *) +@available(tvOS 11.0, *) +public extension UIColor { + /** + Returns the color from this resource (R.color.*) that is compatible with the trait collection. + + - parameter resource: The resource you want the image of (R.color.*) + - parameter traitCollection: Traits that describe the desired color to retrieve, pass nil to use traits that describe the main screen. + + - returns: A color that exactly or best matches the desired traits with the given resource (R.color.*), or nil if no suitable color was found. + */ + public convenience init?(resource: ColorResourceType, compatibleWith traitCollection: UITraitCollection? = nil) { + self.init(named: resource.name, in: resource.bundle, compatibleWith: traitCollection) + } +} diff --git a/Library/UIKit/UIKit+Migration.swift b/Library/UIKit/UIKit+Migration.swift deleted file mode 100644 index bd66ddc..0000000 --- a/Library/UIKit/UIKit+Migration.swift +++ /dev/null @@ -1,120 +0,0 @@ -// -// UIKit+Migration.swift -// R.swift.Library -// -// Created by Tom Lokhorst on 2016-09-08. -// From: https://github.com/mac-cain13/R.swift.Library -// License: MIT License -// - -import UIKit - -// Renames from Swift 2 to Swift 3 - -public extension NibResourceType { - - @available(*, unavailable, renamed: "instantiate(withOwner:options:)") - public func instantiateWithOwner(_ ownerOrNil: AnyObject?, options optionsOrNil: [NSObject : AnyObject]? = nil) -> [AnyObject] { - fatalError() - } -} - - -public extension StoryboardResourceWithInitialControllerType { - - @available(*, unavailable, renamed: "instantiateInitialViewController") - public func initialViewController() -> InitialController? { - fatalError() - } -} - -public extension UICollectionView { - - @available(*, unavailable, renamed: "dequeueReusableCell(withReuseIdentifier:for:)") - public func dequeueReusableCellWithReuseIdentifier(_ identifier: Identifier, forIndexPath indexPath: IndexPath) -> Identifier.ReusableType? - where Identifier.ReusableType: UICollectionReusableView - { - fatalError() - } - - - @available(*, unavailable, renamed: "dequeueReusableSupplementaryView(ofKind:withReuseIdentifier:for:)") - public func dequeueReusableSupplementaryViewOfKind(_ elementKind: String, withReuseIdentifier identifier: Identifier, forIndexPath indexPath: IndexPath) -> Identifier.ReusableType? - where Identifier.ReusableType: UICollectionReusableView - { - fatalError() - } - - - @available(*, unavailable, renamed: "register") - public func registerNib(_ nibResource: Resource) - where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell - { - fatalError() - } - - - @available(*, unavailable, renamed: "register") - public func registerNib(_ nibResource: Resource, forSupplementaryViewOfKind kind: String) - where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView - { - fatalError() - } -} - -public extension UITableView { - - - @available(*, unavailable, renamed: "dequeueReusableCell(withIdentifier:for:)") - public func dequeueReusableCellWithIdentifier(_ identifier: Identifier, forIndexPath indexPath: IndexPath) -> Identifier.ReusableType? - where Identifier.ReusableType: UITableViewCell - { - fatalError() - } - - - @available(*, unavailable, renamed: "dequeueReusableCell(withIdentifier:)") - public func dequeueReusableCellWithIdentifier(_ identifier: Identifier) -> Identifier.ReusableType? - where Identifier.ReusableType: UITableViewCell - { - fatalError() - } - - - @available(*, unavailable, renamed: "dequeueReusableHeaderFooterView(withIdentifier:)") - public func dequeueReusableHeaderFooterViewWithIdentifier(_ identifier: Identifier) -> Identifier.ReusableType? - where Identifier.ReusableType: UITableViewHeaderFooterView - { - fatalError() - } - - - @available(*, unavailable, renamed: "register") - public func registerNib(_ nibResource: Resource) where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell - { - fatalError() - } - - - @available(*, unavailable, renamed: "registerHeaderFooterView") - public func registerNibForHeaderFooterView(_ nibResource: Resource) where Resource: ReuseIdentifierType, Resource.ReusableType: UIView - { - fatalError() - } -} - -public extension SeguePerformerType { - - @available(*, unavailable, renamed: "performSegue(withIdentifier:sender:)") - func performSegueWithIdentifier(_ identifier: String, sender: Any?) { - fatalError() - } -} - -public extension SeguePerformerType { - - @available(*, unavailable, renamed: "performSegue(withIdentifier:sender:)") - public func performSegueWithIdentifier(_ identifier: StoryboardSegueIdentifier, sender: Any?) { - fatalError() - } -} diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index 1a1e8bd..18f7496 100644 --- a/R.swift.Library.podspec +++ b/R.swift.Library.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |spec| spec.name = "R.swift.Library" - spec.version = "3.0.2" + spec.version = "4.0.0.alpha.2" spec.license = "MIT" spec.summary = "Companion library for R.swift, featuring types used to type resources" diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj index 8522bcf..6348bdd 100644 --- a/R.swift.Library.xcodeproj/project.pbxproj +++ b/R.swift.Library.xcodeproj/project.pbxproj @@ -63,13 +63,14 @@ E20F34A71C92B44100338F81 /* Data+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20F34A61C92B44100338F81 /* Data+FileResource.swift */; }; E22D43671C95EEA100692FFF /* ColorResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22D43661C95EEA100692FFF /* ColorResource.swift */; }; E24720CA1C96B4D100DF291D /* ColorResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22D43661C95EEA100692FFF /* ColorResource.swift */; }; - E250BE941CCBCEB100CC71DE /* ColorResource+UIKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = E250BE931CCBCEB100CC71DE /* ColorResource+UIKit.swift */; }; - E250BE951CCBF58200CC71DE /* ColorResource+UIKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = E250BE931CCBCEB100CC71DE /* ColorResource+UIKit.swift */; }; E250BE971CCBF60300CC71DE /* StringResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E250BE961CCBF60300CC71DE /* StringResource.swift */; }; E250BE991CCBF7E900CC71DE /* StringResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E250BE961CCBF60300CC71DE /* StringResource.swift */; }; - E2B0AF361D8142A400A7196C /* Core+Migration.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2B0AF351D8142A400A7196C /* Core+Migration.swift */; }; - E2B0AF381D8142BF00A7196C /* UIKit+Migration.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2B0AF371D8142BF00A7196C /* UIKit+Migration.swift */; }; - E2B0AF3A1D81483900A7196C /* Foundation+Migration.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2B0AF391D81483900A7196C /* Foundation+Migration.swift */; }; + E2CA68EB1EE75151009C4DB4 /* ColorPaletteItemResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2CA68EA1EE75151009C4DB4 /* ColorPaletteItemResource.swift */; }; + E2CA68ED1EE751A9009C4DB4 /* ColorPaletteItemResource+UIKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2CA68EC1EE751A9009C4DB4 /* ColorPaletteItemResource+UIKit.swift */; }; + E2CA68EF1EE75992009C4DB4 /* UIColor+ColorResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2CA68EE1EE75992009C4DB4 /* UIColor+ColorResource.swift */; }; + E2CA68F01EE759C3009C4DB4 /* ColorPaletteItemResource+UIKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2CA68EC1EE751A9009C4DB4 /* ColorPaletteItemResource+UIKit.swift */; }; + E2CA68F11EE75A02009C4DB4 /* ColorPaletteItemResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2CA68EA1EE75151009C4DB4 /* ColorPaletteItemResource.swift */; }; + E2CA68F21EE75A49009C4DB4 /* UIColor+ColorResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2CA68EE1EE75992009C4DB4 /* UIColor+ColorResource.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -123,11 +124,10 @@ D5E435AC1C3D00770091090C /* FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileResource.swift; sourceTree = ""; }; E20F34A61C92B44100338F81 /* Data+FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Data+FileResource.swift"; sourceTree = ""; }; E22D43661C95EEA100692FFF /* ColorResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorResource.swift; sourceTree = ""; }; - E250BE931CCBCEB100CC71DE /* ColorResource+UIKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ColorResource+UIKit.swift"; sourceTree = ""; }; E250BE961CCBF60300CC71DE /* StringResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringResource.swift; sourceTree = ""; }; - E2B0AF351D8142A400A7196C /* Core+Migration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Core+Migration.swift"; sourceTree = ""; }; - E2B0AF371D8142BF00A7196C /* UIKit+Migration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIKit+Migration.swift"; sourceTree = ""; }; - E2B0AF391D81483900A7196C /* Foundation+Migration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Foundation+Migration.swift"; sourceTree = ""; }; + E2CA68EA1EE75151009C4DB4 /* ColorPaletteItemResource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorPaletteItemResource.swift; sourceTree = ""; }; + E2CA68EC1EE751A9009C4DB4 /* ColorPaletteItemResource+UIKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ColorPaletteItemResource+UIKit.swift"; sourceTree = ""; }; + E2CA68EE1EE75992009C4DB4 /* UIColor+ColorResource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+ColorResource.swift"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -167,11 +167,12 @@ D543F9C21C14987000D16A0C /* UIKit */ = { isa = PBXGroup; children = ( - E250BE931CCBCEB100CC71DE /* ColorResource+UIKit.swift */, + E2CA68EC1EE751A9009C4DB4 /* ColorPaletteItemResource+UIKit.swift */, D5E435A81C3CFB460091090C /* NibResource+UIKit.swift */, D57E1EB81C3E4C1A00DDA68F /* StoryboardResourceWithInitialController+UIKit.swift */, D543F9CE1C149C0A00D16A0C /* TypedStoryboardSegueInfo+UIStoryboardSegue.swift */, D543F9C51C14992000D16A0C /* UICollectionView+ReuseIdentifierProtocol.swift */, + E2CA68EE1EE75992009C4DB4 /* UIColor+ColorResource.swift */, D57E1EB41C3D774000DDA68F /* UIFont+FontResource.swift */, D553F5861C44170E00885232 /* UIImage+ImageResource.swift */, D5588CAA1C3F9DBE00912F97 /* UINib+NibResource.swift */, @@ -180,7 +181,6 @@ D543F9C31C1498FB00D16A0C /* UITableView+ReuseIdentifierProtocol.swift */, D543F9C71C14995800D16A0C /* UIViewController+NibResource.swift */, D543F9C91C14998800D16A0C /* UIViewController+StoryboardSegueIdentifierProtocol.swift */, - E2B0AF371D8142BF00A7196C /* UIKit+Migration.swift */, ); path = UIKit; sourceTree = ""; @@ -188,6 +188,7 @@ D543F9CD1C1499CF00D16A0C /* Core */ = { isa = PBXGroup; children = ( + E2CA68EA1EE75151009C4DB4 /* ColorPaletteItemResource.swift */, E22D43661C95EEA100692FFF /* ColorResource.swift */, D5E435AC1C3D00770091090C /* FileResource.swift */, D57E1EB21C3D762300DDA68F /* FontResource.swift */, @@ -200,7 +201,6 @@ D51335261C959DF20014C9D4 /* StoryboardViewControllerResource.swift */, E250BE961CCBF60300CC71DE /* StringResource.swift */, D53F19231C229D7200AE2FAD /* Validatable.swift */, - E2B0AF351D8142A400A7196C /* Core+Migration.swift */, ); path = Core; sourceTree = ""; @@ -210,7 +210,6 @@ children = ( D56DC7721C42B65C00623437 /* Bundle+FileResource.swift */, E20F34A61C92B44100338F81 /* Data+FileResource.swift */, - E2B0AF391D81483900A7196C /* Foundation+Migration.swift */, ); path = Foundation; sourceTree = ""; @@ -360,24 +359,24 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = "Mathijs Kadijk"; TargetAttributes = { 806E69911C42BD9C00DE3A8B = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0810; + LastSwiftMigration = 0900; }; 806E699A1C42BD9C00DE3A8B = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0810; + LastSwiftMigration = 0900; }; D592464D1C117A55007F94C7 = { CreatedOnToolsVersion = 7.1.1; - LastSwiftMigration = 0810; + LastSwiftMigration = 0900; }; D59246571C117A55007F94C7 = { CreatedOnToolsVersion = 7.1.1; - LastSwiftMigration = 0810; + LastSwiftMigration = 0900; }; }; }; @@ -441,6 +440,7 @@ D513352B1C95B7620014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift in Sources */, D513352C1C95C61E0014C9D4 /* Data+FileResource.swift in Sources */, 806E69AD1C42BDDA00DE3A8B /* ReuseIdentifierProtocol.swift in Sources */, + E2CA68F21EE75A49009C4DB4 /* UIColor+ColorResource.swift in Sources */, 806E69B61C42BDE000DE3A8B /* UINib+NibResource.swift in Sources */, 806E69AA1C42BDDA00DE3A8B /* FontResource.swift in Sources */, 806E69B41C42BDE000DE3A8B /* UICollectionView+ReuseIdentifierProtocol.swift in Sources */, @@ -459,10 +459,11 @@ 806E69B01C42BDDA00DE3A8B /* Validatable.swift in Sources */, 806E69B31C42BDE000DE3A8B /* TypedStoryboardSegueInfo+UIStoryboardSegue.swift in Sources */, E250BE991CCBF7E900CC71DE /* StringResource.swift in Sources */, + E2CA68F01EE759C3009C4DB4 /* ColorPaletteItemResource+UIKit.swift in Sources */, D5728B321C4D541500E38168 /* Bundle+FileResource.swift in Sources */, - E250BE951CCBF58200CC71DE /* ColorResource+UIKit.swift in Sources */, 806E69B91C42BDE000DE3A8B /* UITableView+ReuseIdentifierProtocol.swift in Sources */, 806E69AE1C42BDDA00DE3A8B /* StoryboardResource.swift in Sources */, + E2CA68F11EE75A02009C4DB4 /* ColorPaletteItemResource.swift in Sources */, 806E69A91C42BDDA00DE3A8B /* FileResource.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -482,15 +483,17 @@ D543F9CA1C14998800D16A0C /* UIViewController+StoryboardSegueIdentifierProtocol.swift in Sources */, D51335291C95A79B0014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift in Sources */, D5E435AD1C3D00770091090C /* FileResource.swift in Sources */, + E2CA68EB1EE75151009C4DB4 /* ColorPaletteItemResource.swift in Sources */, D543F9BB1C1497EB00D16A0C /* Identifier.swift in Sources */, + E2CA68ED1EE751A9009C4DB4 /* ColorPaletteItemResource+UIKit.swift in Sources */, D57E1EB71C3E482A00DDA68F /* StoryboardResource.swift in Sources */, D57E1EBB1C3E4C4300DDA68F /* UIStoryboard+StoryboardResource.swift in Sources */, D57E1EB31C3D762300DDA68F /* FontResource.swift in Sources */, D57E1EB91C3E4C1A00DDA68F /* StoryboardResourceWithInitialController+UIKit.swift in Sources */, D543F9BD1C14980600D16A0C /* ReuseIdentifierProtocol.swift in Sources */, D543F9C11C14984300D16A0C /* NibResource.swift in Sources */, + E2CA68EF1EE75992009C4DB4 /* UIColor+ColorResource.swift in Sources */, D553F5851C44157000885232 /* ImageResource.swift in Sources */, - E2B0AF381D8142BF00A7196C /* UIKit+Migration.swift in Sources */, E20F34A71C92B44100338F81 /* Data+FileResource.swift in Sources */, D57E1EB51C3D774000DDA68F /* UIFont+FontResource.swift in Sources */, D5588CAB1C3F9DBE00912F97 /* UINib+NibResource.swift in Sources */, @@ -500,12 +503,9 @@ D543F9C61C14992000D16A0C /* UICollectionView+ReuseIdentifierProtocol.swift in Sources */, D543F9BF1C14983100D16A0C /* StoryboardSegueIdentifierProtocol.swift in Sources */, D543F9C81C14995800D16A0C /* UIViewController+NibResource.swift in Sources */, - E2B0AF3A1D81483900A7196C /* Foundation+Migration.swift in Sources */, D5E435A91C3CFB460091090C /* NibResource+UIKit.swift in Sources */, - E2B0AF361D8142A400A7196C /* Core+Migration.swift in Sources */, E250BE971CCBF60300CC71DE /* StringResource.swift in Sources */, D543F9CF1C149C0A00D16A0C /* TypedStoryboardSegueInfo+UIStoryboardSegue.swift in Sources */, - E250BE941CCBCEB100CC71DE /* ColorResource+UIKit.swift in Sources */, D543F9C41C1498FB00D16A0C /* UITableView+ReuseIdentifierProtocol.swift in Sources */, D56DC7731C42B65C00623437 /* Bundle+FileResource.swift in Sources */, D53F19241C229D7200AE2FAD /* Validatable.swift in Sources */, @@ -552,7 +552,7 @@ PRODUCT_NAME = Rswift; SDKROOT = appletvos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; }; @@ -574,7 +574,7 @@ PRODUCT_NAME = Rswift; SDKROOT = appletvos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; }; @@ -588,7 +588,7 @@ PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TVOS_DEPLOYMENT_TARGET = 9.1; }; name = Debug; @@ -601,7 +601,7 @@ PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TVOS_DEPLOYMENT_TARGET = 9.1; }; name = Release; @@ -614,14 +614,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -664,14 +670,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -718,7 +730,7 @@ PRODUCT_NAME = Rswift; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -739,7 +751,7 @@ PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.rswift.library; PRODUCT_NAME = Rswift; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -750,7 +762,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -761,7 +773,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-iOS.xcscheme b/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-iOS.xcscheme index 1f3a659..180b09f 100644 --- a/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-iOS.xcscheme +++ b/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-iOS.xcscheme @@ -1,6 +1,6 @@