From c8a920972ef6e89451caf808b3beb88f56452216 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Sat, 3 Dec 2016 13:28:53 +0100 Subject: [PATCH 01/54] Fix some build settings for Swift 3.0.1 --- R.swift.Library.xcodeproj/project.pbxproj | 8 -------- .../xcshareddata/xcschemes/Rswift-iOS.xcscheme | 2 +- .../xcshareddata/xcschemes/Rswift-tvOS.xcscheme | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj index 9970879..15f4c98 100644 --- a/R.swift.Library.xcodeproj/project.pbxproj +++ b/R.swift.Library.xcodeproj/project.pbxproj @@ -552,7 +552,6 @@ PRODUCT_NAME = Rswift; SDKROOT = appletvos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; }; @@ -574,7 +573,6 @@ PRODUCT_NAME = Rswift; SDKROOT = appletvos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; }; @@ -588,7 +586,6 @@ PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; - SWIFT_VERSION = 3.0; TVOS_DEPLOYMENT_TARGET = 9.1; }; name = Debug; @@ -601,7 +598,6 @@ PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; - SWIFT_VERSION = 3.0; TVOS_DEPLOYMENT_TARGET = 9.1; }; name = Release; @@ -718,7 +714,6 @@ PRODUCT_NAME = Rswift; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -739,7 +734,6 @@ PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.rswift.library; PRODUCT_NAME = Rswift; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; }; name = Release; }; @@ -750,7 +744,6 @@ 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; }; name = Debug; }; @@ -761,7 +754,6 @@ 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; }; 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 34e8652..1f3a659 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 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - LastUpgradeVersion = "0800" + LastUpgradeVersion = "0810" version = "1.3"> <BuildAction parallelizeBuildables = "YES" diff --git a/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme b/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme index 8d7a0be..ef7ba2c 100644 --- a/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme +++ b/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - LastUpgradeVersion = "0800" + LastUpgradeVersion = "0810" version = "1.3"> <BuildAction parallelizeBuildables = "YES" From f231a6c2c12b56fe65afa1879dae19da0c26f81a Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Sat, 3 Dec 2016 17:21:45 +0100 Subject: [PATCH 02/54] Fix swift version --- R.swift.Library.xcodeproj/project.pbxproj | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj index 15f4c98..8522bcf 100644 --- a/R.swift.Library.xcodeproj/project.pbxproj +++ b/R.swift.Library.xcodeproj/project.pbxproj @@ -365,19 +365,19 @@ TargetAttributes = { 806E69911C42BD9C00DE3A8B = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0800; + LastSwiftMigration = 0810; }; 806E699A1C42BD9C00DE3A8B = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0800; + LastSwiftMigration = 0810; }; D592464D1C117A55007F94C7 = { CreatedOnToolsVersion = 7.1.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0810; }; D59246571C117A55007F94C7 = { CreatedOnToolsVersion = 7.1.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0810; }; }; }; @@ -552,6 +552,7 @@ PRODUCT_NAME = Rswift; SDKROOT = appletvos; SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; }; @@ -573,6 +574,7 @@ PRODUCT_NAME = Rswift; SDKROOT = appletvos; SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; }; @@ -586,6 +588,7 @@ PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; + SWIFT_VERSION = 3.0; TVOS_DEPLOYMENT_TARGET = 9.1; }; name = Debug; @@ -598,6 +601,7 @@ PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; + SWIFT_VERSION = 3.0; TVOS_DEPLOYMENT_TARGET = 9.1; }; name = Release; @@ -714,6 +718,7 @@ PRODUCT_NAME = Rswift; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -734,6 +739,7 @@ PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.rswift.library; PRODUCT_NAME = Rswift; SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; }; name = Release; }; @@ -744,6 +750,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; }; name = Debug; }; @@ -754,6 +761,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; }; name = Release; }; From 519e3d4d9a97de3ebd4b27e5d444a4c6e7a9dfb3 Mon Sep 17 00:00:00 2001 From: Kuniwak <orga.chem.job@gmail.com> Date: Thu, 9 Feb 2017 18:53:59 +0900 Subject: [PATCH 03/54] Avoid dirty submodules for Carthage users Carthage creates the directory `Carthage/Build` for every submodules when using `carthage update --submodule`. This behavior leads to dirty submodule. After this patch, `Carthage/Build` in R.swift.Library will be ignored, so the submodule do not get dirty. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 82ced1f..8d04a5f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ fastlane/report.xml fastlane/test_output fastlane/settoken.sh /build +Carthage/Build From ce03cde8d0edd9658c36a971a0bc8fde390a8b43 Mon Sep 17 00:00:00 2001 From: Tom Lokhorst <tom@lokhorst.eu> Date: Tue, 6 Jun 2017 23:16:07 +0200 Subject: [PATCH 04/54] ColorResource for color assets --- Library/Core/ColorPaletteItemResource.swift | 55 +++++++++++++++++++ Library/Core/ColorResource.swift | 37 +++---------- ...t => ColorPaletteItemResource+UIKit.swift} | 6 +- Library/UIKit/UIColor+ColorResource.swift | 26 +++++++++ R.swift.Library.xcodeproj/project.pbxproj | 28 +++++++--- 5 files changed, 112 insertions(+), 40 deletions(-) create mode 100644 Library/Core/ColorPaletteItemResource.swift rename Library/UIKit/{ColorResource+UIKit.swift => ColorPaletteItemResource+UIKit.swift} (67%) create mode 100644 Library/UIKit/UIColor+ColorResource.swift 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/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/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj index 8522bcf..0d9cc42 100644 --- a/R.swift.Library.xcodeproj/project.pbxproj +++ b/R.swift.Library.xcodeproj/project.pbxproj @@ -63,13 +63,17 @@ 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 +127,13 @@ D5E435AC1C3D00770091090C /* FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileResource.swift; sourceTree = "<group>"; }; E20F34A61C92B44100338F81 /* Data+FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Data+FileResource.swift"; sourceTree = "<group>"; }; E22D43661C95EEA100692FFF /* ColorResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorResource.swift; sourceTree = "<group>"; }; - E250BE931CCBCEB100CC71DE /* ColorResource+UIKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ColorResource+UIKit.swift"; sourceTree = "<group>"; }; E250BE961CCBF60300CC71DE /* StringResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringResource.swift; sourceTree = "<group>"; }; E2B0AF351D8142A400A7196C /* Core+Migration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Core+Migration.swift"; sourceTree = "<group>"; }; E2B0AF371D8142BF00A7196C /* UIKit+Migration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIKit+Migration.swift"; sourceTree = "<group>"; }; E2B0AF391D81483900A7196C /* Foundation+Migration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Foundation+Migration.swift"; sourceTree = "<group>"; }; + E2CA68EA1EE75151009C4DB4 /* ColorPaletteItemResource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorPaletteItemResource.swift; sourceTree = "<group>"; }; + E2CA68EC1EE751A9009C4DB4 /* ColorPaletteItemResource+UIKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ColorPaletteItemResource+UIKit.swift"; sourceTree = "<group>"; }; + E2CA68EE1EE75992009C4DB4 /* UIColor+ColorResource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+ColorResource.swift"; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -167,20 +173,21 @@ 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 */, + E2B0AF371D8142BF00A7196C /* UIKit+Migration.swift */, D5588CAA1C3F9DBE00912F97 /* UINib+NibResource.swift */, D57E1EBA1C3E4C4300DDA68F /* UIStoryboard+StoryboardResource.swift */, D51335281C95A79B0014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift */, D543F9C31C1498FB00D16A0C /* UITableView+ReuseIdentifierProtocol.swift */, D543F9C71C14995800D16A0C /* UIViewController+NibResource.swift */, D543F9C91C14998800D16A0C /* UIViewController+StoryboardSegueIdentifierProtocol.swift */, - E2B0AF371D8142BF00A7196C /* UIKit+Migration.swift */, ); path = UIKit; sourceTree = "<group>"; @@ -188,7 +195,9 @@ D543F9CD1C1499CF00D16A0C /* Core */ = { isa = PBXGroup; children = ( + E2CA68EA1EE75151009C4DB4 /* ColorPaletteItemResource.swift */, E22D43661C95EEA100692FFF /* ColorResource.swift */, + E2B0AF351D8142A400A7196C /* Core+Migration.swift */, D5E435AC1C3D00770091090C /* FileResource.swift */, D57E1EB21C3D762300DDA68F /* FontResource.swift */, D543F9BA1C1497EB00D16A0C /* Identifier.swift */, @@ -200,7 +209,6 @@ D51335261C959DF20014C9D4 /* StoryboardViewControllerResource.swift */, E250BE961CCBF60300CC71DE /* StringResource.swift */, D53F19231C229D7200AE2FAD /* Validatable.swift */, - E2B0AF351D8142A400A7196C /* Core+Migration.swift */, ); path = Core; sourceTree = "<group>"; @@ -441,6 +449,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 +468,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,13 +492,16 @@ 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 */, @@ -505,7 +518,6 @@ 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 */, From b5c0b212ddee8cd74af1f26f9ff8dbde86963390 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Thu, 8 Jun 2017 18:34:03 +0200 Subject: [PATCH 05/54] Add skip branch check option --- fastlane/Fastfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 529e982..eff3998 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,7 +1,9 @@ fastlane_version "1.86.0" lane :release do |options| - ensure_git_branch(branch: "master") + if options[:skip_branch_check] != true + ensure_git_branch(branch: "master") + end if options[:allow_dirty_branch] != true ensure_git_status_clean From 9ac47d3a8027e492628e5f050bb053f6df6d2bda Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Thu, 8 Jun 2017 22:08:20 +0200 Subject: [PATCH 06/54] Preparing for the 4.0.0.alpha.1 release --- R.swift.Library.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index 1a1e8bd..256983d 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.1" spec.license = "MIT" spec.summary = "Companion library for R.swift, featuring types used to type resources" From b1ffc8064724e2d9deca4ae30ab206ef7669a522 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Sun, 11 Jun 2017 14:35:45 +0200 Subject: [PATCH 07/54] Remove deprecated assert method --- Library/Core/Validatable.swift | 20 -------------------- 1 file changed, 20 deletions(-) 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 - } -} From 45726bcc09a8231fbe3474c731c7d2f4df6949ec Mon Sep 17 00:00:00 2001 From: Kyle McAlpine <k@kylejm.io> Date: Sun, 11 Jun 2017 15:58:01 +0100 Subject: [PATCH 08/54] Minimum changes to compile with Swift 4 --- R.swift.Library.xcodeproj/project.pbxproj | 30 ++++++++++++++----- .../xcschemes/Rswift-iOS.xcscheme | 2 +- .../xcschemes/Rswift-tvOS.xcscheme | 2 +- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj index 8522bcf..439a760 100644 --- a/R.swift.Library.xcodeproj/project.pbxproj +++ b/R.swift.Library.xcodeproj/project.pbxproj @@ -360,7 +360,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = "Mathijs Kadijk"; TargetAttributes = { 806E69911C42BD9C00DE3A8B = { @@ -373,11 +373,11 @@ }; D592464D1C117A55007F94C7 = { CreatedOnToolsVersion = 7.1.1; - LastSwiftMigration = 0810; + LastSwiftMigration = 0900; }; D59246571C117A55007F94C7 = { CreatedOnToolsVersion = 7.1.1; - LastSwiftMigration = 0810; + LastSwiftMigration = 0900; }; }; }; @@ -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,8 @@ PRODUCT_NAME = Rswift; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -739,7 +752,8 @@ PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.rswift.library; PRODUCT_NAME = Rswift; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -750,7 +764,8 @@ 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_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -761,7 +776,8 @@ 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_SWIFT3_OBJC_INFERENCE = On; + 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 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - LastUpgradeVersion = "0810" + LastUpgradeVersion = "0900" version = "1.3"> <BuildAction parallelizeBuildables = "YES" diff --git a/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme b/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme index ef7ba2c..6216bde 100644 --- a/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme +++ b/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - LastUpgradeVersion = "0810" + LastUpgradeVersion = "0900" version = "1.3"> <BuildAction parallelizeBuildables = "YES" From aa6e48ec0bc09e9a6decc8ddaba93ff3f1864ea2 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Sun, 11 Jun 2017 17:23:38 +0200 Subject: [PATCH 09/54] Remove Swift 2 -> 3 migration files --- Library/Core/Core+Migration.swift | 42 ------ Library/Foundation/Foundation+Migration.swift | 26 ---- Library/UIKit/UIKit+Migration.swift | 120 ------------------ R.swift.Library.xcodeproj/project.pbxproj | 12 -- 4 files changed, 200 deletions(-) delete mode 100644 Library/Core/Core+Migration.swift delete mode 100644 Library/Foundation/Foundation+Migration.swift delete mode 100644 Library/UIKit/UIKit+Migration.swift 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<Segue, Source, Destination> - { - 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<Segue, Source, Destination>, sourceViewController: Source) { - fatalError() - } -} 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/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: ReuseIdentifierType>(_ identifier: Identifier, forIndexPath indexPath: IndexPath) -> Identifier.ReusableType? - where Identifier.ReusableType: UICollectionReusableView - { - fatalError() - } - - - @available(*, unavailable, renamed: "dequeueReusableSupplementaryView(ofKind:withReuseIdentifier:for:)") - public func dequeueReusableSupplementaryViewOfKind<Identifier: ReuseIdentifierType>(_ elementKind: String, withReuseIdentifier identifier: Identifier, forIndexPath indexPath: IndexPath) -> Identifier.ReusableType? - where Identifier.ReusableType: UICollectionReusableView - { - fatalError() - } - - - @available(*, unavailable, renamed: "register") - public func registerNib<Resource: NibResourceType>(_ nibResource: Resource) - where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell - { - fatalError() - } - - - @available(*, unavailable, renamed: "register") - public func registerNib<Resource: NibResourceType>(_ 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: ReuseIdentifierType>(_ identifier: Identifier, forIndexPath indexPath: IndexPath) -> Identifier.ReusableType? - where Identifier.ReusableType: UITableViewCell - { - fatalError() - } - - - @available(*, unavailable, renamed: "dequeueReusableCell(withIdentifier:)") - public func dequeueReusableCellWithIdentifier<Identifier: ReuseIdentifierType>(_ identifier: Identifier) -> Identifier.ReusableType? - where Identifier.ReusableType: UITableViewCell - { - fatalError() - } - - - @available(*, unavailable, renamed: "dequeueReusableHeaderFooterView(withIdentifier:)") - public func dequeueReusableHeaderFooterViewWithIdentifier<Identifier: ReuseIdentifierType>(_ identifier: Identifier) -> Identifier.ReusableType? - where Identifier.ReusableType: UITableViewHeaderFooterView - { - fatalError() - } - - - @available(*, unavailable, renamed: "register") - public func registerNib<Resource: NibResourceType>(_ nibResource: Resource) where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell - { - fatalError() - } - - - @available(*, unavailable, renamed: "registerHeaderFooterView") - public func registerNibForHeaderFooterView<Resource: NibResourceType>(_ 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<Segue, Destination>(_ identifier: StoryboardSegueIdentifier<Segue, Self, Destination>, sender: Any?) { - fatalError() - } -} diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj index 0d9cc42..ce852b5 100644 --- a/R.swift.Library.xcodeproj/project.pbxproj +++ b/R.swift.Library.xcodeproj/project.pbxproj @@ -65,9 +65,6 @@ E24720CA1C96B4D100DF291D /* ColorResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22D43661C95EEA100692FFF /* ColorResource.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 */; }; @@ -128,9 +125,6 @@ E20F34A61C92B44100338F81 /* Data+FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Data+FileResource.swift"; sourceTree = "<group>"; }; E22D43661C95EEA100692FFF /* ColorResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorResource.swift; sourceTree = "<group>"; }; E250BE961CCBF60300CC71DE /* StringResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringResource.swift; sourceTree = "<group>"; }; - E2B0AF351D8142A400A7196C /* Core+Migration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Core+Migration.swift"; sourceTree = "<group>"; }; - E2B0AF371D8142BF00A7196C /* UIKit+Migration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIKit+Migration.swift"; sourceTree = "<group>"; }; - E2B0AF391D81483900A7196C /* Foundation+Migration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Foundation+Migration.swift"; sourceTree = "<group>"; }; E2CA68EA1EE75151009C4DB4 /* ColorPaletteItemResource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorPaletteItemResource.swift; sourceTree = "<group>"; }; E2CA68EC1EE751A9009C4DB4 /* ColorPaletteItemResource+UIKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ColorPaletteItemResource+UIKit.swift"; sourceTree = "<group>"; }; E2CA68EE1EE75992009C4DB4 /* UIColor+ColorResource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+ColorResource.swift"; sourceTree = "<group>"; }; @@ -181,7 +175,6 @@ E2CA68EE1EE75992009C4DB4 /* UIColor+ColorResource.swift */, D57E1EB41C3D774000DDA68F /* UIFont+FontResource.swift */, D553F5861C44170E00885232 /* UIImage+ImageResource.swift */, - E2B0AF371D8142BF00A7196C /* UIKit+Migration.swift */, D5588CAA1C3F9DBE00912F97 /* UINib+NibResource.swift */, D57E1EBA1C3E4C4300DDA68F /* UIStoryboard+StoryboardResource.swift */, D51335281C95A79B0014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift */, @@ -197,7 +190,6 @@ children = ( E2CA68EA1EE75151009C4DB4 /* ColorPaletteItemResource.swift */, E22D43661C95EEA100692FFF /* ColorResource.swift */, - E2B0AF351D8142A400A7196C /* Core+Migration.swift */, D5E435AC1C3D00770091090C /* FileResource.swift */, D57E1EB21C3D762300DDA68F /* FontResource.swift */, D543F9BA1C1497EB00D16A0C /* Identifier.swift */, @@ -218,7 +210,6 @@ children = ( D56DC7721C42B65C00623437 /* Bundle+FileResource.swift */, E20F34A61C92B44100338F81 /* Data+FileResource.swift */, - E2B0AF391D81483900A7196C /* Foundation+Migration.swift */, ); path = Foundation; sourceTree = "<group>"; @@ -503,7 +494,6 @@ 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 */, @@ -513,9 +503,7 @@ 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 */, D543F9C41C1498FB00D16A0C /* UITableView+ReuseIdentifierProtocol.swift in Sources */, From 64cf11c30c546d79c78c4535ba9b4a1948372471 Mon Sep 17 00:00:00 2001 From: Tom Lokhorst <tom@lokhorst.eu> Date: Tue, 13 Jun 2017 21:26:24 +0200 Subject: [PATCH 10/54] More Xcode 9 changes --- R.swift.Library.xcodeproj/project.pbxproj | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj index 439a760..ad5d4ef 100644 --- a/R.swift.Library.xcodeproj/project.pbxproj +++ b/R.swift.Library.xcodeproj/project.pbxproj @@ -365,11 +365,11 @@ TargetAttributes = { 806E69911C42BD9C00DE3A8B = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0810; + LastSwiftMigration = 0900; }; 806E699A1C42BD9C00DE3A8B = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0810; + LastSwiftMigration = 0900; }; D592464D1C117A55007F94C7 = { CreatedOnToolsVersion = 7.1.1; @@ -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; @@ -730,7 +730,6 @@ PRODUCT_NAME = Rswift; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; SWIFT_VERSION = 4.0; }; name = Debug; @@ -752,7 +751,6 @@ PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.rswift.library; PRODUCT_NAME = Rswift; SKIP_INSTALL = YES; - SWIFT_SWIFT3_OBJC_INFERENCE = On; SWIFT_VERSION = 4.0; }; name = Release; @@ -764,7 +762,6 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; SWIFT_VERSION = 4.0; }; name = Debug; @@ -776,7 +773,6 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; SWIFT_VERSION = 4.0; }; name = Release; From d8390c20496fb9c849c94ee2f28417d321ad5309 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Mon, 19 Jun 2017 20:59:55 +0200 Subject: [PATCH 11/54] Preparing for the 4.0.0.alpha.2 release --- R.swift.Library.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index 256983d..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 = "4.0.0.alpha.1" + spec.version = "4.0.0.alpha.2" spec.license = "MIT" spec.summary = "Companion library for R.swift, featuring types used to type resources" From 27748cc7d821991841e12607a3c02b96c17edab4 Mon Sep 17 00:00:00 2001 From: Tom Lokhorst <tom@lokhorst.eu> Date: Wed, 20 Sep 2017 19:25:42 +0200 Subject: [PATCH 12/54] Remove dequeueReusableCell(withIdentifier:) extension method --- .../UIKit/UITableView+ReuseIdentifierProtocol.swift | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift index 5952625..c5202ee 100644 --- a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift +++ b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift @@ -27,19 +27,11 @@ public extension UITableView { return dequeueReusableCell(withIdentifier: identifier.identifier, for: indexPath) as? Identifier.ReusableType } - /** - Returns a typed reusable table-view cell object for the specified reuse identifier and adds it to the table. - - - parameter identifier: A R.reuseIdentifier.* value identifying the cell object to be reused. - - - returns: The UITableViewCell subclass with the associated reuse identifier or nil if it couldn't be casted correctly. - - - precondition: You must register a class or nib file using the registerNib: or registerClass:forCellReuseIdentifier: method before calling this method. - */ + @available(*, unavailable, message: "Use dequeueReusableCell(withIdentifier:for:) instead") public func dequeueReusableCell<Identifier: ReuseIdentifierType>(withIdentifier identifier: Identifier) -> Identifier.ReusableType? where Identifier.ReusableType: UITableViewCell { - return dequeueReusableCell(withIdentifier: identifier.identifier) as? Identifier.ReusableType + fatalError() } /** From 5feb6d134a25680b19675ae158c1f32aaf7d3590 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Fri, 29 Sep 2017 08:25:05 +0200 Subject: [PATCH 13/54] Preparing for the 4.0.0 release --- R.swift.Library.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index 18f7496..85ac0ba 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 = "4.0.0.alpha.2" + spec.version = "4.0.0" spec.license = "MIT" spec.summary = "Companion library for R.swift, featuring types used to type resources" From b61e4d2959201f28824e47e2859787025601eec6 Mon Sep 17 00:00:00 2001 From: Vladimir <volodg@mail.ru> Date: Tue, 16 Jan 2018 14:36:49 +0800 Subject: [PATCH 14/54] Fix compilation for static linking --- Library/Core/ColorPaletteItemResource.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Core/ColorPaletteItemResource.swift b/Library/Core/ColorPaletteItemResource.swift index f16cdd5..493b624 100644 --- a/Library/Core/ColorPaletteItemResource.swift +++ b/Library/Core/ColorPaletteItemResource.swift @@ -7,7 +7,7 @@ // License: MIT License // -import Foundation +import CoreGraphics public protocol ColorPaletteItemResourceType { From 99565c83ea0a7dccc42a8274fe04d24582986232 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Wed, 6 Jun 2018 20:19:04 -0700 Subject: [PATCH 15/54] Update project settings for Xcode 10 --- R.swift.Library.xcodeproj/project.pbxproj | 6 +++++- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++++ .../xcshareddata/xcschemes/Rswift-iOS.xcscheme | 2 +- .../xcshareddata/xcschemes/Rswift-tvOS.xcscheme | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 R.swift.Library.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj index 6348bdd..ac1015e 100644 --- a/R.swift.Library.xcodeproj/project.pbxproj +++ b/R.swift.Library.xcodeproj/project.pbxproj @@ -359,7 +359,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1000; ORGANIZATIONNAME = "Mathijs Kadijk"; TargetAttributes = { 806E69911C42BD9C00DE3A8B = { @@ -618,12 +618,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -674,12 +676,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/R.swift.Library.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/R.swift.Library.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/R.swift.Library.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IDEDidComputeMac32BitWarning</key> + <true/> +</dict> +</plist> diff --git a/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-iOS.xcscheme b/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-iOS.xcscheme index 180b09f..d317290 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 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - LastUpgradeVersion = "0900" + LastUpgradeVersion = "1000" version = "1.3"> <BuildAction parallelizeBuildables = "YES" diff --git a/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme b/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme index 6216bde..934b0e2 100644 --- a/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme +++ b/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - LastUpgradeVersion = "0900" + LastUpgradeVersion = "1000" version = "1.3"> <BuildAction parallelizeBuildables = "YES" From 38252b2c5a54b619b362127db6b2d22c43fe1f20 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Wed, 6 Jun 2018 20:19:25 -0700 Subject: [PATCH 16/54] Upgrade to Swift 4.2 Fixes mac-cain13/R.swift#412 --- Library/UIKit/NibResource+UIKit.swift | 2 +- R.swift.Library.xcodeproj/project.pbxproj | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Library/UIKit/NibResource+UIKit.swift b/Library/UIKit/NibResource+UIKit.swift index 3e3d14a..eada71d 100644 --- a/Library/UIKit/NibResource+UIKit.swift +++ b/Library/UIKit/NibResource+UIKit.swift @@ -19,7 +19,7 @@ public extension NibResourceType { - returns: An array containing the top-level objects from the NIB */ - public func instantiate(withOwner ownerOrNil: Any?, options optionsOrNil: [AnyHashable : Any]? = [:]) -> [Any] { + public func instantiate(withOwner ownerOrNil: Any?, options optionsOrNil: [UINib.OptionsKey : Any]? = [:]) -> [Any] { return UINib(resource: self).instantiate(withOwner: ownerOrNil, options: optionsOrNil) } } diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj index ac1015e..e7a270c 100644 --- a/R.swift.Library.xcodeproj/project.pbxproj +++ b/R.swift.Library.xcodeproj/project.pbxproj @@ -552,7 +552,7 @@ PRODUCT_NAME = Rswift; SDKROOT = appletvos; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; }; @@ -574,7 +574,7 @@ PRODUCT_NAME = Rswift; SDKROOT = appletvos; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; 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 = 4.0; + SWIFT_VERSION = 4.2; 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 = 4.0; + SWIFT_VERSION = 4.2; TVOS_DEPLOYMENT_TARGET = 9.1; }; name = Release; @@ -734,7 +734,7 @@ PRODUCT_NAME = Rswift; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -755,7 +755,7 @@ PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.rswift.library; PRODUCT_NAME = Rswift; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -766,7 +766,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -777,7 +777,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; From 395d117981080bf9e47279da2cb33492a0057886 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Wed, 6 Jun 2018 20:41:44 -0700 Subject: [PATCH 17/54] Remove ColorPaletteItemResource Since clr support is now removed. --- Library/Core/ColorPaletteItemResource.swift | 55 ------------------- .../ColorPaletteItemResource+UIKit.swift | 21 ------- R.swift.Library.xcodeproj/project.pbxproj | 12 ---- 3 files changed, 88 deletions(-) delete mode 100644 Library/Core/ColorPaletteItemResource.swift delete mode 100644 Library/UIKit/ColorPaletteItemResource+UIKit.swift diff --git a/Library/Core/ColorPaletteItemResource.swift b/Library/Core/ColorPaletteItemResource.swift deleted file mode 100644 index 493b624..0000000 --- a/Library/Core/ColorPaletteItemResource.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// 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 CoreGraphics - -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/UIKit/ColorPaletteItemResource+UIKit.swift b/Library/UIKit/ColorPaletteItemResource+UIKit.swift deleted file mode 100644 index cb10d7e..0000000 --- a/Library/UIKit/ColorPaletteItemResource+UIKit.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// ColorPaletteItemResource+UIKit.swift -// R.swift.Library -// -// Created by Tom Lokhorst on 2016-04-23. -// From: https://github.com/mac-cain13/R.swift.Library -// License: MIT License -// - -import UIKit - -public extension ColorPaletteItemResourceType { - /** - Returns the a UIColor - - - 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/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj index e7a270c..8c5a44d 100644 --- a/R.swift.Library.xcodeproj/project.pbxproj +++ b/R.swift.Library.xcodeproj/project.pbxproj @@ -65,11 +65,7 @@ E24720CA1C96B4D100DF291D /* ColorResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22D43661C95EEA100692FFF /* ColorResource.swift */; }; E250BE971CCBF60300CC71DE /* StringResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E250BE961CCBF60300CC71DE /* StringResource.swift */; }; E250BE991CCBF7E900CC71DE /* StringResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E250BE961CCBF60300CC71DE /* StringResource.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 */ @@ -125,8 +121,6 @@ E20F34A61C92B44100338F81 /* Data+FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Data+FileResource.swift"; sourceTree = "<group>"; }; E22D43661C95EEA100692FFF /* ColorResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorResource.swift; sourceTree = "<group>"; }; E250BE961CCBF60300CC71DE /* StringResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringResource.swift; sourceTree = "<group>"; }; - E2CA68EA1EE75151009C4DB4 /* ColorPaletteItemResource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorPaletteItemResource.swift; sourceTree = "<group>"; }; - E2CA68EC1EE751A9009C4DB4 /* ColorPaletteItemResource+UIKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ColorPaletteItemResource+UIKit.swift"; sourceTree = "<group>"; }; E2CA68EE1EE75992009C4DB4 /* UIColor+ColorResource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+ColorResource.swift"; sourceTree = "<group>"; }; /* End PBXFileReference section */ @@ -167,7 +161,6 @@ D543F9C21C14987000D16A0C /* UIKit */ = { isa = PBXGroup; children = ( - E2CA68EC1EE751A9009C4DB4 /* ColorPaletteItemResource+UIKit.swift */, D5E435A81C3CFB460091090C /* NibResource+UIKit.swift */, D57E1EB81C3E4C1A00DDA68F /* StoryboardResourceWithInitialController+UIKit.swift */, D543F9CE1C149C0A00D16A0C /* TypedStoryboardSegueInfo+UIStoryboardSegue.swift */, @@ -188,7 +181,6 @@ D543F9CD1C1499CF00D16A0C /* Core */ = { isa = PBXGroup; children = ( - E2CA68EA1EE75151009C4DB4 /* ColorPaletteItemResource.swift */, E22D43661C95EEA100692FFF /* ColorResource.swift */, D5E435AC1C3D00770091090C /* FileResource.swift */, D57E1EB21C3D762300DDA68F /* FontResource.swift */, @@ -459,11 +451,9 @@ 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 */, 806E69B91C42BDE000DE3A8B /* UITableView+ReuseIdentifierProtocol.swift in Sources */, 806E69AE1C42BDDA00DE3A8B /* StoryboardResource.swift in Sources */, - E2CA68F11EE75A02009C4DB4 /* ColorPaletteItemResource.swift in Sources */, 806E69A91C42BDDA00DE3A8B /* FileResource.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -483,9 +473,7 @@ 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 */, From 194293c833e6d0509a6f163384aac02e6ad01a79 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Sat, 23 Jun 2018 14:03:07 +0200 Subject: [PATCH 18/54] Update test target device --- fastlane/Fastfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index eff3998..48cc68e 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -77,13 +77,13 @@ lane :runalltests do scan( project: "R.swift.Library.xcodeproj", scheme: "Rswift-iOS", - destination: "name=iPhone SE", + device: "iPhone 8", clean: true ) scan( project: "R.swift.Library.xcodeproj", scheme: "Rswift-tvOS", - destination: "name=Apple TV 1080p", + device: "Apple TV 4K", clean: true ) end From 2a6c02bb4b7d0dcde910dad99559cfe5125949f6 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Sat, 23 Jun 2018 14:12:29 +0200 Subject: [PATCH 19/54] Become compatible with the new Fastlane version --- fastlane/Fastfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 48cc68e..5c2bb3b 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -8,7 +8,7 @@ lane :release do |options| if options[:allow_dirty_branch] != true ensure_git_status_clean else - Helper.log.info "Skipping the 'git status clean' check!".yellow + UI.message "Skipping the 'git status clean' check!".yellow end git_pull @@ -23,7 +23,7 @@ lane :release do |options| end currentVersion = version_get_podspec() - Helper.log.info "Current R.swift.Library podspec version is #{currentVersion}" + UI.message "Current R.swift.Library podspec version is #{currentVersion}" bumpType = prompt(text: "What kind of release is this? (major/minor/patch/custom)".green, boolean: false, ci_input: "") isPrerelease = false From e928ac1c1740fe1032a69fd660e680486fa38277 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Sat, 23 Jun 2018 14:27:50 +0200 Subject: [PATCH 20/54] Fix AF helper with new Fastlane --- fastlane/actions/af_create_github_release.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fastlane/actions/af_create_github_release.rb b/fastlane/actions/af_create_github_release.rb index cdd6d72..55a6b5f 100644 --- a/fastlane/actions/af_create_github_release.rb +++ b/fastlane/actions/af_create_github_release.rb @@ -52,14 +52,14 @@ def self.run(params) # Fetch Request res = http.request(req) rescue StandardError => e - Helper.log.info "HTTP Request failed (#{e.message})".red + UI.message "HTTP Request failed (#{e.message})".red end case res.code.to_i when 201 json = JSON.parse(res.body) - Helper.log.info "Github Release Created (#{json["id"]})".green - Helper.log.info "#{json["html_url"]}".green + UI.message "Github Release Created (#{json["id"]})".green + UI.message "#{json["html_url"]}".green Actions.lane_context[SharedValues::GITHUB_RELEASE_ID] = json["id"] Actions.lane_context[SharedValues::GITHUB_RELEASE_HTML_URL] = json["html_url"] @@ -69,7 +69,7 @@ def self.run(params) json = JSON.parse(res.body) raise "Error Creating Github Release (#{res.code}): #{json}".red else - Helper.log.info "Status Code: #{res.code} Body: #{res.body}" + UI.message "Status Code: #{res.code} Body: #{res.body}" raise "Error Creating Github Release".red end end From b6d4ccb5042f933b9b7acb2fb1d424f93512033e Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Sat, 23 Jun 2018 14:29:48 +0200 Subject: [PATCH 21/54] Preparing for the 5.0.0.alpha.1 release --- R.swift.Library.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index 85ac0ba..cdecc5e 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 = "4.0.0" + spec.version = "5.0.0.alpha.1" spec.license = "MIT" spec.summary = "Companion library for R.swift, featuring types used to type resources" From 70e50f910286e4291659ef0059dc23a00bd9cfb8 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Sat, 23 Jun 2018 15:40:24 +0200 Subject: [PATCH 22/54] Fix link of cocoapods badge --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 66a5483..45bde32 100644 --- a/Readme.md +++ b/Readme.md @@ -1,4 +1,4 @@ -# R.swift.Library [](http://cocoapods.org/?q=R.swift.Library) [](https://github.com/Carthage/Carthage) [](blob/master/License)  +# R.swift.Library [](https://cocoapods.org/pods/R.swift) [](https://github.com/Carthage/Carthage) [](blob/master/License)  _Library containing types supporting code generated by [R.swift](https://github.com/mac-cain13/R.swift)_ From 62cc40c46017de6ea1a640b527aae992505ebef4 Mon Sep 17 00:00:00 2001 From: Lammert Westerhoff <westerhoff@gmail.com> Date: Tue, 28 Aug 2018 13:20:59 +0200 Subject: [PATCH 23/54] Add basic watchOS support --- R.swift.Library.podspec | 5 +- R.swift.Library.xcodeproj/project.pbxproj | 174 ++++++++++++++++++++++ Rswift-watchOS/Info.plist | 22 +++ Rswift-watchOS/Rswift_watchOS.h | 19 +++ 4 files changed, 219 insertions(+), 1 deletion(-) create mode 100644 Rswift-watchOS/Info.plist create mode 100644 Rswift-watchOS/Rswift_watchOS.h diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index cdecc5e..abd2e33 100644 --- a/R.swift.Library.podspec +++ b/R.swift.Library.podspec @@ -19,9 +19,12 @@ Pod::Spec.new do |spec| spec.source = { :git => "https://github.com/mac-cain13/R.swift.Library.git", :tag => "v#{spec.version}" } spec.ios.deployment_target = '8.0' + spec.ios.source_files = "Library/**/*.swift" spec.tvos.deployment_target = '9.0' + spec.tvos.source_files = "Library/**/*.swift" + spec.watchos.deployment_target = '2.2' + spec.watchos.source_files = ["Library/Core/*.swift", "Library/Foundation/*.swift"] spec.module_name = "Rswift" - spec.source_files = "Library/**/*.swift" end diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj index 8c5a44d..92ae2c8 100644 --- a/R.swift.Library.xcodeproj/project.pbxproj +++ b/R.swift.Library.xcodeproj/project.pbxproj @@ -7,6 +7,24 @@ objects = { /* Begin PBXBuildFile section */ + 2F5FBC4421355A1400A83A69 /* Rswift_watchOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F5FBC4221355A1400A83A69 /* Rswift_watchOS.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2F5FBC4821355AC400A83A69 /* ColorResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22D43661C95EEA100692FFF /* ColorResource.swift */; }; + 2F5FBC4A21355ADB00A83A69 /* Bundle+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D56DC7721C42B65C00623437 /* Bundle+FileResource.swift */; }; + 2F5FBC4B21355ADB00A83A69 /* Data+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20F34A61C92B44100338F81 /* Data+FileResource.swift */; }; + 2F5FBC4C21355ADF00A83A69 /* FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E435AC1C3D00770091090C /* FileResource.swift */; }; + 2F5FBC4D21355ADF00A83A69 /* FontResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D57E1EB21C3D762300DDA68F /* FontResource.swift */; }; + 2F5FBC4E21355ADF00A83A69 /* Identifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = D543F9BA1C1497EB00D16A0C /* Identifier.swift */; }; + 2F5FBC4F21355ADF00A83A69 /* ImageResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D553F5841C44157000885232 /* ImageResource.swift */; }; + 2F5FBC5021355ADF00A83A69 /* NibResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D543F9C01C14984300D16A0C /* NibResource.swift */; }; + 2F5FBC5121355ADF00A83A69 /* ReuseIdentifierProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D543F9BC1C14980600D16A0C /* ReuseIdentifierProtocol.swift */; }; + 2F5FBC5221355ADF00A83A69 /* StoryboardResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D57E1EB61C3E482A00DDA68F /* StoryboardResource.swift */; }; + 2F5FBC5321355ADF00A83A69 /* StoryboardSegueIdentifierProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D543F9BE1C14983100D16A0C /* StoryboardSegueIdentifierProtocol.swift */; }; + 2F5FBC5421355ADF00A83A69 /* StoryboardViewControllerResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51335261C959DF20014C9D4 /* StoryboardViewControllerResource.swift */; }; + 2F5FBC5521355ADF00A83A69 /* StringResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E250BE961CCBF60300CC71DE /* StringResource.swift */; }; + 2F5FBC5621355ADF00A83A69 /* Validatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53F19231C229D7200AE2FAD /* Validatable.swift */; }; + 2F5FBC5821355B0200A83A69 /* UIColor+ColorResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2CA68EE1EE75992009C4DB4 /* UIColor+ColorResource.swift */; }; + 2F5FBC5921355B0200A83A69 /* UIFont+FontResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D57E1EB41C3D774000DDA68F /* UIFont+FontResource.swift */; }; + 2F5FBC5A21355B0200A83A69 /* UIImage+ImageResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D553F5861C44170E00885232 /* UIImage+ImageResource.swift */; }; 806E699C1C42BD9C00DE3A8B /* Rswift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 806E69921C42BD9C00DE3A8B /* Rswift.framework */; }; 806E69A91C42BDDA00DE3A8B /* FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E435AC1C3D00770091090C /* FileResource.swift */; }; 806E69AA1C42BDDA00DE3A8B /* FontResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D57E1EB21C3D762300DDA68F /* FontResource.swift */; }; @@ -87,6 +105,9 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 2F5FBC4021355A1400A83A69 /* Rswift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Rswift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2F5FBC4221355A1400A83A69 /* Rswift_watchOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Rswift_watchOS.h; sourceTree = "<group>"; }; + 2F5FBC4321355A1400A83A69 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 806E69921C42BD9C00DE3A8B /* Rswift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Rswift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 806E699B1C42BD9C00DE3A8B /* RswiftTests-tvOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "RswiftTests-tvOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; D51335261C959DF20014C9D4 /* StoryboardViewControllerResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardViewControllerResource.swift; sourceTree = "<group>"; }; @@ -125,6 +146,13 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 2F5FBC3D21355A1400A83A69 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 806E698E1C42BD9C00DE3A8B /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -158,6 +186,15 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 2F5FBC4121355A1400A83A69 /* Rswift-watchOS */ = { + isa = PBXGroup; + children = ( + 2F5FBC4221355A1400A83A69 /* Rswift_watchOS.h */, + 2F5FBC4321355A1400A83A69 /* Info.plist */, + ); + path = "Rswift-watchOS"; + sourceTree = "<group>"; + }; D543F9C21C14987000D16A0C /* UIKit */ = { isa = PBXGroup; children = ( @@ -211,6 +248,7 @@ children = ( D59246501C117A55007F94C7 /* Library */, D592465C1C117A55007F94C7 /* LibraryTests */, + 2F5FBC4121355A1400A83A69 /* Rswift-watchOS */, D592464F1C117A55007F94C7 /* Products */, ); indentWidth = 2; @@ -225,6 +263,7 @@ D59246581C117A55007F94C7 /* RswiftTests-iOS.xctest */, 806E69921C42BD9C00DE3A8B /* Rswift.framework */, 806E699B1C42BD9C00DE3A8B /* RswiftTests-tvOS.xctest */, + 2F5FBC4021355A1400A83A69 /* Rswift.framework */, ); name = Products; sourceTree = "<group>"; @@ -253,6 +292,14 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 2F5FBC3B21355A1400A83A69 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 2F5FBC4421355A1400A83A69 /* Rswift_watchOS.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 806E698F1C42BD9C00DE3A8B /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -272,6 +319,24 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 2F5FBC3F21355A1400A83A69 /* Rswift-watchOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2F5FBC4721355A1400A83A69 /* Build configuration list for PBXNativeTarget "Rswift-watchOS" */; + buildPhases = ( + 2F5FBC3B21355A1400A83A69 /* Headers */, + 2F5FBC3C21355A1400A83A69 /* Sources */, + 2F5FBC3D21355A1400A83A69 /* Frameworks */, + 2F5FBC3E21355A1400A83A69 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Rswift-watchOS"; + productName = "Rswift-watchOS"; + productReference = 2F5FBC4021355A1400A83A69 /* Rswift.framework */; + productType = "com.apple.product-type.framework"; + }; 806E69911C42BD9C00DE3A8B /* Rswift-tvOS */ = { isa = PBXNativeTarget; buildConfigurationList = 806E69A31C42BD9C00DE3A8B /* Build configuration list for PBXNativeTarget "Rswift-tvOS" */; @@ -354,6 +419,10 @@ LastUpgradeCheck = 1000; ORGANIZATIONNAME = "Mathijs Kadijk"; TargetAttributes = { + 2F5FBC3F21355A1400A83A69 = { + CreatedOnToolsVersion = 10.0; + ProvisioningStyle = Automatic; + }; 806E69911C42BD9C00DE3A8B = { CreatedOnToolsVersion = 7.2; LastSwiftMigration = 0900; @@ -388,11 +457,19 @@ D59246571C117A55007F94C7 /* RswiftTests-iOS */, 806E69911C42BD9C00DE3A8B /* Rswift-tvOS */, 806E699A1C42BD9C00DE3A8B /* RswiftTests-tvOS */, + 2F5FBC3F21355A1400A83A69 /* Rswift-watchOS */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 2F5FBC3E21355A1400A83A69 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 806E69901C42BD9C00DE3A8B /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -424,6 +501,30 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 2F5FBC3C21355A1400A83A69 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2F5FBC4F21355ADF00A83A69 /* ImageResource.swift in Sources */, + 2F5FBC5421355ADF00A83A69 /* StoryboardViewControllerResource.swift in Sources */, + 2F5FBC4D21355ADF00A83A69 /* FontResource.swift in Sources */, + 2F5FBC5A21355B0200A83A69 /* UIImage+ImageResource.swift in Sources */, + 2F5FBC5921355B0200A83A69 /* UIFont+FontResource.swift in Sources */, + 2F5FBC4821355AC400A83A69 /* ColorResource.swift in Sources */, + 2F5FBC4C21355ADF00A83A69 /* FileResource.swift in Sources */, + 2F5FBC5221355ADF00A83A69 /* StoryboardResource.swift in Sources */, + 2F5FBC5521355ADF00A83A69 /* StringResource.swift in Sources */, + 2F5FBC4B21355ADB00A83A69 /* Data+FileResource.swift in Sources */, + 2F5FBC5021355ADF00A83A69 /* NibResource.swift in Sources */, + 2F5FBC5321355ADF00A83A69 /* StoryboardSegueIdentifierProtocol.swift in Sources */, + 2F5FBC4E21355ADF00A83A69 /* Identifier.swift in Sources */, + 2F5FBC4A21355ADB00A83A69 /* Bundle+FileResource.swift in Sources */, + 2F5FBC5821355B0200A83A69 /* UIColor+ColorResource.swift in Sources */, + 2F5FBC5121355ADF00A83A69 /* ReuseIdentifierProtocol.swift in Sources */, + 2F5FBC5621355ADF00A83A69 /* Validatable.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 806E698D1C42BD9C00DE3A8B /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -524,6 +625,70 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ + 2F5FBC4521355A1400A83A69 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; + INFOPLIST_FILE = "Rswift-watchOS/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.rswift.library; + PRODUCT_NAME = Rswift; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.2; + }; + name = Debug; + }; + 2F5FBC4621355A1400A83A69 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; + INFOPLIST_FILE = "Rswift-watchOS/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.rswift.library; + PRODUCT_NAME = Rswift; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.2; + }; + name = Release; + }; 806E69A41C42BD9C00DE3A8B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -772,6 +937,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 2F5FBC4721355A1400A83A69 /* Build configuration list for PBXNativeTarget "Rswift-watchOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2F5FBC4521355A1400A83A69 /* Debug */, + 2F5FBC4621355A1400A83A69 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 806E69A31C42BD9C00DE3A8B /* Build configuration list for PBXNativeTarget "Rswift-tvOS" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Rswift-watchOS/Info.plist b/Rswift-watchOS/Info.plist new file mode 100644 index 0000000..e1fe4cf --- /dev/null +++ b/Rswift-watchOS/Info.plist @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>FMWK</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleVersion</key> + <string>$(CURRENT_PROJECT_VERSION)</string> +</dict> +</plist> diff --git a/Rswift-watchOS/Rswift_watchOS.h b/Rswift-watchOS/Rswift_watchOS.h new file mode 100644 index 0000000..5b0a159 --- /dev/null +++ b/Rswift-watchOS/Rswift_watchOS.h @@ -0,0 +1,19 @@ +// +// Rswift_watchOS.h +// Rswift-watchOS +// +// Created by Lammert Westerhoff on 28/08/2018. +// Copyright © 2018 Mathijs Kadijk. All rights reserved. +// + +#import <WatchKit/WatchKit.h> + +//! Project version number for Rswift_watchOS. +FOUNDATION_EXPORT double Rswift_watchOSVersionNumber; + +//! Project version string for Rswift_watchOS. +FOUNDATION_EXPORT const unsigned char Rswift_watchOSVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import <Rswift_watchOS/PublicHeader.h> + + From cb11aec9943393c9903b3623068207b26c9e246b Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Mon, 3 Sep 2018 15:32:14 +0200 Subject: [PATCH 24/54] Preparing for the 5.0.0.alpha.2 release --- R.swift.Library.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index cdecc5e..c1089f5 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 = "5.0.0.alpha.1" + spec.version = "5.0.0.alpha.2" spec.license = "MIT" spec.summary = "Companion library for R.swift, featuring types used to type resources" From f491e3988f50d337a9096fcc67ffa338974823ca Mon Sep 17 00:00:00 2001 From: Tom Lokhorst <tom@lokhorst.eu> Date: Mon, 3 Dec 2018 23:16:42 +0100 Subject: [PATCH 25/54] Set APPLICATION_EXTENSION_API_ONLY in target --- R.swift.Library.podspec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index c1089f5..87e0420 100644 --- a/R.swift.Library.podspec +++ b/R.swift.Library.podspec @@ -18,6 +18,8 @@ Pod::Spec.new do |spec| spec.requires_arc = true spec.source = { :git => "https://github.com/mac-cain13/R.swift.Library.git", :tag => "v#{spec.version}" } + spec.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' } + spec.ios.deployment_target = '8.0' spec.tvos.deployment_target = '9.0' From 03b3f069f43cab162eaba6e395fd293b6787e022 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Tue, 11 Dec 2018 12:50:42 +0100 Subject: [PATCH 26/54] Preparing for the 5.0.0 release --- R.swift.Library.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index 87e0420..d906e95 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 = "5.0.0.alpha.2" + spec.version = "5.0.0" spec.license = "MIT" spec.summary = "Companion library for R.swift, featuring types used to type resources" From d6eba6f7f42ac5a10c73309f1ed63f43f42af38c Mon Sep 17 00:00:00 2001 From: Lammert Westerhoff <westerhoff@gmail.com> Date: Mon, 14 Jan 2019 16:37:08 +0100 Subject: [PATCH 27/54] Fix code for different platforms --- Library/UIKit/UIColor+ColorResource.swift | 17 +++++++++++++++++ Library/UIKit/UIImage+ImageResource.swift | 16 ++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/Library/UIKit/UIColor+ColorResource.swift b/Library/UIKit/UIColor+ColorResource.swift index 800d338..f585de0 100644 --- a/Library/UIKit/UIColor+ColorResource.swift +++ b/Library/UIKit/UIColor+ColorResource.swift @@ -12,6 +12,8 @@ import UIKit @available(iOS 11.0, *) @available(tvOS 11.0, *) public extension UIColor { + + #if os(iOS) || os(tvOS) /** Returns the color from this resource (R.color.*) that is compatible with the trait collection. @@ -23,4 +25,19 @@ public extension UIColor { public convenience init?(resource: ColorResourceType, compatibleWith traitCollection: UITraitCollection? = nil) { self.init(named: resource.name, in: resource.bundle, compatibleWith: traitCollection) } + #endif + + #if os(watchOS) + /** + 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.*) + + - 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. + */ + @available(watchOSApplicationExtension 4.0, *) + public convenience init?(resource: ColorResourceType) { + self.init(named: resource.name) + } + #endif } diff --git a/Library/UIKit/UIImage+ImageResource.swift b/Library/UIKit/UIImage+ImageResource.swift index 6037b4f..5f3daa9 100644 --- a/Library/UIKit/UIImage+ImageResource.swift +++ b/Library/UIKit/UIImage+ImageResource.swift @@ -10,6 +10,8 @@ import UIKit public extension UIImage { + + #if os(iOS) || os(tvOS) /** Returns the image from this resource (R.image.*) that is compatible with the trait collection. @@ -21,4 +23,18 @@ public extension UIImage { public convenience init?(resource: ImageResourceType, compatibleWith traitCollection: UITraitCollection? = nil) { self.init(named: resource.name, in: resource.bundle, compatibleWith: traitCollection) } + #endif + + #if os(watchOS) + /** + Returns the image from this resource (R.image.*) that is compatible with the trait collection. + + - parameter resource: The resource you want the image of (R.image.*) + + - returns: An image that exactly or best matches the desired traits with the given resource (R.image.*), or nil if no suitable image was found. + */ + public convenience init?(resource: ImageResourceType) { + self.init(named: resource.name) + } + #endif } From c6ba2bced38a235aaae53066a898e5580000f767 Mon Sep 17 00:00:00 2001 From: Tom Lokhorst <tom@lokhorst.eu> Date: Mon, 14 Jan 2019 17:36:22 +0100 Subject: [PATCH 28/54] Remove Rswift-watchOS target files, use shared Info.plist file --- R.swift.Library.xcodeproj/project.pbxproj | 18 ++---------------- Rswift-watchOS/Info.plist | 22 ---------------------- Rswift-watchOS/Rswift_watchOS.h | 19 ------------------- 3 files changed, 2 insertions(+), 57 deletions(-) delete mode 100644 Rswift-watchOS/Info.plist delete mode 100644 Rswift-watchOS/Rswift_watchOS.h diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj index 92ae2c8..bd72db7 100644 --- a/R.swift.Library.xcodeproj/project.pbxproj +++ b/R.swift.Library.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 2F5FBC4421355A1400A83A69 /* Rswift_watchOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F5FBC4221355A1400A83A69 /* Rswift_watchOS.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2F5FBC4821355AC400A83A69 /* ColorResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22D43661C95EEA100692FFF /* ColorResource.swift */; }; 2F5FBC4A21355ADB00A83A69 /* Bundle+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D56DC7721C42B65C00623437 /* Bundle+FileResource.swift */; }; 2F5FBC4B21355ADB00A83A69 /* Data+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20F34A61C92B44100338F81 /* Data+FileResource.swift */; }; @@ -106,8 +105,6 @@ /* Begin PBXFileReference section */ 2F5FBC4021355A1400A83A69 /* Rswift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Rswift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2F5FBC4221355A1400A83A69 /* Rswift_watchOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Rswift_watchOS.h; sourceTree = "<group>"; }; - 2F5FBC4321355A1400A83A69 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 806E69921C42BD9C00DE3A8B /* Rswift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Rswift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 806E699B1C42BD9C00DE3A8B /* RswiftTests-tvOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "RswiftTests-tvOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; D51335261C959DF20014C9D4 /* StoryboardViewControllerResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardViewControllerResource.swift; sourceTree = "<group>"; }; @@ -186,15 +183,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 2F5FBC4121355A1400A83A69 /* Rswift-watchOS */ = { - isa = PBXGroup; - children = ( - 2F5FBC4221355A1400A83A69 /* Rswift_watchOS.h */, - 2F5FBC4321355A1400A83A69 /* Info.plist */, - ); - path = "Rswift-watchOS"; - sourceTree = "<group>"; - }; D543F9C21C14987000D16A0C /* UIKit */ = { isa = PBXGroup; children = ( @@ -248,7 +236,6 @@ children = ( D59246501C117A55007F94C7 /* Library */, D592465C1C117A55007F94C7 /* LibraryTests */, - 2F5FBC4121355A1400A83A69 /* Rswift-watchOS */, D592464F1C117A55007F94C7 /* Products */, ); indentWidth = 2; @@ -296,7 +283,6 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 2F5FBC4421355A1400A83A69 /* Rswift_watchOS.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -642,7 +628,7 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = "Rswift-watchOS/Info.plist"; + INFOPLIST_FILE = Library/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; @@ -675,7 +661,7 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = "Rswift-watchOS/Info.plist"; + INFOPLIST_FILE = Library/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_FAST_MATH = YES; diff --git a/Rswift-watchOS/Info.plist b/Rswift-watchOS/Info.plist deleted file mode 100644 index e1fe4cf..0000000 --- a/Rswift-watchOS/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>$(DEVELOPMENT_LANGUAGE)</string> - <key>CFBundleExecutable</key> - <string>$(EXECUTABLE_NAME)</string> - <key>CFBundleIdentifier</key> - <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>$(PRODUCT_NAME)</string> - <key>CFBundlePackageType</key> - <string>FMWK</string> - <key>CFBundleShortVersionString</key> - <string>1.0</string> - <key>CFBundleVersion</key> - <string>$(CURRENT_PROJECT_VERSION)</string> -</dict> -</plist> diff --git a/Rswift-watchOS/Rswift_watchOS.h b/Rswift-watchOS/Rswift_watchOS.h deleted file mode 100644 index 5b0a159..0000000 --- a/Rswift-watchOS/Rswift_watchOS.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// Rswift_watchOS.h -// Rswift-watchOS -// -// Created by Lammert Westerhoff on 28/08/2018. -// Copyright © 2018 Mathijs Kadijk. All rights reserved. -// - -#import <WatchKit/WatchKit.h> - -//! Project version number for Rswift_watchOS. -FOUNDATION_EXPORT double Rswift_watchOSVersionNumber; - -//! Project version string for Rswift_watchOS. -FOUNDATION_EXPORT const unsigned char Rswift_watchOSVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import <Rswift_watchOS/PublicHeader.h> - - From 1a51317652f3b6e116de41ff06f74a2745f05b7b Mon Sep 17 00:00:00 2001 From: Eduard Sergeev <devsedo@gmail.com> Date: Tue, 5 Mar 2019 16:58:22 +0700 Subject: [PATCH 29/54] Typo Fixing typo. --- Library/Core/Validatable.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Core/Validatable.swift b/Library/Core/Validatable.swift index 3467513..f965a6c 100644 --- a/Library/Core/Validatable.swift +++ b/Library/Core/Validatable.swift @@ -21,7 +21,7 @@ public struct ValidationError: Error, CustomStringConvertible { public protocol Validatable { /** - Validates this entity and throws if it encounters a invalid situation, a validatable should also validate it sub-validatables if it has any. + Validates this entity and throws if it encounters an invalid situation, a validatable should also validate it sub-validatables if it has any. - throws: If there the configuration error a ValidationError is thrown */ From 84e1ab256c3863c29c6458b64c45c6e4c7127d78 Mon Sep 17 00:00:00 2001 From: watanave <susan.se3p@gmail.com> Date: Tue, 26 Mar 2019 17:27:27 +0900 Subject: [PATCH 30/54] Fix warnnings 'public' modifier is redundant for instance method declared in a public extension --- Library/Foundation/Bundle+FileResource.swift | 4 ++-- Library/Foundation/Data+FileResource.swift | 2 +- Library/UIKit/NibResource+UIKit.swift | 2 +- ...StoryboardResourceWithInitialController+UIKit.swift | 2 +- .../UICollectionView+ReuseIdentifierProtocol.swift | 8 ++++---- Library/UIKit/UIColor+ColorResource.swift | 2 +- Library/UIKit/UIFont+FontResource.swift | 2 +- Library/UIKit/UIImage+ImageResource.swift | 2 +- Library/UIKit/UINib+NibResource.swift | 2 +- Library/UIKit/UIStoryboard+StoryboardResource.swift | 2 +- ...UIStoryboard+StoryboardViewControllerResource.swift | 2 +- .../UIKit/UITableView+ReuseIdentifierProtocol.swift | 10 +++++----- Library/UIKit/UIViewController+NibResource.swift | 2 +- ...wController+StoryboardSegueIdentifierProtocol.swift | 4 ++-- 14 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Library/Foundation/Bundle+FileResource.swift b/Library/Foundation/Bundle+FileResource.swift index 83af4ff..d632c8d 100644 --- a/Library/Foundation/Bundle+FileResource.swift +++ b/Library/Foundation/Bundle+FileResource.swift @@ -17,7 +17,7 @@ public extension Bundle { - returns: The file URL for the resource file (R.file.*) or nil if the file could not be located. */ - public func url(forResource resource: FileResourceType) -> URL? { + func url(forResource resource: FileResourceType) -> URL? { return url(forResource: resource.name, withExtension: resource.pathExtension) } @@ -28,7 +28,7 @@ public extension Bundle { - returns: The full pathname for the resource file (R.file.*) or nil if the file could not be located. */ - public func path(forResource resource: FileResourceType) -> String? { + func path(forResource resource: FileResourceType) -> String? { return path(forResource: resource.name, ofType: resource.pathExtension) } } diff --git a/Library/Foundation/Data+FileResource.swift b/Library/Foundation/Data+FileResource.swift index 2f612bd..36a0a36 100644 --- a/Library/Foundation/Data+FileResource.swift +++ b/Library/Foundation/Data+FileResource.swift @@ -20,7 +20,7 @@ public extension Data { - returns: A NSData object with the contents of the specified file. */ - public init(resource: FileResourceType) throws { + init(resource: FileResourceType) throws { guard let url = resource.url() else { throw NoUrlForResourceError() } try self.init(contentsOf: url) } diff --git a/Library/UIKit/NibResource+UIKit.swift b/Library/UIKit/NibResource+UIKit.swift index eada71d..4339d3f 100644 --- a/Library/UIKit/NibResource+UIKit.swift +++ b/Library/UIKit/NibResource+UIKit.swift @@ -19,7 +19,7 @@ public extension NibResourceType { - returns: An array containing the top-level objects from the NIB */ - public func instantiate(withOwner ownerOrNil: Any?, options optionsOrNil: [UINib.OptionsKey : Any]? = [:]) -> [Any] { + func instantiate(withOwner ownerOrNil: Any?, options optionsOrNil: [UINib.OptionsKey : Any]? = [:]) -> [Any] { return UINib(resource: self).instantiate(withOwner: ownerOrNil, options: optionsOrNil) } } diff --git a/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift b/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift index 23f4f46..b5b114c 100644 --- a/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift +++ b/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift @@ -16,7 +16,7 @@ public extension StoryboardResourceWithInitialControllerType { - returns: The initial view controller in the storyboard. */ - public func instantiateInitialViewController() -> InitialController? { + func instantiateInitialViewController() -> InitialController? { return UIStoryboard(resource: self).instantiateInitialViewController() as? InitialController } } diff --git a/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift b/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift index aabcf14..bf68fa1 100644 --- a/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift +++ b/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift @@ -19,7 +19,7 @@ public extension UICollectionView { - returns: A subclass of UICollectionReusableView or nil if the cast fails. */ - public func dequeueReusableCell<Identifier: ReuseIdentifierType>(withReuseIdentifier identifier: Identifier, for indexPath: IndexPath) -> Identifier.ReusableType? + func dequeueReusableCell<Identifier: ReuseIdentifierType>(withReuseIdentifier identifier: Identifier, for indexPath: IndexPath) -> Identifier.ReusableType? where Identifier.ReusableType: UICollectionReusableView { return dequeueReusableCell(withReuseIdentifier: identifier.identifier, for: indexPath) as? Identifier.ReusableType @@ -34,7 +34,7 @@ public extension UICollectionView { - returns: A subclass of UICollectionReusableView or nil if the cast fails. */ - public func dequeueReusableSupplementaryView<Identifier: ReuseIdentifierType>(ofKind elementKind: String, withReuseIdentifier identifier: Identifier, for indexPath: IndexPath) -> Identifier.ReusableType? + func dequeueReusableSupplementaryView<Identifier: ReuseIdentifierType>(ofKind elementKind: String, withReuseIdentifier identifier: Identifier, for indexPath: IndexPath) -> Identifier.ReusableType? where Identifier.ReusableType: UICollectionReusableView { return dequeueReusableSupplementaryView(ofKind: elementKind, withReuseIdentifier: identifier.identifier, for: indexPath) as? Identifier.ReusableType @@ -45,7 +45,7 @@ public extension UICollectionView { - parameter nibResource: A nib resource (R.nib.*) containing a object of type UICollectionViewCell that has a reuse identifier */ - public func register<Resource: NibResourceType & ReuseIdentifierType>(_ nibResource: Resource) + func register<Resource: NibResourceType & ReuseIdentifierType>(_ nibResource: Resource) where Resource.ReusableType: UICollectionViewCell { register(UINib(resource: nibResource), forCellWithReuseIdentifier: nibResource.identifier) @@ -56,7 +56,7 @@ public extension UICollectionView { - parameter nibResource: A nib resource (R.nib.*) containing a object of type UICollectionReusableView. that has a reuse identifier */ - public func register<Resource: NibResourceType & ReuseIdentifierType>(_ nibResource: Resource, forSupplementaryViewOfKind kind: String) + func register<Resource: NibResourceType & ReuseIdentifierType>(_ nibResource: Resource, forSupplementaryViewOfKind kind: String) where Resource.ReusableType: UICollectionReusableView { register(UINib(resource: nibResource), forSupplementaryViewOfKind: kind, withReuseIdentifier: nibResource.identifier) diff --git a/Library/UIKit/UIColor+ColorResource.swift b/Library/UIKit/UIColor+ColorResource.swift index 800d338..3bd7313 100644 --- a/Library/UIKit/UIColor+ColorResource.swift +++ b/Library/UIKit/UIColor+ColorResource.swift @@ -20,7 +20,7 @@ public extension UIColor { - 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) { + convenience init?(resource: ColorResourceType, compatibleWith traitCollection: UITraitCollection? = nil) { self.init(named: resource.name, in: resource.bundle, compatibleWith: traitCollection) } } diff --git a/Library/UIKit/UIFont+FontResource.swift b/Library/UIKit/UIFont+FontResource.swift index 237d9cf..cadc6c9 100644 --- a/Library/UIKit/UIFont+FontResource.swift +++ b/Library/UIKit/UIFont+FontResource.swift @@ -19,7 +19,7 @@ public extension UIFont { - returns: A font object of the specified font resource and size. */ - public convenience init?(resource: FontResourceType, size: CGFloat) { + convenience init?(resource: FontResourceType, size: CGFloat) { self.init(name: resource.fontName, size: size) } } diff --git a/Library/UIKit/UIImage+ImageResource.swift b/Library/UIKit/UIImage+ImageResource.swift index 6037b4f..f96fa14 100644 --- a/Library/UIKit/UIImage+ImageResource.swift +++ b/Library/UIKit/UIImage+ImageResource.swift @@ -18,7 +18,7 @@ public extension UIImage { - returns: An image that exactly or best matches the desired traits with the given resource (R.image.*), or nil if no suitable image was found. */ - public convenience init?(resource: ImageResourceType, compatibleWith traitCollection: UITraitCollection? = nil) { + convenience init?(resource: ImageResourceType, compatibleWith traitCollection: UITraitCollection? = nil) { self.init(named: resource.name, in: resource.bundle, compatibleWith: traitCollection) } } diff --git a/Library/UIKit/UINib+NibResource.swift b/Library/UIKit/UINib+NibResource.swift index 70cba8a..73bb048 100644 --- a/Library/UIKit/UINib+NibResource.swift +++ b/Library/UIKit/UINib+NibResource.swift @@ -17,7 +17,7 @@ public extension UINib { - returns: The initialized UINib object. An exception is thrown if there were errors during initialization or the nib file could not be located. */ - public convenience init(resource: NibResourceType) { + convenience init(resource: NibResourceType) { self.init(nibName: resource.name, bundle: resource.bundle) } } diff --git a/Library/UIKit/UIStoryboard+StoryboardResource.swift b/Library/UIKit/UIStoryboard+StoryboardResource.swift index bc03c2e..8848be0 100644 --- a/Library/UIKit/UIStoryboard+StoryboardResource.swift +++ b/Library/UIKit/UIStoryboard+StoryboardResource.swift @@ -17,7 +17,7 @@ public extension UIStoryboard { - returns: A storyboard object for the specified file. If no storyboard resource file matching name exists, an exception is thrown with description: `Could not find a storyboard named 'XXXXXX' in bundle....` */ - public convenience init(resource: StoryboardResourceType) { + convenience init(resource: StoryboardResourceType) { self.init(name: resource.name, bundle: resource.bundle) } } diff --git a/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift b/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift index f816d62..59adab3 100644 --- a/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift +++ b/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift @@ -18,7 +18,7 @@ public extension UIStoryboard { - returns: The view controller corresponding to the specified resource (R.storyboard.*.*). If no view controller is associated, this method throws an exception. */ - public func instantiateViewController<ViewControllerResource: StoryboardViewControllerResourceType>(withResource resource: ViewControllerResource) -> ViewControllerResource.ViewControllerType? { + func instantiateViewController<ViewControllerResource: StoryboardViewControllerResourceType>(withResource resource: ViewControllerResource) -> ViewControllerResource.ViewControllerType? { return self.instantiateViewController(withIdentifier: resource.identifier) as? ViewControllerResource.ViewControllerType } } diff --git a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift index c5202ee..10d4b4f 100644 --- a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift +++ b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift @@ -21,14 +21,14 @@ public extension UITableView { - precondition: You must register a class or nib file using the registerNib: or registerClass:forCellReuseIdentifier: method before calling this method. */ - public func dequeueReusableCell<Identifier: ReuseIdentifierType>(withIdentifier identifier: Identifier, for indexPath: IndexPath) -> Identifier.ReusableType? + func dequeueReusableCell<Identifier: ReuseIdentifierType>(withIdentifier identifier: Identifier, for indexPath: IndexPath) -> Identifier.ReusableType? where Identifier.ReusableType: UITableViewCell { return dequeueReusableCell(withIdentifier: identifier.identifier, for: indexPath) as? Identifier.ReusableType } @available(*, unavailable, message: "Use dequeueReusableCell(withIdentifier:for:) instead") - public func dequeueReusableCell<Identifier: ReuseIdentifierType>(withIdentifier identifier: Identifier) -> Identifier.ReusableType? + func dequeueReusableCell<Identifier: ReuseIdentifierType>(withIdentifier identifier: Identifier) -> Identifier.ReusableType? where Identifier.ReusableType: UITableViewCell { fatalError() @@ -41,7 +41,7 @@ public extension UITableView { - returns: A UITableViewHeaderFooterView object with the associated identifier or nil if no such object exists in the reusable view queue or if it couldn't be cast correctly. */ - public func dequeueReusableHeaderFooterView<Identifier: ReuseIdentifierType>(withIdentifier identifier: Identifier) -> Identifier.ReusableType? + func dequeueReusableHeaderFooterView<Identifier: ReuseIdentifierType>(withIdentifier identifier: Identifier) -> Identifier.ReusableType? where Identifier.ReusableType: UITableViewHeaderFooterView { return dequeueReusableHeaderFooterView(withIdentifier: identifier.identifier) as? Identifier.ReusableType @@ -52,7 +52,7 @@ public extension UITableView { - parameter nibResource: A nib resource (R.nib.*) containing a table view cell that has a reuse identifier */ - public func register<Resource: NibResourceType & ReuseIdentifierType>(_ nibResource: Resource) where Resource.ReusableType: UITableViewCell { + func register<Resource: NibResourceType & ReuseIdentifierType>(_ nibResource: Resource) where Resource.ReusableType: UITableViewCell { register(UINib(resource: nibResource), forCellReuseIdentifier: nibResource.identifier) } @@ -61,7 +61,7 @@ public extension UITableView { - parameter nibResource: A nib resource (R.nib.*) containing a view that has a reuse identifier */ - public func registerHeaderFooterView<Resource: NibResourceType>(_ nibResource: Resource) where Resource: ReuseIdentifierType, Resource.ReusableType: UIView { + func registerHeaderFooterView<Resource: NibResourceType>(_ nibResource: Resource) where Resource: ReuseIdentifierType, Resource.ReusableType: UIView { register(UINib(resource: nibResource), forHeaderFooterViewReuseIdentifier: nibResource.identifier) } } diff --git a/Library/UIKit/UIViewController+NibResource.swift b/Library/UIKit/UIViewController+NibResource.swift index 38c24ca..dbef8ce 100644 --- a/Library/UIKit/UIViewController+NibResource.swift +++ b/Library/UIKit/UIViewController+NibResource.swift @@ -18,7 +18,7 @@ public extension UIViewController { - returns: A newly initialized UIViewController object. */ - public convenience init(nib: NibResourceType) { + convenience init(nib: NibResourceType) { self.init(nibName: nib.name, bundle: nib.bundle) } } diff --git a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift index 6c886b4..27364a4 100644 --- a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift +++ b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift @@ -23,7 +23,7 @@ public extension SeguePerformerType { - parameter sender: The object that you want to use to initiate the segue. This object is made available for informational purposes during the actual segue. - SeeAlso: Library for typed block based segues: [tomlokhorst/SegueManager](https://github.com/tomlokhorst/SegueManager) */ - public func performSegue<Segue, Destination>(withIdentifier identifier: StoryboardSegueIdentifier<Segue, Self, Destination>, sender: Any?) { + func performSegue<Segue, Destination>(withIdentifier identifier: StoryboardSegueIdentifier<Segue, Self, Destination>, sender: Any?) { performSegue(withIdentifier: identifier.identifier, sender: sender) } } @@ -33,7 +33,7 @@ public extension StoryboardSegue where Source : UIViewController { Performs this segue on the source view controller - parameter sender: The object that you want to use to initiate the segue. This object is made available for informational purposes during the actual segue. */ - public func performSegue(sender: Any? = nil) { + func performSegue(sender: Any? = nil) { source.performSegue(withIdentifier: identifier.identifier, sender: sender) } } From 49e64419840d2d66b37b57b8a68de4f42407a0e0 Mon Sep 17 00:00:00 2001 From: watanave <susan.se3p@gmail.com> Date: Tue, 26 Mar 2019 17:47:58 +0900 Subject: [PATCH 31/54] Bump swift version file to 4 --- .swift-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.swift-version b/.swift-version index 9f55b2c..5186d07 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.0 +4.0 From ae88152aab915b35acd333c23836e22ea44246f4 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Sun, 31 Mar 2019 15:34:18 +0200 Subject: [PATCH 32/54] Preparing for the 5.0.1 release --- R.swift.Library.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index d906e95..1e5a9ab 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 = "5.0.0" + spec.version = "5.0.1" spec.license = "MIT" spec.summary = "Companion library for R.swift, featuring types used to type resources" From 997b6e5e80991de0556ba28e3d5c06b317bffe95 Mon Sep 17 00:00:00 2001 From: Tom Lokhorst <tom@lokhorst.eu> Date: Mon, 10 Jun 2019 22:04:53 +0200 Subject: [PATCH 33/54] Update to Swift 5 --- Library/UIKit/UIColor+ColorResource.swift | 2 +- Library/UIKit/UIImage+ImageResource.swift | 2 +- R.swift.Library.xcodeproj/project.pbxproj | 34 +++++++++++-------- .../xcschemes/Rswift-iOS.xcscheme | 24 ++++++------- .../xcschemes/Rswift-tvOS.xcscheme | 24 ++++++------- 5 files changed, 41 insertions(+), 45 deletions(-) diff --git a/Library/UIKit/UIColor+ColorResource.swift b/Library/UIKit/UIColor+ColorResource.swift index 4df3f15..6ee764d 100644 --- a/Library/UIKit/UIColor+ColorResource.swift +++ b/Library/UIKit/UIColor+ColorResource.swift @@ -36,7 +36,7 @@ public extension UIColor { - 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. */ @available(watchOSApplicationExtension 4.0, *) - public convenience init?(resource: ColorResourceType) { + convenience init?(resource: ColorResourceType) { self.init(named: resource.name) } #endif diff --git a/Library/UIKit/UIImage+ImageResource.swift b/Library/UIKit/UIImage+ImageResource.swift index ec8b3d7..c764814 100644 --- a/Library/UIKit/UIImage+ImageResource.swift +++ b/Library/UIKit/UIImage+ImageResource.swift @@ -33,7 +33,7 @@ public extension UIImage { - returns: An image that exactly or best matches the desired traits with the given resource (R.image.*), or nil if no suitable image was found. */ - public convenience init?(resource: ImageResourceType) { + convenience init?(resource: ImageResourceType) { self.init(named: resource.name) } #endif diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj index bd72db7..b1ea7f0 100644 --- a/R.swift.Library.xcodeproj/project.pbxproj +++ b/R.swift.Library.xcodeproj/project.pbxproj @@ -402,28 +402,29 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1100; ORGANIZATIONNAME = "Mathijs Kadijk"; TargetAttributes = { 2F5FBC3F21355A1400A83A69 = { CreatedOnToolsVersion = 10.0; + LastSwiftMigration = 1100; ProvisioningStyle = Automatic; }; 806E69911C42BD9C00DE3A8B = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; }; 806E699A1C42BD9C00DE3A8B = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; }; D592464D1C117A55007F94C7 = { CreatedOnToolsVersion = 7.1.1; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; }; D59246571C117A55007F94C7 = { CreatedOnToolsVersion = 7.1.1; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; }; }; }; @@ -432,6 +433,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = D59246441C117A54007F94C7; @@ -638,7 +640,7 @@ SDKROOT = watchos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 2.2; }; @@ -669,7 +671,7 @@ PRODUCT_NAME = Rswift; SDKROOT = watchos; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 2.2; }; @@ -691,7 +693,7 @@ PRODUCT_NAME = Rswift; SDKROOT = appletvos; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; }; @@ -713,7 +715,7 @@ PRODUCT_NAME = Rswift; SDKROOT = appletvos; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; }; @@ -727,7 +729,7 @@ PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TVOS_DEPLOYMENT_TARGET = 9.1; }; name = Debug; @@ -740,7 +742,7 @@ PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TVOS_DEPLOYMENT_TARGET = 9.1; }; name = Release; @@ -749,6 +751,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -807,6 +810,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -873,7 +877,7 @@ PRODUCT_NAME = Rswift; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -894,7 +898,7 @@ PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.rswift.library; PRODUCT_NAME = Rswift; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -905,7 +909,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -916,7 +920,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.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 d317290..5d6d23f 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 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - LastUpgradeVersion = "1000" + LastUpgradeVersion = "1100" version = "1.3"> <BuildAction parallelizeBuildables = "YES" @@ -27,6 +27,15 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> + <MacroExpansion> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "D592464D1C117A55007F94C7" + BuildableName = "Rswift.framework" + BlueprintName = "Rswift-iOS" + ReferencedContainer = "container:R.swift.Library.xcodeproj"> + </BuildableReference> + </MacroExpansion> <Testables> <TestableReference skipped = "NO"> @@ -39,17 +48,6 @@ </BuildableReference> </TestableReference> </Testables> - <MacroExpansion> - <BuildableReference - BuildableIdentifier = "primary" - BlueprintIdentifier = "D592464D1C117A55007F94C7" - BuildableName = "Rswift.framework" - BlueprintName = "Rswift-iOS" - ReferencedContainer = "container:R.swift.Library.xcodeproj"> - </BuildableReference> - </MacroExpansion> - <AdditionalOptions> - </AdditionalOptions> </TestAction> <LaunchAction buildConfiguration = "Debug" @@ -70,8 +68,6 @@ ReferencedContainer = "container:R.swift.Library.xcodeproj"> </BuildableReference> </MacroExpansion> - <AdditionalOptions> - </AdditionalOptions> </LaunchAction> <ProfileAction buildConfiguration = "Release" diff --git a/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme b/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme index 934b0e2..7e458d0 100644 --- a/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme +++ b/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - LastUpgradeVersion = "1000" + LastUpgradeVersion = "1100" version = "1.3"> <BuildAction parallelizeBuildables = "YES" @@ -27,6 +27,15 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> + <MacroExpansion> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "806E69911C42BD9C00DE3A8B" + BuildableName = "Rswift.framework" + BlueprintName = "Rswift-tvOS" + ReferencedContainer = "container:R.swift.Library.xcodeproj"> + </BuildableReference> + </MacroExpansion> <Testables> <TestableReference skipped = "NO"> @@ -39,17 +48,6 @@ </BuildableReference> </TestableReference> </Testables> - <MacroExpansion> - <BuildableReference - BuildableIdentifier = "primary" - BlueprintIdentifier = "806E69911C42BD9C00DE3A8B" - BuildableName = "Rswift.framework" - BlueprintName = "Rswift-tvOS" - ReferencedContainer = "container:R.swift.Library.xcodeproj"> - </BuildableReference> - </MacroExpansion> - <AdditionalOptions> - </AdditionalOptions> </TestAction> <LaunchAction buildConfiguration = "Debug" @@ -70,8 +68,6 @@ ReferencedContainer = "container:R.swift.Library.xcodeproj"> </BuildableReference> </MacroExpansion> - <AdditionalOptions> - </AdditionalOptions> </LaunchAction> <ProfileAction buildConfiguration = "Release" From aea06ee1d120d5ec548b92d818b93c6ff91d53cc Mon Sep 17 00:00:00 2001 From: takka <m@iladdr.es> Date: Wed, 12 Jun 2019 18:10:22 +0900 Subject: [PATCH 34/54] Add support for Swift Package Manager --- Package.swift | 16 ++++++++++++++++ Readme.md | 9 +++++++++ 2 files changed, 25 insertions(+) create mode 100644 Package.swift diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..5061087 --- /dev/null +++ b/Package.swift @@ -0,0 +1,16 @@ +// swift-tools-version:5.0 + +import PackageDescription + +let package = Package( + name: "R.swift.Library", + platforms: [ + .iOS(.v8) + ], + products: [ + .library(name: "Rswift", targets: ["Rswift"]) + ], + targets: [ + .target(name: "Rswift", path: "Library") + ] +) diff --git a/Readme.md b/Readme.md index 45bde32..e79efb8 100644 --- a/Readme.md +++ b/Readme.md @@ -20,6 +20,15 @@ _**Be aware:** If you just want to use R.swift follow the [installation instruct 1. Add `github "mac-cain13/R.swift.Library"` to your [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile) 2. Run `carthage` +### Swift Package Manager (Requires Xcode 11) + +1. Open your Xcode project. +2. Select `File > Swift Packages > Add Package Dependency...` +3. Paste `https://github.com/mac-cain13/R.swift.Library` to the text field and click on the `Next` button. +4. Choose appropriate version and click on the `Next` button. (If you need latest one, just click on the `Next` button.) +5. Confirm that `Rswift` in the Package Product column is checked and your app's name is selected in the Add to Target column. +6. Click on the `Next` button. + ### Manually _As an embedded framework using git submodules._ From 2a7872dd772b00fe2ccd9d052d7a15703cb516ee Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Thu, 4 Jul 2019 12:49:51 +0200 Subject: [PATCH 35/54] Preparing for the 5.1.0.alpha.1 release --- R.swift.Library.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index 10e7e44..a43329d 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 = "5.0.1" + spec.version = "5.1.0.alpha.1" spec.license = "MIT" spec.summary = "Companion library for R.swift, featuring types used to type resources" From 2390c803098b31ce657759b58376a846e4ef44d5 Mon Sep 17 00:00:00 2001 From: Rob Feldmann <me@robfeldmann.com> Date: Sun, 28 Jul 2019 15:49:27 -0400 Subject: [PATCH 36/54] Add Additional Platforms to Package.swift --- Package.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 5061087..cf94adc 100644 --- a/Package.swift +++ b/Package.swift @@ -5,7 +5,9 @@ import PackageDescription let package = Package( name: "R.swift.Library", platforms: [ - .iOS(.v8) + .iOS(.v8), + .tvOS(.v9), + .watchOS(.v2), ], products: [ .library(name: "Rswift", targets: ["Rswift"]) From 631e80fdec4719d997111f754328282a1e25ca97 Mon Sep 17 00:00:00 2001 From: Rob Feldmann <me@robfeldmann.com> Date: Sun, 28 Jul 2019 15:49:51 -0400 Subject: [PATCH 37/54] Add .swiftpm to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8d04a5f..53a07cc 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ fastlane/test_output fastlane/settoken.sh /build Carthage/Build +.swiftpm \ No newline at end of file From 5c3d8de6aaf3a5207634811201fca7f339cca66c Mon Sep 17 00:00:00 2001 From: Tagayasu <ig7dpop0kbz6@gmail.com> Date: Thu, 8 Aug 2019 16:14:31 +0900 Subject: [PATCH 38/54] Add WatchOS xcscheme --- .../xcschemes/Rswift-watchOS.xcscheme | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-watchOS.xcscheme diff --git a/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-watchOS.xcscheme b/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-watchOS.xcscheme new file mode 100644 index 0000000..a5cfc2b --- /dev/null +++ b/R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-watchOS.xcscheme @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Scheme + LastUpgradeVersion = "1030" + version = "1.3"> + <BuildAction + parallelizeBuildables = "YES" + buildImplicitDependencies = "YES"> + <BuildActionEntries> + <BuildActionEntry + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "2F5FBC3F21355A1400A83A69" + BuildableName = "Rswift.framework" + BlueprintName = "Rswift-watchOS" + ReferencedContainer = "container:R.swift.Library.xcodeproj"> + </BuildableReference> + </BuildActionEntry> + </BuildActionEntries> + </BuildAction> + <TestAction + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + shouldUseLaunchSchemeArgsEnv = "YES"> + <Testables> + </Testables> + <AdditionalOptions> + </AdditionalOptions> + </TestAction> + <LaunchAction + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + debugServiceExtension = "internal" + allowLocationSimulation = "YES"> + <MacroExpansion> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "2F5FBC3F21355A1400A83A69" + BuildableName = "Rswift.framework" + BlueprintName = "Rswift-watchOS" + ReferencedContainer = "container:R.swift.Library.xcodeproj"> + </BuildableReference> + </MacroExpansion> + <AdditionalOptions> + </AdditionalOptions> + </LaunchAction> + <ProfileAction + buildConfiguration = "Release" + shouldUseLaunchSchemeArgsEnv = "YES" + savedToolIdentifier = "" + useCustomWorkingDirectory = "NO" + debugDocumentVersioning = "YES"> + <MacroExpansion> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "2F5FBC3F21355A1400A83A69" + BuildableName = "Rswift.framework" + BlueprintName = "Rswift-watchOS" + ReferencedContainer = "container:R.swift.Library.xcodeproj"> + </BuildableReference> + </MacroExpansion> + </ProfileAction> + <AnalyzeAction + buildConfiguration = "Debug"> + </AnalyzeAction> + <ArchiveAction + buildConfiguration = "Release" + revealArchiveInOrganizer = "YES"> + </ArchiveAction> +</Scheme> From 398f0544f2382b8edb522eed079d31722d0f6ae4 Mon Sep 17 00:00:00 2001 From: Tom Lokhorst <tom@lokhorst.eu> Date: Thu, 22 Aug 2019 11:08:43 +0200 Subject: [PATCH 39/54] Add swift_version to podspec --- .swift-version | 1 - R.swift.Library.podspec | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 .swift-version diff --git a/.swift-version b/.swift-version deleted file mode 100644 index 5186d07..0000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -4.0 diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index a43329d..98fcd8e 100644 --- a/R.swift.Library.podspec +++ b/R.swift.Library.podspec @@ -17,6 +17,7 @@ Pod::Spec.new do |spec| spec.requires_arc = true spec.source = { :git => "https://github.com/mac-cain13/R.swift.Library.git", :tag => "v#{spec.version}" } + spec.swift_version = "5.1" spec.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' } From 4a09ece7d0a30edcd95462ce7d252dd4d3a49843 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Tue, 22 Oct 2019 09:51:00 +0200 Subject: [PATCH 40/54] Preparing for the 5.1.0 release --- R.swift.Library.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index 98fcd8e..e899e61 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 = "5.1.0.alpha.1" + spec.version = "5.1.0" spec.license = "MIT" spec.summary = "Companion library for R.swift, featuring types used to type resources" From 0e05a90ef5ede3eef9e929b726c5f5dd73b5eac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Rup=C3=A9rez?= <me@alexruperez.com> Date: Sat, 29 Feb 2020 12:12:02 +0100 Subject: [PATCH 41/54] Alternative for SPM dynamic linking We need [dynamic linking](https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescription.md#methods-2) for this dependence. --- Package.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index cf94adc..eb962a0 100644 --- a/Package.swift +++ b/Package.swift @@ -10,7 +10,8 @@ let package = Package( .watchOS(.v2), ], products: [ - .library(name: "Rswift", targets: ["Rswift"]) + .library(name: "Rswift", targets: ["Rswift"]), + .library(name: "RswiftDynamic", type: .dynamic, targets: ["Rswift"]) ], targets: [ .target(name: "Rswift", path: "Library") From 5a54805e3d08077e46edb2274ff27b20b700f568 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Wed, 22 Apr 2020 23:47:28 +0200 Subject: [PATCH 42/54] Preparing for the 5.2.0 release --- R.swift.Library.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index e899e61..502715c 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 = "5.1.0" + spec.version = "5.2.0" spec.license = "MIT" spec.summary = "Companion library for R.swift, featuring types used to type resources" From 68bdb3b5c6d156b941baa310a9b5f068353af7f7 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Sun, 26 Apr 2020 20:23:36 +0200 Subject: [PATCH 43/54] Create checks.yml --- .github/workflows/checks.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/checks.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 0000000..aacf37f --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,15 @@ +name: Checks + +on: + push: + branches: [ master ] + pull_request: + branches: '*' + +jobs: + build: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - name: Build + run: swift build -v From 426e902989e1eb51a0a8ab021f05c84a805be71f Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Sun, 26 Apr 2020 20:36:39 +0200 Subject: [PATCH 44/54] Build all 3 schemes --- .github/workflows/checks.yml | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index aacf37f..c429dfa 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,4 +1,4 @@ -name: Checks +name: Build on: push: @@ -6,10 +6,28 @@ on: pull_request: branches: '*' +env: + DEVELOPER_DIR: /Applications/Xcode_11.4.app/Contents/Developer + jobs: - build: + iOS: + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Build + run: xcodebuild -scheme "Rswift-iOS" + tvOS: + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Build + run: xcodebuild -scheme "Rswift-tvOS" + watchOS: runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 - name: Build - run: swift build -v + run: xcodebuild -scheme "Rswift-watchOS" \ No newline at end of file From ae47cf3a6fc03b44e178c5e2409d39ff473a6399 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Sun, 26 Apr 2020 20:48:27 +0200 Subject: [PATCH 45/54] Add Github Action for releases --- .github/workflows/release.yml | 18 +++ R.swift.Library.podspec | 2 +- fastlane/Fastfile | 98 ------------ fastlane/actions/af_create_github_release.rb | 157 ------------------- fastlane/actions/version_get_podspec.rb | 107 ------------- 5 files changed, 19 insertions(+), 363 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 100644 fastlane/Fastfile delete mode 100644 fastlane/actions/af_create_github_release.rb delete mode 100644 fastlane/actions/version_get_podspec.rb diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5e99626 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +name: Release + +on: + release: + types: created + +env: + DEVELOPER_DIR: /Applications/Xcode_11.4.app/Contents/Developer + +jobs: + publish: + - name: Publish to Cocoapods + run: | + export POD_VERSION=$(echo $TAG_NAME | cut -c2-) + pod trunk push + env: + TAG_NAME: ${{ github.event.release.tag_name }} + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index 502715c..04fee50 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 = "5.2.0" + spec.version = ENV['POD_VERSION'] spec.license = "MIT" spec.summary = "Companion library for R.swift, featuring types used to type resources" diff --git a/fastlane/Fastfile b/fastlane/Fastfile deleted file mode 100644 index 5c2bb3b..0000000 --- a/fastlane/Fastfile +++ /dev/null @@ -1,98 +0,0 @@ -fastlane_version "1.86.0" - -lane :release do |options| - if options[:skip_branch_check] != true - ensure_git_branch(branch: "master") - end - - if options[:allow_dirty_branch] != true - ensure_git_status_clean - else - UI.message "Skipping the 'git status clean' check!".yellow - end - - git_pull - - runalltests - - unless is_ci - notification( - title: "R.swift.Library release", - message: "💡 Needs your attention." - ) - end - - currentVersion = version_get_podspec() - UI.message "Current R.swift.Library podspec version is #{currentVersion}" - - bumpType = prompt(text: "What kind of release is this? (major/minor/patch/custom)".green, boolean: false, ci_input: "") - isPrerelease = false - case bumpType - when "major", "minor", "patch" - version_bump_podspec(bump_type: bumpType) - when "custom" - newVersion = prompt(text: "What is the new custom version number?".green, boolean: false, ci_input: "") - version_bump_podspec(version_number: newVersion) - - isPrerelease = prompt(text: "Is this a prerelease version?".green, boolean: true, ci_input: "") - else - raise "Invalid release type: #{bumpType}".red - end - - changelog = prompt(text: "Please provide release notes:".green, boolean: false, ci_input: "", multi_line_end_keyword: "FIN") - - newVersion = version_get_podspec() - unless prompt(text: "#{newVersion} has been prepped for release. If you have any additional changes you would like to make, please do those before continuing. Would you like to commit, tag, push and release #{newVersion} including all uncommitted changes?".green, boolean: true, ci_input:"y") - raise "Aborted by user".red - end - - git_commit( - path: ".", - message: "Preparing for the #{newVersion} release" - ) - - push_to_git_remote - - af_create_github_release( - owner: "mac-cain13", - repository: "r.swift.library", - tag_name: "v#{newVersion}", - target_commitish: "master", - name: "#{newVersion}", - body: "#{changelog}", - prerelease: isPrerelease - ) - - pod_push - - unless is_ci - notification( - title: "R.swift.Library release", - message: "🎉 Version #{newVersion} is released." - ) - end -end - -lane :runalltests do - scan( - project: "R.swift.Library.xcodeproj", - scheme: "Rswift-iOS", - device: "iPhone 8", - clean: true - ) - scan( - project: "R.swift.Library.xcodeproj", - scheme: "Rswift-tvOS", - device: "Apple TV 4K", - clean: true - ) -end - -error do |lane, exception| - unless is_ci - notification( - title: "R.swift.Library #{lane}", - message: "❌ Failed with an exception." - ) - end -end diff --git a/fastlane/actions/af_create_github_release.rb b/fastlane/actions/af_create_github_release.rb deleted file mode 100644 index 55a6b5f..0000000 --- a/fastlane/actions/af_create_github_release.rb +++ /dev/null @@ -1,157 +0,0 @@ -# From: https://github.com/AFNetworking/fastlane/blob/master/fastlane/actions/af_create_github_release.rb -module Fastlane - module Actions - module SharedValues - GITHUB_RELEASE_ID = :GITHUB_RELEASE_ID - GITHUB_RELEASE_HTML_URL = :GITHUB_RELEASE_HTML_URL - GITHUB_RELEASE_UPLOAD_URL_TEMPLATE = :GITHUB_RELEASE_UPLOAD_URL_TEMPLATE - end - - # To share this integration with the other fastlane users: - # - Fork https://github.com/KrauseFx/fastlane - # - Clone the forked repository - # - Move this integration into lib/fastlane/actions - # - Commit, push and submit the pull request - - class AfCreateGithubReleaseAction < Action - def self.run(params) - require 'net/http' - require 'net/https' - require 'json' - require 'base64' - - begin - uri = URI("https://api.github.com/repos/#{params[:owner]}/#{params[:repository]}/releases") - - # Create client - http = Net::HTTP.new(uri.host, uri.port) - http.use_ssl = true - http.verify_mode = OpenSSL::SSL::VERIFY_PEER - - dict = Hash.new - dict["draft"] = params[:draft] - dict["prerelease"] = params[:prerelease] - dict["body"] = params[:body] if params[:body] - dict["tag_name"] = params[:tag_name] if params[:tag_name] - dict["name"] = params[:name] if params[:name] - body = JSON.dump(dict) - - # Create Request - req = Net::HTTP::Post.new(uri) - # Add headers - req.add_field "Content-Type", "application/json" - # Add headers - api_token = params[:api_token] - req.add_field "Authorization", "Basic #{Base64.strict_encode64(api_token)}" - # Add headers - req.add_field "Accept", "application/vnd.github.v3+json" - # Set header and body - req.add_field "Content-Type", "application/json" - req.body = body - - # Fetch Request - res = http.request(req) - rescue StandardError => e - UI.message "HTTP Request failed (#{e.message})".red - end - - case res.code.to_i - when 201 - json = JSON.parse(res.body) - UI.message "Github Release Created (#{json["id"]})".green - UI.message "#{json["html_url"]}".green - - Actions.lane_context[SharedValues::GITHUB_RELEASE_ID] = json["id"] - Actions.lane_context[SharedValues::GITHUB_RELEASE_HTML_URL] = json["html_url"] - Actions.lane_context[SharedValues::GITHUB_RELEASE_UPLOAD_URL_TEMPLATE] = json["upload_url"] - return json - when 400..499 - json = JSON.parse(res.body) - raise "Error Creating Github Release (#{res.code}): #{json}".red - else - UI.message "Status Code: #{res.code} Body: #{res.body}" - raise "Error Creating Github Release".red - end - end - - ##################################################### - # @!group Documentation - ##################################################### - - def self.description - "Create a Github Release" - end - - def self.available_options - [ - FastlaneCore::ConfigItem.new(key: :owner, - env_name: "GITHUB_OWNER", - description: "The Github Owner", - is_string:true, - optional:false), - FastlaneCore::ConfigItem.new(key: :repository, - env_name: "GITHUB_REPOSITORY", - description: "The Github Repository", - is_string:true, - optional:false), - FastlaneCore::ConfigItem.new(key: :api_token, - env_name: "GITHUB_API_TOKEN", - description: "Personal API Token for GitHub - generate one at https://github.com/settings/tokens", - is_string: true, - optional: false), - FastlaneCore::ConfigItem.new(key: :tag_name, - env_name: "GITHUB_RELEASE_TAG_NAME", - description: "Pass in the tag name", - is_string: true, - optional: false), - FastlaneCore::ConfigItem.new(key: :target_commitish, - env_name: "GITHUB_TARGET_COMMITISH", - description: "Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists", - is_string: true, - optional: true), - FastlaneCore::ConfigItem.new(key: :name, - env_name: "GITHUB_RELEASE_NAME", - description: "The name of the release", - is_string: true, - optional: true), - FastlaneCore::ConfigItem.new(key: :body, - env_name: "GITHUB_RELEASE_BODY", - description: "Text describing the contents of the tag", - is_string: true, - optional: true), - FastlaneCore::ConfigItem.new(key: :draft, - env_name: "GITHUB_RELEASE_DRAFT", - description: "true to create a draft (unpublished) release, false to create a published one", - is_string: false, - default_value: false), - FastlaneCore::ConfigItem.new(key: :prerelease, - env_name: "GITHUB_RELEASE_PRERELEASE", - description: "true to identify the release as a prerelease. false to identify the release as a full release", - is_string: false, - default_value: false), - - ] - end - - def self.output - [ - ['GITHUB_RELEASE_ID', 'The Github Release ID'], - ['GITHUB_RELEASE_HTML_URL', 'The Github Release URL'], - ['GITHUB_RELEASE_UPLOAD_URL_TEMPLATE', 'The Github Release Upload URL'] - ] - end - - def self.return_value - "The Hash representing the API response" - end - - def self.authors - ["kcharwood"] - end - - def self.is_supported?(platform) - return true - end - end - end -end \ No newline at end of file diff --git a/fastlane/actions/version_get_podspec.rb b/fastlane/actions/version_get_podspec.rb deleted file mode 100644 index b2d82f1..0000000 --- a/fastlane/actions/version_get_podspec.rb +++ /dev/null @@ -1,107 +0,0 @@ -module Fastlane - module Actions - class VersionGetPodspecAction < Action - def self.run(params) - podspec_path = params[:path] - - UI.user_error!("Could not find podspec file at path '#{podspec_path}'") unless File.exist? podspec_path - - version_podspec_file = PodspecHelper.new(podspec_path) - - Actions.lane_context[SharedValues::PODSPEC_VERSION_NUMBER] = version_podspec_file.version_value - end - - ##################################################### - # @!group Documentation - ##################################################### - - def self.description - "Receive the version number from a podspec file" - end - - def self.available_options - [ - FastlaneCore::ConfigItem.new(key: :path, - env_name: "FL_VERSION_PODSPEC_PATH", - description: "You must specify the path to the podspec file", - is_string: true, - default_value: Dir["*.podspec"].last, - verify_block: proc do |value| - UI.user_error!("Please pass a path to the `version_get_podspec` action") if value.length == 0 - end) - ] - end - - def self.output - [ - ['PODSPEC_VERSION_NUMBER', 'The podspec version number'] - ] - end - - def self.authors - ["Liquidsoul", "KrauseFx"] - end - - def self.is_supported?(platform) - true - end - end - - class PodspecHelper - attr_accessor :path - attr_accessor :podspec_content - attr_accessor :version_regex - attr_accessor :version_match - attr_accessor :version_value - - def initialize(path = nil) - version_var_name = 'version' - @version_regex = /^(?<begin>[^#]*#{version_var_name}\s*=\s*['"])(?<value>(?<major>[0-9]+)(\.(?<minor>[0-9]+))?(\.(?<patch>[0-9]+))?(\.(?<type>[a-z]+))?(\.(?<buildnumber>[0-9]+))?)(?<end>['"])/i - - return unless (path || '').length > 0 - UI.user_error!("Could not find podspec file at path '#{path}'") unless File.exist?(path) - - @path = File.expand_path(path) - podspec_content = File.read(path) - - parse(podspec_content) - end - - def parse(podspec_content) - @podspec_content = podspec_content - @version_match = @version_regex.match(@podspec_content) - UI.user_error!("AAAAAH!!! Could not find version in podspec content '#{@podspec_content}'") if @version_match.nil? - @version_value = @version_match[:value] - end - - def bump_version(bump_type) - major = version_match[:major].to_i - minor = version_match[:minor].to_i || 0 - patch = version_match[:patch].to_i || 0 - - case bump_type - when 'patch' - patch += 1 - when 'minor' - minor += 1 - patch = 0 - when 'major' - major += 1 - minor = 0 - patch = 0 - end - - @version_value = "#{major}.#{minor}.#{patch}" - end - - def update_podspec(version = nil) - new_version = version || @version_value - updated_podspec_content = @podspec_content.gsub(@version_regex, "#{@version_match[:begin]}#{new_version}#{@version_match[:end]}") - - File.open(@path, "w") { |file| file.puts updated_podspec_content } unless Helper.test? - - updated_podspec_content - end - end - end -end From 6d6d67dd7230bfff810ebf8f1a4b0670e8532e3e Mon Sep 17 00:00:00 2001 From: Filip Bajanik <filip.bajanik@gmail.com> Date: Fri, 30 Oct 2020 15:30:38 +0100 Subject: [PATCH 46/54] Add support for SPM with WatchOS platform --- Library/UIKit/NibResource+UIKit.swift | 2 ++ .../UIKit/StoryboardResourceWithInitialController+UIKit.swift | 2 ++ Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift | 2 ++ Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift | 2 ++ Library/UIKit/UINib+NibResource.swift | 2 ++ Library/UIKit/UIStoryboard+StoryboardResource.swift | 2 ++ .../UIKit/UIStoryboard+StoryboardViewControllerResource.swift | 2 ++ Library/UIKit/UITableView+ReuseIdentifierProtocol.swift | 2 ++ Library/UIKit/UIViewController+NibResource.swift | 2 ++ .../UIViewController+StoryboardSegueIdentifierProtocol.swift | 2 ++ 10 files changed, 20 insertions(+) diff --git a/Library/UIKit/NibResource+UIKit.swift b/Library/UIKit/NibResource+UIKit.swift index 4339d3f..2875cc5 100644 --- a/Library/UIKit/NibResource+UIKit.swift +++ b/Library/UIKit/NibResource+UIKit.swift @@ -7,6 +7,7 @@ // License: MIT License // +#if !os(watchOS) import Foundation import UIKit @@ -23,3 +24,4 @@ public extension NibResourceType { return UINib(resource: self).instantiate(withOwner: ownerOrNil, options: optionsOrNil) } } +#endif diff --git a/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift b/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift index b5b114c..4ba1902 100644 --- a/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift +++ b/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift @@ -7,6 +7,7 @@ // License: MIT License // +#if !os(watchOS) import Foundation import UIKit @@ -20,3 +21,4 @@ public extension StoryboardResourceWithInitialControllerType { return UIStoryboard(resource: self).instantiateInitialViewController() as? InitialController } } +#endif diff --git a/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift b/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift index 5edd9be..894c8c2 100644 --- a/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift +++ b/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift @@ -7,6 +7,7 @@ // License: MIT License // +#if !os(watchOS) import Foundation import UIKit @@ -33,3 +34,4 @@ extension TypedStoryboardSegueInfo { self.destination = destination } } +#endif diff --git a/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift b/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift index bf68fa1..ebac685 100644 --- a/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift +++ b/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift @@ -7,6 +7,7 @@ // License: MIT License // +#if !os(watchOS) import Foundation import UIKit @@ -62,3 +63,4 @@ public extension UICollectionView { register(UINib(resource: nibResource), forSupplementaryViewOfKind: kind, withReuseIdentifier: nibResource.identifier) } } +#endif diff --git a/Library/UIKit/UINib+NibResource.swift b/Library/UIKit/UINib+NibResource.swift index 73bb048..8aaa0fd 100644 --- a/Library/UIKit/UINib+NibResource.swift +++ b/Library/UIKit/UINib+NibResource.swift @@ -7,6 +7,7 @@ // License: MIT License // +#if !os(watchOS) import UIKit public extension UINib { @@ -21,3 +22,4 @@ public extension UINib { self.init(nibName: resource.name, bundle: resource.bundle) } } +#endif diff --git a/Library/UIKit/UIStoryboard+StoryboardResource.swift b/Library/UIKit/UIStoryboard+StoryboardResource.swift index 8848be0..1ed8015 100644 --- a/Library/UIKit/UIStoryboard+StoryboardResource.swift +++ b/Library/UIKit/UIStoryboard+StoryboardResource.swift @@ -7,6 +7,7 @@ // License: MIT License // +#if !os(watchOS) import UIKit public extension UIStoryboard { @@ -21,3 +22,4 @@ public extension UIStoryboard { self.init(name: resource.name, bundle: resource.bundle) } } +#endif diff --git a/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift b/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift index 59adab3..75c61f0 100644 --- a/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift +++ b/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift @@ -7,6 +7,7 @@ // License: MIT License // +#if !os(watchOS) import Foundation import UIKit @@ -22,3 +23,4 @@ public extension UIStoryboard { return self.instantiateViewController(withIdentifier: resource.identifier) as? ViewControllerResource.ViewControllerType } } +#endif diff --git a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift index 10d4b4f..aa6589e 100644 --- a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift +++ b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift @@ -7,6 +7,7 @@ // License: MIT License // +#if !os(watchOS) import Foundation import UIKit @@ -65,3 +66,4 @@ public extension UITableView { register(UINib(resource: nibResource), forHeaderFooterViewReuseIdentifier: nibResource.identifier) } } +#endif diff --git a/Library/UIKit/UIViewController+NibResource.swift b/Library/UIKit/UIViewController+NibResource.swift index dbef8ce..717bd09 100644 --- a/Library/UIKit/UIViewController+NibResource.swift +++ b/Library/UIKit/UIViewController+NibResource.swift @@ -7,6 +7,7 @@ // License: MIT License // +#if !os(watchOS) import Foundation import UIKit @@ -22,3 +23,4 @@ public extension UIViewController { self.init(nibName: nib.name, bundle: nib.bundle) } } +#endif diff --git a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift index 27364a4..e7aff99 100644 --- a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift +++ b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift @@ -7,6 +7,7 @@ // License: MIT License // +#if !os(watchOS) import Foundation import UIKit @@ -37,3 +38,4 @@ public extension StoryboardSegue where Source : UIViewController { source.performSegue(withIdentifier: identifier.identifier, sender: sender) } } +#endif From 9c5bfffdd25017a46db73fa9130a7f8cdd19355b Mon Sep 17 00:00:00 2001 From: Tom Lokhorst <tom@lokhorst.eu> Date: Sun, 8 Nov 2020 13:52:24 +0100 Subject: [PATCH 47/54] Update to iOS 9 mimimum deployment target --- R.swift.Library.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index 04fee50..deb7a79 100644 --- a/R.swift.Library.podspec +++ b/R.swift.Library.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |spec| spec.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' } - spec.ios.deployment_target = '8.0' + spec.ios.deployment_target = '9.0' spec.ios.source_files = "Library/**/*.swift" spec.tvos.deployment_target = '9.0' spec.tvos.source_files = "Library/**/*.swift" From f035187047cd6d80394b55ede2d6ff7e24509e07 Mon Sep 17 00:00:00 2001 From: Tom Lokhorst <tom@lokhorst.eu> Date: Sun, 8 Nov 2020 13:58:37 +0100 Subject: [PATCH 48/54] Update Package.swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index eb962a0..a7e2267 100644 --- a/Package.swift +++ b/Package.swift @@ -5,7 +5,7 @@ import PackageDescription let package = Package( name: "R.swift.Library", platforms: [ - .iOS(.v8), + .iOS(.v9), .tvOS(.v9), .watchOS(.v2), ], From 033c150e8a0fd209f0801b7e3753c89a5ac2bbf9 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Sun, 8 Nov 2020 14:02:32 +0100 Subject: [PATCH 49/54] Fix syntax error in release action --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e99626..499eab0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,8 @@ env: jobs: publish: + runs-on: macos-latest + steps: - name: Publish to Cocoapods run: | export POD_VERSION=$(echo $TAG_NAME | cut -c2-) From 5025163d8f60d3c56124c309db0246ba421aa8c6 Mon Sep 17 00:00:00 2001 From: Mathijs Kadijk <mkadijk@gmail.com> Date: Sun, 8 Nov 2020 14:11:56 +0100 Subject: [PATCH 50/54] Add checkout step to release --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 499eab0..76a27a3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,8 @@ jobs: publish: runs-on: macos-latest steps: + - name: Checkout + uses: actions/checkout@v2 - name: Publish to Cocoapods run: | export POD_VERSION=$(echo $TAG_NAME | cut -c2-) From 3a64127e8113cc33179504dfadc91b361d55a0b1 Mon Sep 17 00:00:00 2001 From: Tom Lokhorst <tom@lokhorst.eu> Date: Fri, 5 Mar 2021 12:30:22 +0100 Subject: [PATCH 51/54] Update developer dir --- .github/workflows/checks.yml | 4 ++-- .github/workflows/release.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index c429dfa..5eec115 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -7,7 +7,7 @@ on: branches: '*' env: - DEVELOPER_DIR: /Applications/Xcode_11.4.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer jobs: iOS: @@ -30,4 +30,4 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Build - run: xcodebuild -scheme "Rswift-watchOS" \ No newline at end of file + run: xcodebuild -scheme "Rswift-watchOS" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 76a27a3..ebf96c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ on: types: created env: - DEVELOPER_DIR: /Applications/Xcode_11.4.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer jobs: publish: From 0e49aa2fac18601585cf16fb24c018362ac59b5c Mon Sep 17 00:00:00 2001 From: Tom Lokhorst <tom@lokhorst.eu> Date: Fri, 28 Oct 2022 18:01:15 +0200 Subject: [PATCH 52/54] Update minimum deployment target --- R.swift.Library.podspec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index deb7a79..1059a9d 100644 --- a/R.swift.Library.podspec +++ b/R.swift.Library.podspec @@ -17,15 +17,15 @@ Pod::Spec.new do |spec| spec.requires_arc = true spec.source = { :git => "https://github.com/mac-cain13/R.swift.Library.git", :tag => "v#{spec.version}" } - spec.swift_version = "5.1" + spec.swift_version = "5.7" spec.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' } - spec.ios.deployment_target = '9.0' + spec.ios.deployment_target = '11.0' spec.ios.source_files = "Library/**/*.swift" - spec.tvos.deployment_target = '9.0' + spec.tvos.deployment_target = '11.0' spec.tvos.source_files = "Library/**/*.swift" - spec.watchos.deployment_target = '2.2' + spec.watchos.deployment_target = '4.0' spec.watchos.source_files = ["Library/Core/*.swift", "Library/Foundation/*.swift"] spec.module_name = "Rswift" From 4d9815250b2da7ded94ba3936a83d88f5ddfdb0e Mon Sep 17 00:00:00 2001 From: Tom Lokhorst <tom@lokhorst.eu> Date: Fri, 28 Oct 2022 18:02:13 +0200 Subject: [PATCH 53/54] Keep swift version --- R.swift.Library.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R.swift.Library.podspec b/R.swift.Library.podspec index 1059a9d..9c9a766 100644 --- a/R.swift.Library.podspec +++ b/R.swift.Library.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |spec| spec.requires_arc = true spec.source = { :git => "https://github.com/mac-cain13/R.swift.Library.git", :tag => "v#{spec.version}" } - spec.swift_version = "5.7" + spec.swift_version = "5.1" spec.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' } From bb1ec7e294f7ef6ac0ba072371ae8af5b4342545 Mon Sep 17 00:00:00 2001 From: Tom Lokhorst <tom@lokhorst.eu> Date: Tue, 29 Nov 2022 00:20:16 +0100 Subject: [PATCH 54/54] Update Readme.md --- Readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index e79efb8..4180ed7 100644 --- a/Readme.md +++ b/Readme.md @@ -1,6 +1,8 @@ # R.swift.Library [](https://cocoapods.org/pods/R.swift) [](https://github.com/Carthage/Carthage) [](blob/master/License)  -_Library containing types supporting code generated by [R.swift](https://github.com/mac-cain13/R.swift)_ +⚠ As of version 7 of [R.swift](https://github.com/mac-cain13/R.swift), this separate library is no longer needed. R.swift is now a self contained library. + +This repository remains for older versions of R.swift. ## Why use this?