From a642bd3a702386b7d4087b69967f4f8f975d5164 Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Mon, 25 Jan 2016 18:36:08 +0100
Subject: [PATCH 001/112] Add StoryboardSegue

---
 .../StoryboardSegueIdentifierProtocol.swift   | 26 +++++++++++++++++++
 ...er+StoryboardSegueIdentifierProtocol.swift |  9 ++++++-
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/Library/Core/StoryboardSegueIdentifierProtocol.swift b/Library/Core/StoryboardSegueIdentifierProtocol.swift
index 6ee3322..df48c6e 100644
--- a/Library/Core/StoryboardSegueIdentifierProtocol.swift
+++ b/Library/Core/StoryboardSegueIdentifierProtocol.swift
@@ -42,6 +42,13 @@ public struct StoryboardSegueIdentifier<Segue, Source, Destination>: StoryboardS
   public init(identifier: String) {
     self.identifier = identifier
   }
+
+  /// Create a new StoryboardSegue based on the identifier and source view controller
+  public func storyboardSegueWithSource(sourceViewController: Source)
+    -> StoryboardSegue<Segue, Source, Destination>
+  {
+    return StoryboardSegue(identifier: self, sourceViewController: sourceViewController)
+  }
 }
 
 /// Typed segue information
@@ -67,3 +74,22 @@ public struct TypedStoryboardSegueInfo<Segue, Source, Destination>: StoryboardSe
   /// Segue source view controller
   public let sourceViewController: Source
 }
+
+/// Segue with identifier and source view controller
+public struct StoryboardSegue<Segue, Source, Destination> {
+  /// Identifier of this segue
+  public let identifier: StoryboardSegueIdentifier<Segue, Source, Destination>
+
+  /// Segue source view controller
+  public let sourceViewController: Source
+
+  /**
+   Create a new segue based on the identifier and source view controller
+
+   - returns: A new StoryboardSegue
+   */
+  public init(identifier: StoryboardSegueIdentifier<Segue, Source, Destination>, sourceViewController: Source) {
+    self.identifier = identifier
+    self.sourceViewController = sourceViewController
+  }
+}
diff --git a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
index fbbb6a4..b00c9c3 100644
--- a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
+++ b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
@@ -16,9 +16,16 @@ public extension UIViewController {
    - parameter identifier: The R.segue.* that identifies the triggered segue.
    - parameter segue: 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: https://github.com/tomlokhorst/SegueManager
+   - SeeAlso: Library for typed block based segues: [tomlokhorst/SegueManager](https://github.com/tomlokhorst/SegueManager)
   */
   public func performSegueWithIdentifier<Identifier: StoryboardSegueIdentifierType>(identifier: Identifier, sender: AnyObject?) {
     performSegueWithIdentifier(identifier.identifier, sender: sender)
   }
 }
+
+public extension StoryboardSegue where Source : UIViewController {
+  /// Performs the specified segue
+  public func performSegue(sender: AnyObject? = nil) {
+    sourceViewController.performSegueWithIdentifier(identifier.identifier, sender: sender)
+  }
+}

From d4c4bdaf5c84f6c77a8d4c0ad78c5b841254ddf9 Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Mon, 25 Jan 2016 23:52:03 +0100
Subject: [PATCH 002/112] Restrict performSegueWithIdentifier extension method
 to source view controller type

---
 ...er+StoryboardSegueIdentifierProtocol.swift | 20 ++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
index b00c9c3..ca72f87 100644
--- a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
+++ b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
@@ -9,16 +9,22 @@
 import Foundation
 import UIKit
 
-public extension UIViewController {
+public protocol UIViewControllerType {
+  func performSegueWithIdentifier(identifier: String, sender: AnyObject?)
+}
+
+extension UIViewController: UIViewControllerType { }
+
+public extension UIViewControllerType {
   /**
-   Initiates the segue with the specified identifier (R.segue.*) from the current view controller'€™s storyboard file.
-   
+   Initiates the segue with the specified identifier (R.segue.*) from the current view controller's storyboard file.
    - parameter identifier: The R.segue.* that identifies the triggered segue.
-   - parameter segue: The object that you want to use to initiate the segue. This object is made available for informational purposes during the actual segue.
-   
+   - 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 performSegueWithIdentifier<Identifier: StoryboardSegueIdentifierType>(identifier: Identifier, sender: AnyObject?) {
+   */
+  public func performSegueWithIdentifier<Segue, Destination>(
+    identifier: StoryboardSegueIdentifier<Segue, Self, Destination>,
+    sender: AnyObject?) {
     performSegueWithIdentifier(identifier.identifier, sender: sender)
   }
 }

From a01810ae580dc7ad0427447e80e537ff958037f9 Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Sat, 6 Feb 2016 13:58:08 +0100
Subject: [PATCH 003/112] Rename UIViewControllerType to SeguePerformerType

---
 ...Controller+StoryboardSegueIdentifierProtocol.swift | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
index ca72f87..f17f9b3 100644
--- a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
+++ b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
@@ -9,13 +9,13 @@
 import Foundation
 import UIKit
 
-public protocol UIViewControllerType {
+public protocol SeguePerformerType {
   func performSegueWithIdentifier(identifier: String, sender: AnyObject?)
 }
 
-extension UIViewController: UIViewControllerType { }
+extension UIViewController: SeguePerformerType { }
 
-public extension UIViewControllerType {
+public extension SeguePerformerType {
   /**
    Initiates the segue with the specified identifier (R.segue.*) from the current view controller's storyboard file.
    - parameter identifier: The R.segue.* that identifies the triggered segue.
@@ -30,7 +30,10 @@ public extension UIViewControllerType {
 }
 
 public extension StoryboardSegue where Source : UIViewController {
-  /// Performs the specified segue
+  /**
+   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: AnyObject? = nil) {
     sourceViewController.performSegueWithIdentifier(identifier.identifier, sender: sender)
   }

From d9d11489f22470c5c8d69cc54dcea9ad4c741d11 Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Sun, 7 Feb 2016 14:27:16 +0100
Subject: [PATCH 004/112] Make URL-/pathForResource lookup global and local

Docs state that explicit `nil` for localization will not look up resources in the localization folders. That is not what we want, so remove them here and use the overload that looks in all places. :)
---
 Library/Foundation/NSBundle+FileResource.swift | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Library/Foundation/NSBundle+FileResource.swift b/Library/Foundation/NSBundle+FileResource.swift
index d5a8598..64d9090 100644
--- a/Library/Foundation/NSBundle+FileResource.swift
+++ b/Library/Foundation/NSBundle+FileResource.swift
@@ -17,7 +17,7 @@ public extension NSBundle {
    - returns: The file URL for the resource file (R.file.*) or nil if the file could not be located.
    */
   public func URLForResource(resource: FileResourceType) -> NSURL? {
-    return URLForResource(resource.name, withExtension: resource.pathExtension, subdirectory: nil, localization: nil)
+    return URLForResource(resource.name, withExtension: resource.pathExtension)
   }
 
   /**
@@ -28,6 +28,6 @@ public extension NSBundle {
    - returns: The full pathname for the resource file (R.file.*) or nil if the file could not be located.
    */
   public func pathForResource(resource: FileResourceType) -> String? {
-    return pathForResource(resource.name, ofType: resource.pathExtension, inDirectory: nil, forLocalization: nil)
+    return pathForResource(resource.name, ofType: resource.pathExtension)
   }
 }

From 825c0df501e0dc3f7a2b995791d264207ae3a1ef Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Sun, 7 Feb 2016 14:28:44 +0100
Subject: [PATCH 005/112] Introduce R.file.someJson.url() and .path()

These convienence methods feel right and I think they should help when we look into R.swift issue #150.
---
 Library/Core/FileResource.swift | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Library/Core/FileResource.swift b/Library/Core/FileResource.swift
index 03ccf7e..c990b1c 100644
--- a/Library/Core/FileResource.swift
+++ b/Library/Core/FileResource.swift
@@ -20,6 +20,26 @@ public protocol FileResourceType {
   var pathExtension: String { get }
 }
 
+public extension FileResourceType {
+  /**
+   Returns the full pathname for this resource.
+
+   - returns: The full pathname for this resource or nil if the file could not be located.
+   */
+  func path() -> String? {
+    return bundle?.pathForResource(self)
+  }
+
+  /**
+   Returns the file URL for this resource.
+
+   - returns: The file URL for this resource or nil if the file could not be located.
+   */
+  func url() -> NSURL? {
+    return bundle?.urlForResource(self)
+  }
+}
+
 public struct FileResource: FileResourceType {
   /// Bundle this file is in or nil for main bundle
   public let bundle: NSBundle?

From 3f2975a3abf7af146649f1f0e7c1dfed7e729a71 Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Mon, 8 Feb 2016 21:17:43 +0100
Subject: [PATCH 006/112] Fix compile error by fixing capitalization

---
 Library/Core/FileResource.swift | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Library/Core/FileResource.swift b/Library/Core/FileResource.swift
index c990b1c..4e50b4e 100644
--- a/Library/Core/FileResource.swift
+++ b/Library/Core/FileResource.swift
@@ -36,7 +36,7 @@ public extension FileResourceType {
    - returns: The file URL for this resource or nil if the file could not be located.
    */
   func url() -> NSURL? {
-    return bundle?.urlForResource(self)
+    return bundle?.URLForResource(self)
   }
 }
 

From 3b24c5a091bdb052133efa51673cd128e122d6ea Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Tue, 9 Feb 2016 07:55:04 +0100
Subject: [PATCH 007/112] Bump podspec

---
 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 f042fb0..42306ef 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      = "1.0.1"
+  spec.version      = "1.1.0"
   spec.license      = "MIT"
 
   spec.summary      = "Companion library for R.swift, featuring types used to type resources"

From 7d45067a420e50d450b109ea9478fa96278bbd2e Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Fri, 11 Mar 2016 09:22:48 +0100
Subject: [PATCH 008/112] Add NSData.init(resource:) for initializing NSData
 with R.file.* resources

---
 Library/Foundation/NSData+FileResource.swift | 29 ++++++++++++++++++++
 R.swift.Library.xcodeproj/project.pbxproj    |  4 +++
 2 files changed, 33 insertions(+)
 create mode 100644 Library/Foundation/NSData+FileResource.swift

diff --git a/Library/Foundation/NSData+FileResource.swift b/Library/Foundation/NSData+FileResource.swift
new file mode 100644
index 0000000..2ab55c8
--- /dev/null
+++ b/Library/Foundation/NSData+FileResource.swift
@@ -0,0 +1,29 @@
+//
+//  NSData+FileResource.swift
+//  R.swift.Library
+//
+//  Created by Tom Lokhorst on 2016-03-11.
+//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//
+
+import Foundation
+
+public extension NSData {
+
+  /**
+   Creates and returns NSData with the contents of the specified file resource (R.file.*).
+
+   - parameter resource: The file resource (R.file.*)
+
+   - returns: A NSData object with the contents of the specified file.
+   */
+  public convenience init?(resource: FileResourceType) {
+    let bundle = resource.bundle ?? NSBundle.mainBundle()
+
+    guard let url = bundle.URLForResource(resource.name, withExtension: resource.pathExtension) else {
+      return nil
+    }
+
+    self.init(contentsOfURL: url)
+  }
+}
diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj
index 2d642b1..8865fea 100644
--- a/R.swift.Library.xcodeproj/project.pbxproj
+++ b/R.swift.Library.xcodeproj/project.pbxproj
@@ -55,6 +55,7 @@
 		D592465E1C117A55007F94C7 /* RswiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D592465D1C117A55007F94C7 /* RswiftTests.swift */; };
 		D5E435A91C3CFB460091090C /* NibResource+UIKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E435A81C3CFB460091090C /* NibResource+UIKit.swift */; };
 		D5E435AD1C3D00770091090C /* FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E435AC1C3D00770091090C /* FileResource.swift */; };
+		E20F34A71C92B44100338F81 /* NSData+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20F34A61C92B44100338F81 /* NSData+FileResource.swift */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -104,6 +105,7 @@
 		D592465F1C117A55007F94C7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		D5E435A81C3CFB460091090C /* NibResource+UIKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NibResource+UIKit.swift"; sourceTree = "<group>"; };
 		D5E435AC1C3D00770091090C /* FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileResource.swift; sourceTree = "<group>"; };
+		E20F34A61C92B44100338F81 /* NSData+FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSData+FileResource.swift"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -178,6 +180,7 @@
 			isa = PBXGroup;
 			children = (
 				D56DC7721C42B65C00623437 /* NSBundle+FileResource.swift */,
+				E20F34A61C92B44100338F81 /* NSData+FileResource.swift */,
 			);
 			path = Foundation;
 			sourceTree = "<group>";
@@ -443,6 +446,7 @@
 				D543F9BD1C14980600D16A0C /* ReuseIdentifierProtocol.swift in Sources */,
 				D543F9C11C14984300D16A0C /* NibResource.swift in Sources */,
 				D553F5851C44157000885232 /* ImageResource.swift in Sources */,
+				E20F34A71C92B44100338F81 /* NSData+FileResource.swift in Sources */,
 				D57E1EB51C3D774000DDA68F /* UIFont+FontResource.swift in Sources */,
 				D5588CAB1C3F9DBE00912F97 /* UINib+NibResource.swift in Sources */,
 				D553F5871C44170E00885232 /* UIImage+ImageResource.swift in Sources */,

From 90e5673b06e9582d7c3ace5724bafd928eea9b6a Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Sun, 13 Mar 2016 15:55:45 +0100
Subject: [PATCH 009/112] Remove unused UIKit import from Core

---
 Library/Core/StoryboardResource.swift | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Library/Core/StoryboardResource.swift b/Library/Core/StoryboardResource.swift
index fceea9d..9839aae 100644
--- a/Library/Core/StoryboardResource.swift
+++ b/Library/Core/StoryboardResource.swift
@@ -7,7 +7,6 @@
 //
 
 import Foundation
-import UIKit
 
 public protocol StoryboardResourceType {
 

From a560db90ece07f7279bd15cd5e45e997d63df54e Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Sun, 13 Mar 2016 15:56:06 +0100
Subject: [PATCH 010/112] Correct comment about UIViewController nib loading

---
 Library/UIKit/UIViewController+NibResource.swift | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Library/UIKit/UIViewController+NibResource.swift b/Library/UIKit/UIViewController+NibResource.swift
index 05ed1bb..93afbb2 100644
--- a/Library/UIKit/UIViewController+NibResource.swift
+++ b/Library/UIKit/UIViewController+NibResource.swift
@@ -13,7 +13,7 @@ public extension UIViewController {
   /**
    Returns a newly initialized view controller with the nib resource (R.nib.*).
    
-   - parameter nib: The name of the nib resource (R.nib.*) to associate with the view controller.
+   - parameter nib: The nib resource (R.nib.*) to associate with the view controller.
    
    - returns: A newly initialized UIViewController object.
   */

From 33d575484ad9a3938575eda05a52b82b8d33f563 Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Sun, 13 Mar 2016 15:56:36 +0100
Subject: [PATCH 011/112] Add StoryboardViewControllerResourceType

Including a helper method: instantiateViewController
---
 .../StoryboardViewControllerResource.swift    | 25 +++++++++++++++++++
 ...ard+StoryboardViewControllerResource.swift | 23 +++++++++++++++++
 R.swift.Library.xcodeproj/project.pbxproj     | 16 ++++++++++--
 3 files changed, 62 insertions(+), 2 deletions(-)
 create mode 100644 Library/Core/StoryboardViewControllerResource.swift
 create mode 100644 Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift

diff --git a/Library/Core/StoryboardViewControllerResource.swift b/Library/Core/StoryboardViewControllerResource.swift
new file mode 100644
index 0000000..2b1a42f
--- /dev/null
+++ b/Library/Core/StoryboardViewControllerResource.swift
@@ -0,0 +1,25 @@
+//
+//  StoryboardViewControllerResource.swift
+//  R.swift.Library
+//
+//  Created by Mathijs Kadijk on 13-03-16.
+//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//
+
+import Foundation
+
+public protocol StoryboardViewControllerResourceType: IdentifierType {
+  typealias ViewControllerType
+}
+
+public struct StoryboardViewControllerResource<ViewController>: StoryboardViewControllerResourceType {
+  public typealias ViewControllerType = ViewController
+
+  /// Storyboard identifier of this view controller
+  public let identifier: String
+
+  public init(identifier: String) {
+    self.identifier = identifier
+  }
+}
+
diff --git a/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift b/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift
new file mode 100644
index 0000000..ac754ed
--- /dev/null
+++ b/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift
@@ -0,0 +1,23 @@
+//
+//  UIViewController+StoryboardViewControllerResource.swift
+//  R.swift.Library
+//
+//  Created by Mathijs Kadijk on 13-03-16.
+//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//
+
+import Foundation
+import UIKit
+
+public extension UIStoryboard {
+  /**
+   Instantiates and returns the view controller with the specified resource (R.storyboard.*.*).
+
+   - parameter resource: An resource (R.storyboard.*.*) that uniquely identifies the view controller in the storyboard file. If the specified resource does not exist in the storyboard file, this method raises an exception.
+
+   - 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>(resource: ViewControllerResource) -> ViewControllerResource.ViewControllerType?  {
+    return instantiateViewControllerWithIdentifier(resource.identifier) as? ViewControllerResource.ViewControllerType
+  }
+}
diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj
index 2d642b1..d2dc09e 100644
--- a/R.swift.Library.xcodeproj/project.pbxproj
+++ b/R.swift.Library.xcodeproj/project.pbxproj
@@ -27,6 +27,10 @@
 		806E69BA1C42BDE000DE3A8B /* UIViewController+NibResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D543F9C71C14995800D16A0C /* UIViewController+NibResource.swift */; };
 		806E69BB1C42BDE000DE3A8B /* UIViewController+StoryboardSegueIdentifierProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D543F9C91C14998800D16A0C /* UIViewController+StoryboardSegueIdentifierProtocol.swift */; };
 		806E69BC1C42BDE300DE3A8B /* RswiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D592465D1C117A55007F94C7 /* RswiftTests.swift */; };
+		D51335271C959DF20014C9D4 /* StoryboardViewControllerResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51335261C959DF20014C9D4 /* StoryboardViewControllerResource.swift */; };
+		D51335291C95A79B0014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51335281C95A79B0014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift */; };
+		D513352A1C95B7510014C9D4 /* StoryboardViewControllerResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51335261C959DF20014C9D4 /* StoryboardViewControllerResource.swift */; };
+		D513352B1C95B7620014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51335281C95A79B0014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift */; };
 		D53F19241C229D7200AE2FAD /* Validatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53F19231C229D7200AE2FAD /* Validatable.swift */; };
 		D543F9BB1C1497EB00D16A0C /* Identifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = D543F9BA1C1497EB00D16A0C /* Identifier.swift */; };
 		D543F9BD1C14980600D16A0C /* ReuseIdentifierProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D543F9BC1C14980600D16A0C /* ReuseIdentifierProtocol.swift */; };
@@ -77,6 +81,8 @@
 /* Begin PBXFileReference section */
 		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>"; };
+		D51335281C95A79B0014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIStoryboard+StoryboardViewControllerResource.swift"; sourceTree = "<group>"; };
 		D53F19231C229D7200AE2FAD /* Validatable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Validatable.swift; sourceTree = "<group>"; };
 		D543F9BA1C1497EB00D16A0C /* Identifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Identifier.swift; sourceTree = "<group>"; };
 		D543F9BC1C14980600D16A0C /* ReuseIdentifierProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReuseIdentifierProtocol.swift; sourceTree = "<group>"; };
@@ -148,12 +154,13 @@
 				D543F9CE1C149C0A00D16A0C /* TypedStoryboardSegueInfo+UIStoryboardSegue.swift */,
 				D543F9C51C14992000D16A0C /* UICollectionView+ReuseIdentifierProtocol.swift */,
 				D57E1EB41C3D774000DDA68F /* UIFont+FontResource.swift */,
+				D553F5861C44170E00885232 /* UIImage+ImageResource.swift */,
 				D5588CAA1C3F9DBE00912F97 /* UINib+NibResource.swift */,
 				D57E1EBA1C3E4C4300DDA68F /* UIStoryboard+StoryboardResource.swift */,
 				D543F9C31C1498FB00D16A0C /* UITableView+ReuseIdentifierProtocol.swift */,
 				D543F9C71C14995800D16A0C /* UIViewController+NibResource.swift */,
 				D543F9C91C14998800D16A0C /* UIViewController+StoryboardSegueIdentifierProtocol.swift */,
-				D553F5861C44170E00885232 /* UIImage+ImageResource.swift */,
+				D51335281C95A79B0014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift */,
 			);
 			path = UIKit;
 			sourceTree = "<group>";
@@ -164,12 +171,13 @@
 				D5E435AC1C3D00770091090C /* FileResource.swift */,
 				D57E1EB21C3D762300DDA68F /* FontResource.swift */,
 				D543F9BA1C1497EB00D16A0C /* Identifier.swift */,
+				D553F5841C44157000885232 /* ImageResource.swift */,
 				D543F9C01C14984300D16A0C /* NibResource.swift */,
 				D543F9BC1C14980600D16A0C /* ReuseIdentifierProtocol.swift */,
 				D57E1EB61C3E482A00DDA68F /* StoryboardResource.swift */,
 				D543F9BE1C14983100D16A0C /* StoryboardSegueIdentifierProtocol.swift */,
+				D51335261C959DF20014C9D4 /* StoryboardViewControllerResource.swift */,
 				D53F19231C229D7200AE2FAD /* Validatable.swift */,
-				D553F5841C44157000885232 /* ImageResource.swift */,
 			);
 			path = Core;
 			sourceTree = "<group>";
@@ -398,6 +406,7 @@
 			buildActionMask = 2147483647;
 			files = (
 				D5728B311C4D541200E38168 /* ImageResource.swift in Sources */,
+				D513352B1C95B7620014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift in Sources */,
 				806E69AD1C42BDDA00DE3A8B /* ReuseIdentifierProtocol.swift in Sources */,
 				806E69B61C42BDE000DE3A8B /* UINib+NibResource.swift in Sources */,
 				806E69AA1C42BDDA00DE3A8B /* FontResource.swift in Sources */,
@@ -410,6 +419,7 @@
 				806E69BB1C42BDE000DE3A8B /* UIViewController+StoryboardSegueIdentifierProtocol.swift in Sources */,
 				806E69B21C42BDE000DE3A8B /* StoryboardResourceWithInitialController+UIKit.swift in Sources */,
 				D5728B331C4D541D00E38168 /* UIImage+ImageResource.swift in Sources */,
+				D513352A1C95B7510014C9D4 /* StoryboardViewControllerResource.swift in Sources */,
 				806E69AF1C42BDDA00DE3A8B /* StoryboardSegueIdentifierProtocol.swift in Sources */,
 				806E69AB1C42BDDA00DE3A8B /* Identifier.swift in Sources */,
 				806E69B01C42BDDA00DE3A8B /* Validatable.swift in Sources */,
@@ -434,6 +444,7 @@
 			buildActionMask = 2147483647;
 			files = (
 				D543F9CA1C14998800D16A0C /* UIViewController+StoryboardSegueIdentifierProtocol.swift in Sources */,
+				D51335291C95A79B0014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift in Sources */,
 				D5E435AD1C3D00770091090C /* FileResource.swift in Sources */,
 				D543F9BB1C1497EB00D16A0C /* Identifier.swift in Sources */,
 				D57E1EB71C3E482A00DDA68F /* StoryboardResource.swift in Sources */,
@@ -446,6 +457,7 @@
 				D57E1EB51C3D774000DDA68F /* UIFont+FontResource.swift in Sources */,
 				D5588CAB1C3F9DBE00912F97 /* UINib+NibResource.swift in Sources */,
 				D553F5871C44170E00885232 /* UIImage+ImageResource.swift in Sources */,
+				D51335271C959DF20014C9D4 /* StoryboardViewControllerResource.swift in Sources */,
 				D543F9C61C14992000D16A0C /* UICollectionView+ReuseIdentifierProtocol.swift in Sources */,
 				D543F9BF1C14983100D16A0C /* StoryboardSegueIdentifierProtocol.swift in Sources */,
 				D543F9C81C14995800D16A0C /* UIViewController+NibResource.swift in Sources */,

From 914414572d68542bafa56ab8ae1075dfab92169f Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Sun, 13 Mar 2016 16:57:57 +0100
Subject: [PATCH 012/112] Make NSBundle non-optional

as there where some subtile bugs with this and the bundle should be known for everthing at runtime.
---
 Library/Core/FileResource.swift       | 14 +++++++-------
 Library/Core/ImageResource.swift      | 10 +++++-----
 Library/Core/NibResource.swift        |  2 +-
 Library/Core/StoryboardResource.swift |  4 ++--
 4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/Library/Core/FileResource.swift b/Library/Core/FileResource.swift
index 4e50b4e..3dee398 100644
--- a/Library/Core/FileResource.swift
+++ b/Library/Core/FileResource.swift
@@ -10,8 +10,8 @@ import Foundation
 
 public protocol FileResourceType {
 
-  /// Bundle this file is in or nil for main bundle
-  var bundle: NSBundle? { get }
+  /// Bundle this file is in
+  var bundle: NSBundle { get }
 
   /// Name of the file file on disk
   var name: String { get }
@@ -27,7 +27,7 @@ public extension FileResourceType {
    - returns: The full pathname for this resource or nil if the file could not be located.
    */
   func path() -> String? {
-    return bundle?.pathForResource(self)
+    return bundle.pathForResource(self)
   }
 
   /**
@@ -36,13 +36,13 @@ public extension FileResourceType {
    - returns: The file URL for this resource or nil if the file could not be located.
    */
   func url() -> NSURL? {
-    return bundle?.URLForResource(self)
+    return bundle.URLForResource(self)
   }
 }
 
 public struct FileResource: FileResourceType {
-  /// Bundle this file is in or nil for main bundle
-  public let bundle: NSBundle?
+  /// Bundle this file is in
+  public let bundle: NSBundle
 
   /// Name of the file file on disk
   public let name: String
@@ -50,7 +50,7 @@ public struct FileResource: FileResourceType {
   /// Extension of the file on disk
   public let pathExtension: String
 
-  public init(bundle: NSBundle?, name: String, pathExtension: String) {
+  public init(bundle: NSBundle, name: String, pathExtension: String) {
     self.bundle = bundle
     self.name = name
     self.pathExtension = pathExtension
diff --git a/Library/Core/ImageResource.swift b/Library/Core/ImageResource.swift
index 6febc7c..1c295d2 100644
--- a/Library/Core/ImageResource.swift
+++ b/Library/Core/ImageResource.swift
@@ -10,8 +10,8 @@ import Foundation
 
 public protocol ImageResourceType {
 
-  /// Bundle this image is in or nil for main bundle
-  var bundle: NSBundle? { get }
+  /// Bundle this image is in
+  var bundle: NSBundle { get }
 
   /// Name of the image
   var name: String { get }
@@ -19,13 +19,13 @@ public protocol ImageResourceType {
 
 public struct ImageResource: ImageResourceType {
 
-  /// Bundle this image is in or nil for main bundle
-  public let bundle: NSBundle?
+  /// Bundle this image is in
+  public let bundle: NSBundle
 
   /// Name of the image
   public let name: String
 
-  public init(bundle: NSBundle?, name: String) {
+  public init(bundle: NSBundle, name: String) {
     self.bundle = bundle
     self.name = name
   }
diff --git a/Library/Core/NibResource.swift b/Library/Core/NibResource.swift
index 82de154..b6d39fc 100644
--- a/Library/Core/NibResource.swift
+++ b/Library/Core/NibResource.swift
@@ -12,7 +12,7 @@ import Foundation
 public protocol NibResourceType {
 
   /// Bundle this nib is in or nil for main bundle
-  var bundle: NSBundle? { get }
+  var bundle: NSBundle { get }
 
   /// Name of the nib file on disk
   var name: String { get }
diff --git a/Library/Core/StoryboardResource.swift b/Library/Core/StoryboardResource.swift
index 9839aae..4d897a3 100644
--- a/Library/Core/StoryboardResource.swift
+++ b/Library/Core/StoryboardResource.swift
@@ -10,8 +10,8 @@ import Foundation
 
 public protocol StoryboardResourceType {
 
-  /// Bundle this storyboard is in or nil for main bundle
-  var bundle: NSBundle? { get }
+  /// Bundle this storyboard is in
+  var bundle: NSBundle { get }
 
   /// Name of the storyboard file on disk
   var name: String { get }

From 35b6c9ceb0306fcd9d3f576ad29d671cf1ea890a Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Sun, 13 Mar 2016 17:00:48 +0100
Subject: [PATCH 013/112] Add new NSData helper to tvOS target

---
 R.swift.Library.xcodeproj/project.pbxproj | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj
index e77d025..05d7dfa 100644
--- a/R.swift.Library.xcodeproj/project.pbxproj
+++ b/R.swift.Library.xcodeproj/project.pbxproj
@@ -31,6 +31,7 @@
 		D51335291C95A79B0014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51335281C95A79B0014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift */; };
 		D513352A1C95B7510014C9D4 /* StoryboardViewControllerResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51335261C959DF20014C9D4 /* StoryboardViewControllerResource.swift */; };
 		D513352B1C95B7620014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51335281C95A79B0014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift */; };
+		D513352C1C95C61E0014C9D4 /* NSData+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20F34A61C92B44100338F81 /* NSData+FileResource.swift */; };
 		D53F19241C229D7200AE2FAD /* Validatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53F19231C229D7200AE2FAD /* Validatable.swift */; };
 		D543F9BB1C1497EB00D16A0C /* Identifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = D543F9BA1C1497EB00D16A0C /* Identifier.swift */; };
 		D543F9BD1C14980600D16A0C /* ReuseIdentifierProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D543F9BC1C14980600D16A0C /* ReuseIdentifierProtocol.swift */; };
@@ -410,6 +411,7 @@
 			files = (
 				D5728B311C4D541200E38168 /* ImageResource.swift in Sources */,
 				D513352B1C95B7620014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift in Sources */,
+				D513352C1C95C61E0014C9D4 /* NSData+FileResource.swift in Sources */,
 				806E69AD1C42BDDA00DE3A8B /* ReuseIdentifierProtocol.swift in Sources */,
 				806E69B61C42BDE000DE3A8B /* UINib+NibResource.swift in Sources */,
 				806E69AA1C42BDDA00DE3A8B /* FontResource.swift in Sources */,

From a029cf8ca57aa28e2c72e74e1157a048126f1cbc Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Sun, 13 Mar 2016 17:02:34 +0100
Subject: [PATCH 014/112] Simplify NSData initializer with FileResourceType

By using the `.url()` function
---
 Library/Foundation/NSData+FileResource.swift | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/Library/Foundation/NSData+FileResource.swift b/Library/Foundation/NSData+FileResource.swift
index 2ab55c8..0aef3a4 100644
--- a/Library/Foundation/NSData+FileResource.swift
+++ b/Library/Foundation/NSData+FileResource.swift
@@ -18,12 +18,7 @@ public extension NSData {
    - returns: A NSData object with the contents of the specified file.
    */
   public convenience init?(resource: FileResourceType) {
-    let bundle = resource.bundle ?? NSBundle.mainBundle()
-
-    guard let url = bundle.URLForResource(resource.name, withExtension: resource.pathExtension) else {
-      return nil
-    }
-
+    guard let url = resource.url() else { return nil }
     self.init(contentsOfURL: url)
   }
 }

From 42119d2a1770bfda073403062e869014a08a723e Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Sun, 13 Mar 2016 20:45:21 +0100
Subject: [PATCH 015/112] Add ColorResource

---
 Library/Core/ColorResource.swift          | 64 +++++++++++++++++++++++
 R.swift.Library.xcodeproj/project.pbxproj |  4 ++
 2 files changed, 68 insertions(+)
 create mode 100644 Library/Core/ColorResource.swift

diff --git a/Library/Core/ColorResource.swift b/Library/Core/ColorResource.swift
new file mode 100644
index 0000000..5d87016
--- /dev/null
+++ b/Library/Core/ColorResource.swift
@@ -0,0 +1,64 @@
+//
+//  ColorResource.swift
+//  R.swift.Library
+//
+//  Created by Tom Lokhorst on 2016-03-13.
+//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//
+
+import UIKit
+
+public protocol ColorResourceType {
+
+  /// 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 extension ColorResourceType {
+  /**
+   Returns the a UIColor
+
+   - returns: A UIColor for this color resource
+   */
+  func color() -> UIColor {
+    return UIColor(red: red, green: green, blue: blue, alpha: alpha)
+  }
+}
+
+public struct ColorResource: ColorResourceType {
+
+  /// 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/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj
index 05d7dfa..009c489 100644
--- a/R.swift.Library.xcodeproj/project.pbxproj
+++ b/R.swift.Library.xcodeproj/project.pbxproj
@@ -61,6 +61,7 @@
 		D5E435A91C3CFB460091090C /* NibResource+UIKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E435A81C3CFB460091090C /* NibResource+UIKit.swift */; };
 		D5E435AD1C3D00770091090C /* FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E435AC1C3D00770091090C /* FileResource.swift */; };
 		E20F34A71C92B44100338F81 /* NSData+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20F34A61C92B44100338F81 /* NSData+FileResource.swift */; };
+		E22D43671C95EEA100692FFF /* ColorResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22D43661C95EEA100692FFF /* ColorResource.swift */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -113,6 +114,7 @@
 		D5E435A81C3CFB460091090C /* NibResource+UIKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NibResource+UIKit.swift"; sourceTree = "<group>"; };
 		D5E435AC1C3D00770091090C /* FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileResource.swift; sourceTree = "<group>"; };
 		E20F34A61C92B44100338F81 /* NSData+FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSData+FileResource.swift"; sourceTree = "<group>"; };
+		E22D43661C95EEA100692FFF /* ColorResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorResource.swift; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -171,6 +173,7 @@
 		D543F9CD1C1499CF00D16A0C /* Core */ = {
 			isa = PBXGroup;
 			children = (
+				E22D43661C95EEA100692FFF /* ColorResource.swift */,
 				D5E435AC1C3D00770091090C /* FileResource.swift */,
 				D57E1EB21C3D762300DDA68F /* FontResource.swift */,
 				D543F9BA1C1497EB00D16A0C /* Identifier.swift */,
@@ -463,6 +466,7 @@
 				D57E1EB51C3D774000DDA68F /* UIFont+FontResource.swift in Sources */,
 				D5588CAB1C3F9DBE00912F97 /* UINib+NibResource.swift in Sources */,
 				D553F5871C44170E00885232 /* UIImage+ImageResource.swift in Sources */,
+				E22D43671C95EEA100692FFF /* ColorResource.swift in Sources */,
 				D51335271C959DF20014C9D4 /* StoryboardViewControllerResource.swift in Sources */,
 				D543F9C61C14992000D16A0C /* UICollectionView+ReuseIdentifierProtocol.swift in Sources */,
 				D543F9BF1C14983100D16A0C /* StoryboardSegueIdentifierProtocol.swift in Sources */,

From fa01612f91e2e466de7194ec2e470febfdbe609c Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Mon, 14 Mar 2016 09:59:21 +0100
Subject: [PATCH 016/112] Add ColorResource to tvOS target

---
 R.swift.Library.xcodeproj/project.pbxproj | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj
index 009c489..7eb9308 100644
--- a/R.swift.Library.xcodeproj/project.pbxproj
+++ b/R.swift.Library.xcodeproj/project.pbxproj
@@ -62,6 +62,7 @@
 		D5E435AD1C3D00770091090C /* FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E435AC1C3D00770091090C /* FileResource.swift */; };
 		E20F34A71C92B44100338F81 /* NSData+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20F34A61C92B44100338F81 /* NSData+FileResource.swift */; };
 		E22D43671C95EEA100692FFF /* ColorResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22D43661C95EEA100692FFF /* ColorResource.swift */; };
+		E24720CA1C96B4D100DF291D /* ColorResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22D43661C95EEA100692FFF /* ColorResource.swift */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -427,6 +428,7 @@
 				806E69BB1C42BDE000DE3A8B /* UIViewController+StoryboardSegueIdentifierProtocol.swift in Sources */,
 				806E69B21C42BDE000DE3A8B /* StoryboardResourceWithInitialController+UIKit.swift in Sources */,
 				D5728B331C4D541D00E38168 /* UIImage+ImageResource.swift in Sources */,
+				E24720CA1C96B4D100DF291D /* ColorResource.swift in Sources */,
 				D513352A1C95B7510014C9D4 /* StoryboardViewControllerResource.swift in Sources */,
 				806E69AF1C42BDDA00DE3A8B /* StoryboardSegueIdentifierProtocol.swift in Sources */,
 				806E69AB1C42BDDA00DE3A8B /* Identifier.swift in Sources */,

From dbfa02dc16734639d1e70c99499f06c12b942acc Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Wed, 16 Mar 2016 22:05:26 +0100
Subject: [PATCH 017/112] Bump version in podspec

---
 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 42306ef..ae933b4 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      = "1.1.0"
+  spec.version      = "1.2.0"
   spec.license      = "MIT"
 
   spec.summary      = "Companion library for R.swift, featuring types used to type resources"

From d29951db4b6f9c4a1596a1c489149aca2ca8d120 Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Tue, 22 Mar 2016 08:52:45 +0100
Subject: [PATCH 018/112] Update to Swift 2.2

---
 Library/Core/ReuseIdentifierProtocol.swift           | 2 +-
 Library/Core/StoryboardResource.swift                | 2 +-
 Library/Core/StoryboardSegueIdentifierProtocol.swift | 6 +++---
 Library/Core/StoryboardViewControllerResource.swift  | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Library/Core/ReuseIdentifierProtocol.swift b/Library/Core/ReuseIdentifierProtocol.swift
index f86a1cc..e32db59 100644
--- a/Library/Core/ReuseIdentifierProtocol.swift
+++ b/Library/Core/ReuseIdentifierProtocol.swift
@@ -11,7 +11,7 @@ import Foundation
 /// Reuse identifier protocol
 public protocol ReuseIdentifierType: IdentifierType {
   /// Type of this reuseable
-  typealias ReusableType
+  associatedtype ReusableType
 }
 
 /// Reuse identifier
diff --git a/Library/Core/StoryboardResource.swift b/Library/Core/StoryboardResource.swift
index 4d897a3..ae96351 100644
--- a/Library/Core/StoryboardResource.swift
+++ b/Library/Core/StoryboardResource.swift
@@ -20,5 +20,5 @@ public protocol StoryboardResourceType {
 public protocol StoryboardResourceWithInitialControllerType: StoryboardResourceType {
 
   /// Type of the inital controller
-  typealias InitialController
+  associatedtype InitialController
 }
diff --git a/Library/Core/StoryboardSegueIdentifierProtocol.swift b/Library/Core/StoryboardSegueIdentifierProtocol.swift
index df48c6e..0d026b0 100644
--- a/Library/Core/StoryboardSegueIdentifierProtocol.swift
+++ b/Library/Core/StoryboardSegueIdentifierProtocol.swift
@@ -11,13 +11,13 @@ import Foundation
 /// Segue identifier protocol
 public protocol StoryboardSegueIdentifierType: IdentifierType {
   /// Type of the segue itself
-  typealias SegueType
+  associatedtype SegueType
 
   /// Type of the source view controller
-  typealias SourceType
+  associatedtype SourceType
 
   /// Type of the destination view controller
-  typealias DestinationType
+  associatedtype DestinationType
 }
 
 /// Segue identifier
diff --git a/Library/Core/StoryboardViewControllerResource.swift b/Library/Core/StoryboardViewControllerResource.swift
index 2b1a42f..3cb45ef 100644
--- a/Library/Core/StoryboardViewControllerResource.swift
+++ b/Library/Core/StoryboardViewControllerResource.swift
@@ -9,7 +9,7 @@
 import Foundation
 
 public protocol StoryboardViewControllerResourceType: IdentifierType {
-  typealias ViewControllerType
+  associatedtype ViewControllerType
 }
 
 public struct StoryboardViewControllerResource<ViewController>: StoryboardViewControllerResourceType {

From d707c1599715f4e3620e029bfb3d098022ca379a Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Tue, 22 Mar 2016 20:40:14 +0100
Subject: [PATCH 019/112] Bump podspec

---
 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 ae933b4..6016cd9 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      = "1.2.0"
+  spec.version      = "1.2.1"
   spec.license      = "MIT"
 
   spec.summary      = "Companion library for R.swift, featuring types used to type resources"

From ffe58d35d92875ac6b26c08db9eaa2c0c55c54fa Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Wed, 23 Mar 2016 08:17:57 +0100
Subject: [PATCH 020/112] Bump podspec

---
 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 6016cd9..a020c8c 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      = "1.2.1"
+  spec.version      = "2.0.0"
   spec.license      = "MIT"
 
   spec.summary      = "Companion library for R.swift, featuring types used to type resources"

From 41c75107f1316758b64ddc24eb3170c8f8818ab4 Mon Sep 17 00:00:00 2001
From: Jerson Michael Perpetua <jersonperpetua@gmail.com>
Date: Thu, 7 Apr 2016 20:06:39 +0800
Subject: [PATCH 021/112] Fix typo that causes views of the correct superclass
 to not be dequeued as UITableView header/footer views

---
 Library/UIKit/UITableView+ReuseIdentifierProtocol.swift | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
index 5334939..e59e30e 100644
--- a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
+++ b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
@@ -44,7 +44,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 dequeueReusableHeaderFooterViewWithIdentifier<Identifier: ReuseIdentifierType where Identifier.ReusableType: UITableViewCell>(identifier: Identifier) -> Identifier.ReusableType? {
+  public func dequeueReusableHeaderFooterViewWithIdentifier<Identifier: ReuseIdentifierType where Identifier.ReusableType: UIView>(identifier: Identifier) -> Identifier.ReusableType? {
     return dequeueReusableHeaderFooterViewWithIdentifier(identifier.identifier) as? Identifier.ReusableType
   }
 

From 5dd6d3ccec044694a9666c243fef0e250d995a27 Mon Sep 17 00:00:00 2001
From: Jerson Michael Perpetua <jersonperpetua@gmail.com>
Date: Mon, 18 Apr 2016 14:59:11 +0800
Subject: [PATCH 022/112] Replace reusable type to be dequeued as table view
 header-footer views with the correct UIView subclass

---
 Library/UIKit/UITableView+ReuseIdentifierProtocol.swift | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
index e59e30e..5516973 100644
--- a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
+++ b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
@@ -44,7 +44,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 dequeueReusableHeaderFooterViewWithIdentifier<Identifier: ReuseIdentifierType where Identifier.ReusableType: UIView>(identifier: Identifier) -> Identifier.ReusableType? {
+  public func dequeueReusableHeaderFooterViewWithIdentifier<Identifier: ReuseIdentifierType where Identifier.ReusableType: UITableViewHeaderFooterView>(identifier: Identifier) -> Identifier.ReusableType? {
     return dequeueReusableHeaderFooterViewWithIdentifier(identifier.identifier) as? Identifier.ReusableType
   }
 

From d8d5f0468b4b1e026549c9ca128ab972ec821cfb Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Fri, 22 Apr 2016 16:51:41 +0200
Subject: [PATCH 023/112] Add fullName to FileResourceType

---
 Library/Core/FileResource.swift | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Library/Core/FileResource.swift b/Library/Core/FileResource.swift
index 3dee398..ee30c9b 100644
--- a/Library/Core/FileResource.swift
+++ b/Library/Core/FileResource.swift
@@ -21,6 +21,11 @@ public protocol FileResourceType {
 }
 
 public extension FileResourceType {
+  /// Name of the file on disk with the pathExtension
+  var fullName: String {
+    return [name, pathExtension].joinWithSeparator(".")
+  }
+
   /**
    Returns the full pathname for this resource.
 
@@ -44,7 +49,7 @@ public struct FileResource: FileResourceType {
   /// Bundle this file is in
   public let bundle: NSBundle
 
-  /// Name of the file file on disk
+  /// Name of the file on disk, without the pathExtension
   public let name: String
 
   /// Extension of the file on disk

From 0710af257b9571ce41ed19115ccf21dcbe8ca459 Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Sat, 23 Apr 2016 20:26:34 +0200
Subject: [PATCH 024/112] Split out UIKit color resource

---
 Library/Core/ColorResource.swift          | 13 +------------
 Library/UIKit/ColorResource+UIKit.swift   | 20 ++++++++++++++++++++
 R.swift.Library.xcodeproj/project.pbxproj |  8 +++++++-
 3 files changed, 28 insertions(+), 13 deletions(-)
 create mode 100644 Library/UIKit/ColorResource+UIKit.swift

diff --git a/Library/Core/ColorResource.swift b/Library/Core/ColorResource.swift
index 5d87016..2174872 100644
--- a/Library/Core/ColorResource.swift
+++ b/Library/Core/ColorResource.swift
@@ -6,7 +6,7 @@
 //  Copyright © 2016 Mathijs Kadijk. All rights reserved.
 //
 
-import UIKit
+import Foundation
 
 public protocol ColorResourceType {
 
@@ -26,17 +26,6 @@ public protocol ColorResourceType {
   var alpha: CGFloat { get }
 }
 
-public extension ColorResourceType {
-  /**
-   Returns the a UIColor
-
-   - returns: A UIColor for this color resource
-   */
-  func color() -> UIColor {
-    return UIColor(red: red, green: green, blue: blue, alpha: alpha)
-  }
-}
-
 public struct ColorResource: ColorResourceType {
 
   /// Name of the color
diff --git a/Library/UIKit/ColorResource+UIKit.swift b/Library/UIKit/ColorResource+UIKit.swift
new file mode 100644
index 0000000..e4d50e5
--- /dev/null
+++ b/Library/UIKit/ColorResource+UIKit.swift
@@ -0,0 +1,20 @@
+//
+//  ColorResource+UIKit.swift
+//  R.swift.Library
+//
+//  Created by Tom Lokhorst on 2016-04-23.
+//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//
+
+import UIKit
+
+public extension ColorResourceType {
+  /**
+   Returns the a UIColor
+
+   - returns: A UIColor for this color 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 7eb9308..9d35c1a 100644
--- a/R.swift.Library.xcodeproj/project.pbxproj
+++ b/R.swift.Library.xcodeproj/project.pbxproj
@@ -63,6 +63,8 @@
 		E20F34A71C92B44100338F81 /* NSData+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20F34A61C92B44100338F81 /* NSData+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 */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -116,6 +118,7 @@
 		D5E435AC1C3D00770091090C /* FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileResource.swift; sourceTree = "<group>"; };
 		E20F34A61C92B44100338F81 /* NSData+FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSData+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>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -155,6 +158,7 @@
 		D543F9C21C14987000D16A0C /* UIKit */ = {
 			isa = PBXGroup;
 			children = (
+				E250BE931CCBCEB100CC71DE /* ColorResource+UIKit.swift */,
 				D5E435A81C3CFB460091090C /* NibResource+UIKit.swift */,
 				D57E1EB81C3E4C1A00DDA68F /* StoryboardResourceWithInitialController+UIKit.swift */,
 				D543F9CE1C149C0A00D16A0C /* TypedStoryboardSegueInfo+UIStoryboardSegue.swift */,
@@ -163,10 +167,10 @@
 				D553F5861C44170E00885232 /* UIImage+ImageResource.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 */,
-				D51335281C95A79B0014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift */,
 			);
 			path = UIKit;
 			sourceTree = "<group>";
@@ -435,6 +439,7 @@
 				806E69B01C42BDDA00DE3A8B /* Validatable.swift in Sources */,
 				806E69B31C42BDE000DE3A8B /* TypedStoryboardSegueInfo+UIStoryboardSegue.swift in Sources */,
 				D5728B321C4D541500E38168 /* NSBundle+FileResource.swift in Sources */,
+				E250BE951CCBF58200CC71DE /* ColorResource+UIKit.swift in Sources */,
 				806E69B91C42BDE000DE3A8B /* UITableView+ReuseIdentifierProtocol.swift in Sources */,
 				806E69AE1C42BDDA00DE3A8B /* StoryboardResource.swift in Sources */,
 				806E69A91C42BDDA00DE3A8B /* FileResource.swift in Sources */,
@@ -475,6 +480,7 @@
 				D543F9C81C14995800D16A0C /* UIViewController+NibResource.swift in Sources */,
 				D5E435A91C3CFB460091090C /* NibResource+UIKit.swift in Sources */,
 				D543F9CF1C149C0A00D16A0C /* TypedStoryboardSegueInfo+UIStoryboardSegue.swift in Sources */,
+				E250BE941CCBCEB100CC71DE /* ColorResource+UIKit.swift in Sources */,
 				D543F9C41C1498FB00D16A0C /* UITableView+ReuseIdentifierProtocol.swift in Sources */,
 				D56DC7731C42B65C00623437 /* NSBundle+FileResource.swift in Sources */,
 				D53F19241C229D7200AE2FAD /* Validatable.swift in Sources */,

From f420831d1328bee2ada9b12a1c41dd4c363ee5a4 Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Sat, 23 Apr 2016 20:38:37 +0200
Subject: [PATCH 025/112] Add StringResource for localizations

---
 Library/Core/StringResource.swift         | 39 +++++++++++++++++++++++
 R.swift.Library.xcodeproj/project.pbxproj |  6 ++++
 2 files changed, 45 insertions(+)
 create mode 100644 Library/Core/StringResource.swift

diff --git a/Library/Core/StringResource.swift b/Library/Core/StringResource.swift
new file mode 100644
index 0000000..76e5e61
--- /dev/null
+++ b/Library/Core/StringResource.swift
@@ -0,0 +1,39 @@
+//
+//  StringResource.swift
+//  R.swift.Library
+//
+//  Created by Tom Lokhorst on 2016-04-23.
+//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//
+
+import Foundation
+
+public protocol StringResourceType {
+
+  /// Key for the string
+  var key: String { get }
+
+  /// File in containing the string
+  var tableName: String { get }
+
+  /// Locales of the a localizable string
+  var locales: [String] { get }
+}
+
+public struct StringResource: StringResourceType {
+
+  /// Key for the string
+  public let key: String
+
+  /// File in containing the string
+  public let tableName: String
+
+  /// Locales of the a localizable string
+  public let locales: [String]
+
+  public init(key: String, tableName: String, locales: [String]) {
+    self.key = key
+    self.tableName = tableName
+    self.locales = locales
+  }
+}
diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj
index 9d35c1a..2e146b2 100644
--- a/R.swift.Library.xcodeproj/project.pbxproj
+++ b/R.swift.Library.xcodeproj/project.pbxproj
@@ -65,6 +65,8 @@
 		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 */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -119,6 +121,7 @@
 		E20F34A61C92B44100338F81 /* NSData+FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSData+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>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -188,6 +191,7 @@
 				D57E1EB61C3E482A00DDA68F /* StoryboardResource.swift */,
 				D543F9BE1C14983100D16A0C /* StoryboardSegueIdentifierProtocol.swift */,
 				D51335261C959DF20014C9D4 /* StoryboardViewControllerResource.swift */,
+				E250BE961CCBF60300CC71DE /* StringResource.swift */,
 				D53F19231C229D7200AE2FAD /* Validatable.swift */,
 			);
 			path = Core;
@@ -438,6 +442,7 @@
 				806E69AB1C42BDDA00DE3A8B /* Identifier.swift in Sources */,
 				806E69B01C42BDDA00DE3A8B /* Validatable.swift in Sources */,
 				806E69B31C42BDE000DE3A8B /* TypedStoryboardSegueInfo+UIStoryboardSegue.swift in Sources */,
+				E250BE991CCBF7E900CC71DE /* StringResource.swift in Sources */,
 				D5728B321C4D541500E38168 /* NSBundle+FileResource.swift in Sources */,
 				E250BE951CCBF58200CC71DE /* ColorResource+UIKit.swift in Sources */,
 				806E69B91C42BDE000DE3A8B /* UITableView+ReuseIdentifierProtocol.swift in Sources */,
@@ -479,6 +484,7 @@
 				D543F9BF1C14983100D16A0C /* StoryboardSegueIdentifierProtocol.swift in Sources */,
 				D543F9C81C14995800D16A0C /* UIViewController+NibResource.swift in Sources */,
 				D5E435A91C3CFB460091090C /* NibResource+UIKit.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 */,

From 8468f5f73dd75bd971f1381e826c3ad21cd47b1e Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Wed, 27 Apr 2016 22:48:49 +0200
Subject: [PATCH 026/112] Project wide indentation settings

---
 R.swift.Library.xcodeproj/project.pbxproj | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj
index 2e146b2..6ffbac5 100644
--- a/R.swift.Library.xcodeproj/project.pbxproj
+++ b/R.swift.Library.xcodeproj/project.pbxproj
@@ -213,7 +213,10 @@
 				D592465C1C117A55007F94C7 /* LibraryTests */,
 				D592464F1C117A55007F94C7 /* Products */,
 			);
+			indentWidth = 2;
 			sourceTree = "<group>";
+			tabWidth = 2;
+			usesTabs = 0;
 		};
 		D592464F1C117A55007F94C7 /* Products */ = {
 			isa = PBXGroup;

From 497fbc56ad522b744719a56dedae193bdd331053 Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Thu, 28 Apr 2016 22:29:03 +0200
Subject: [PATCH 027/112] Bump 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 a020c8c..768e79d 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      = "2.0.0"
+  spec.version      = "2.1.0"
   spec.license      = "MIT"
 
   spec.summary      = "Companion library for R.swift, featuring types used to type resources"

From 8b991464ad42e6d759df36591816108b5491141e Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Fri, 6 May 2016 08:41:20 +0200
Subject: [PATCH 028/112] Add fastlane release script

---
 .gitignore                                   |   4 +
 fastlane/Fastfile                            | 104 ++++++++++++
 fastlane/actions/af_create_github_release.rb | 157 +++++++++++++++++++
 3 files changed, 265 insertions(+)
 create mode 100644 fastlane/Fastfile
 create mode 100644 fastlane/actions/af_create_github_release.rb

diff --git a/.gitignore b/.gitignore
index 3b8e2bf..7465dc7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,7 @@
 .DS_Store
 xcuserdata
 *.xccheckout
+fastlane/README.md
+fastlane/report.xml
+fastlane/test_output
+fastlane/settoken.sh
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
new file mode 100644
index 0000000..edf84fe
--- /dev/null
+++ b/fastlane/Fastfile
@@ -0,0 +1,104 @@
+fastlane_version "1.86.0"
+
+desc "Tags a new version of R.swift.Library and releases it to cocoapods"
+desc " * GITHUB_API_TOKEN must be available in environment, create one on https://github.com/settings/tokens"
+desc "This lane should be run from your local machine, and will push a tag to the remote when finished."
+desc " * Verifies the git branch is clean"
+desc " * Ensures the lane is running on the master branch"
+desc " * Pulls the remote to verify the latest the branch is up to date"
+desc " * Asks for the new version number"
+desc " * Commit, tag and release library to cocoapods"
+desc "####Options"
+desc " * **`allow_dirty_branch`**: Allows the git branch to be dirty before continuing. Defaults to false"
+lane :release do |options|
+  ensure_git_branch(branch: "master")
+
+  if options[:allow_dirty_branch] != true
+    ensure_git_status_clean
+  else
+    Helper.log.info "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()
+  Helper.log.info "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",
+    clean: true
+  )
+  scan(
+    project: "R.swift.Library.xcodeproj",
+    scheme: "Rswift-tvOS",
+    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
new file mode 100644
index 0000000..cdd6d72
--- /dev/null
+++ b/fastlane/actions/af_create_github_release.rb
@@ -0,0 +1,157 @@
+# 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
+          Helper.log.info "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
+          
+          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
+          Helper.log.info "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

From d6621487757152e5b8a23b12b8d1cafddc2c9b9c Mon Sep 17 00:00:00 2001
From: Kristian Andersen <hello@kristian.co>
Date: Thu, 16 Jun 2016 09:56:04 +0200
Subject: [PATCH 029/112] set "allow app extension API only" for targets

---
 R.swift.Library.xcodeproj/project.pbxproj | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj
index 6ffbac5..99a0270 100644
--- a/R.swift.Library.xcodeproj/project.pbxproj
+++ b/R.swift.Library.xcodeproj/project.pbxproj
@@ -523,6 +523,7 @@
 		806E69A41C42BD9C00DE3A8B /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				APPLICATION_EXTENSION_API_ONLY = YES;
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
 				DYLIB_CURRENT_VERSION = 1;
@@ -542,6 +543,7 @@
 		806E69A51C42BD9C00DE3A8B /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				APPLICATION_EXTENSION_API_ONLY = YES;
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
 				DYLIB_CURRENT_VERSION = 1;
@@ -674,6 +676,7 @@
 		D59246631C117A55007F94C7 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				APPLICATION_EXTENSION_API_ONLY = YES;
 				CLANG_ENABLE_MODULES = YES;
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
@@ -693,6 +696,7 @@
 		D59246641C117A55007F94C7 /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				APPLICATION_EXTENSION_API_ONLY = YES;
 				CLANG_ENABLE_MODULES = YES;
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;

From af6472ea7f01f55727a1982c461b43c6e06606f0 Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Mon, 20 Jun 2016 21:25:25 +0200
Subject: [PATCH 030/112] Run Swift 2.3 convertor

---
 R.swift.Library.xcodeproj/project.pbxproj            | 12 ++++++++++++
 .../xcshareddata/xcschemes/Rswift-iOS.xcscheme       |  2 +-
 .../xcshareddata/xcschemes/Rswift-tvOS.xcscheme      |  2 +-
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj
index 6ffbac5..e51dcdf 100644
--- a/R.swift.Library.xcodeproj/project.pbxproj
+++ b/R.swift.Library.xcodeproj/project.pbxproj
@@ -356,15 +356,19 @@
 				TargetAttributes = {
 					806E69911C42BD9C00DE3A8B = {
 						CreatedOnToolsVersion = 7.2;
+						LastSwiftMigration = 0800;
 					};
 					806E699A1C42BD9C00DE3A8B = {
 						CreatedOnToolsVersion = 7.2;
+						LastSwiftMigration = 0800;
 					};
 					D592464D1C117A55007F94C7 = {
 						CreatedOnToolsVersion = 7.1.1;
+						LastSwiftMigration = 0800;
 					};
 					D59246571C117A55007F94C7 = {
 						CreatedOnToolsVersion = 7.1.1;
+						LastSwiftMigration = 0800;
 					};
 				};
 			};
@@ -534,6 +538,7 @@
 				PRODUCT_NAME = Rswift;
 				SDKROOT = appletvos;
 				SKIP_INSTALL = YES;
+				SWIFT_VERSION = 2.3;
 				TARGETED_DEVICE_FAMILY = 3;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
 			};
@@ -553,6 +558,7 @@
 				PRODUCT_NAME = Rswift;
 				SDKROOT = appletvos;
 				SKIP_INSTALL = YES;
+				SWIFT_VERSION = 2.3;
 				TARGETED_DEVICE_FAMILY = 3;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
 			};
@@ -566,6 +572,7 @@
 				PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SDKROOT = appletvos;
+				SWIFT_VERSION = 2.3;
 				TVOS_DEPLOYMENT_TARGET = 9.1;
 			};
 			name = Debug;
@@ -578,6 +585,7 @@
 				PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SDKROOT = appletvos;
+				SWIFT_VERSION = 2.3;
 				TVOS_DEPLOYMENT_TARGET = 9.1;
 			};
 			name = Release;
@@ -687,6 +695,7 @@
 				PRODUCT_NAME = Rswift;
 				SKIP_INSTALL = YES;
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+				SWIFT_VERSION = 2.3;
 			};
 			name = Debug;
 		};
@@ -705,6 +714,7 @@
 				PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.rswift.library;
 				PRODUCT_NAME = Rswift;
 				SKIP_INSTALL = YES;
+				SWIFT_VERSION = 2.3;
 			};
 			name = Release;
 		};
@@ -715,6 +725,7 @@
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests;
 				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_VERSION = 2.3;
 			};
 			name = Debug;
 		};
@@ -725,6 +736,7 @@
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests;
 				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_VERSION = 2.3;
 			};
 			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 d887ce4..34e8652 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 = "0710"
+   LastUpgradeVersion = "0800"
    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 4b966db..8d7a0be 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 = "0720"
+   LastUpgradeVersion = "0800"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

From 39aa538284ee43dce907ebe78cb3b7a56b7a844c Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Wed, 22 Jun 2016 21:17:01 +0200
Subject: [PATCH 031/112] Preparing for the 2.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 768e79d..512fb2a 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      = "2.1.0"
+  spec.version      = "2.2.0"
   spec.license      = "MIT"
 
   spec.summary      = "Companion library for R.swift, featuring types used to type resources"

From 326e89b5b60a866b5a32de0bc1ee8630c7cdf71a Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Wed, 22 Jun 2016 21:29:45 +0200
Subject: [PATCH 032/112] Fix incorrect quotes

---
 fastlane/Fastfile | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index edf84fe..3e7c4d2 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -1,15 +1,5 @@
 fastlane_version "1.86.0"
 
-desc "Tags a new version of R.swift.Library and releases it to cocoapods"
-desc " * GITHUB_API_TOKEN must be available in environment, create one on https://github.com/settings/tokens"
-desc "This lane should be run from your local machine, and will push a tag to the remote when finished."
-desc " * Verifies the git branch is clean"
-desc " * Ensures the lane is running on the master branch"
-desc " * Pulls the remote to verify the latest the branch is up to date"
-desc " * Asks for the new version number"
-desc " * Commit, tag and release library to cocoapods"
-desc "####Options"
-desc " * **`allow_dirty_branch`**: Allows the git branch to be dirty before continuing. Defaults to false"
 lane :release do |options|
   ensure_git_branch(branch: "master")
 
@@ -62,12 +52,12 @@ lane :release do |options|
   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}',
+    owner: "mac-cain13",
+    repository: "r.swift.library",
+    tag_name: "v#{newVersion}",
+    target_commitish: "master",
+    name: "#{newVersion}",
+    body: "#{changelog}",
     prerelease: isPrerelease
   )
 

From 05d89474908450ddcd3f330c8126d19f89312dc8 Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Mon, 11 Jul 2016 20:47:53 +0200
Subject: [PATCH 033/112] Add bundle to string resource

---
 Library/Core/StringResource.swift | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/Library/Core/StringResource.swift b/Library/Core/StringResource.swift
index 76e5e61..de9c070 100644
--- a/Library/Core/StringResource.swift
+++ b/Library/Core/StringResource.swift
@@ -16,6 +16,9 @@ public protocol StringResourceType {
   /// File in containing the string
   var tableName: String { get }
 
+  /// Bundle this string is in
+  var bundle: NSBundle { get }
+
   /// Locales of the a localizable string
   var locales: [String] { get }
 }
@@ -28,12 +31,16 @@ public struct StringResource: StringResourceType {
   /// File in containing the string
   public let tableName: String
 
+  /// Bundle this string is in
+  public let bundle: NSBundle
+
   /// Locales of the a localizable string
   public let locales: [String]
 
-  public init(key: String, tableName: String, locales: [String]) {
+  public init(key: String, tableName: String, bundle: NSBundle, locales: [String]) {
     self.key = key
     self.tableName = tableName
+    self.bundle = bundle
     self.locales = locales
   }
 }

From fe1785e0a89e8181a0b1d34ea6d0ec2bdd050934 Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Fri, 5 Aug 2016 12:45:45 +0200
Subject: [PATCH 034/112] Run Swift 3 conversion

---
 Library/Core/FileResource.swift               | 10 +++---
 Library/Core/ImageResource.swift              |  6 ++--
 Library/Core/NibResource.swift                |  2 +-
 Library/Core/StoryboardResource.swift         |  2 +-
 .../StoryboardSegueIdentifierProtocol.swift   |  2 +-
 Library/Core/Validatable.swift                |  2 +-
 ...source.swift => Bundle+FileResource.swift} | 10 +++---
 ...Resource.swift => Data+FileResource.swift} |  8 ++---
 Library/UIKit/NibResource+UIKit.swift         |  4 +--
 ...toryboardSegueInfo+UIStoryboardSegue.swift | 11 +++----
 ...llectionView+ReuseIdentifierProtocol.swift | 20 ++++++------
 Library/UIKit/UIImage+ImageResource.swift     |  2 +-
 ...ard+StoryboardViewControllerResource.swift |  4 +--
 .../UITableView+ReuseIdentifierProtocol.swift | 22 ++++++-------
 ...er+StoryboardSegueIdentifierProtocol.swift |  8 ++---
 LibraryTests/RswiftTests.swift                |  2 +-
 R.swift.Library.xcodeproj/project.pbxproj     | 32 +++++++++----------
 17 files changed, 73 insertions(+), 74 deletions(-)
 rename Library/Foundation/{NSBundle+FileResource.swift => Bundle+FileResource.swift} (74%)
 rename Library/Foundation/{NSData+FileResource.swift => Data+FileResource.swift} (75%)

diff --git a/Library/Core/FileResource.swift b/Library/Core/FileResource.swift
index ee30c9b..b13fe1c 100644
--- a/Library/Core/FileResource.swift
+++ b/Library/Core/FileResource.swift
@@ -11,7 +11,7 @@ import Foundation
 public protocol FileResourceType {
 
   /// Bundle this file is in
-  var bundle: NSBundle { get }
+  var bundle: Bundle { get }
 
   /// Name of the file file on disk
   var name: String { get }
@@ -23,7 +23,7 @@ public protocol FileResourceType {
 public extension FileResourceType {
   /// Name of the file on disk with the pathExtension
   var fullName: String {
-    return [name, pathExtension].joinWithSeparator(".")
+    return [name, pathExtension].joined(separator: ".")
   }
 
   /**
@@ -40,14 +40,14 @@ public extension FileResourceType {
 
    - returns: The file URL for this resource or nil if the file could not be located.
    */
-  func url() -> NSURL? {
+  func url() -> URL? {
     return bundle.URLForResource(self)
   }
 }
 
 public struct FileResource: FileResourceType {
   /// Bundle this file is in
-  public let bundle: NSBundle
+  public let bundle: Bundle
 
   /// Name of the file on disk, without the pathExtension
   public let name: String
@@ -55,7 +55,7 @@ public struct FileResource: FileResourceType {
   /// Extension of the file on disk
   public let pathExtension: String
 
-  public init(bundle: NSBundle, name: String, pathExtension: String) {
+  public init(bundle: Bundle, name: String, pathExtension: String) {
     self.bundle = bundle
     self.name = name
     self.pathExtension = pathExtension
diff --git a/Library/Core/ImageResource.swift b/Library/Core/ImageResource.swift
index 1c295d2..dc6aca1 100644
--- a/Library/Core/ImageResource.swift
+++ b/Library/Core/ImageResource.swift
@@ -11,7 +11,7 @@ import Foundation
 public protocol ImageResourceType {
 
   /// Bundle this image is in
-  var bundle: NSBundle { get }
+  var bundle: Bundle { get }
 
   /// Name of the image
   var name: String { get }
@@ -20,12 +20,12 @@ public protocol ImageResourceType {
 public struct ImageResource: ImageResourceType {
 
   /// Bundle this image is in
-  public let bundle: NSBundle
+  public let bundle: Bundle
 
   /// Name of the image
   public let name: String
 
-  public init(bundle: NSBundle, name: String) {
+  public init(bundle: Bundle, name: String) {
     self.bundle = bundle
     self.name = name
   }
diff --git a/Library/Core/NibResource.swift b/Library/Core/NibResource.swift
index b6d39fc..a0bd2a0 100644
--- a/Library/Core/NibResource.swift
+++ b/Library/Core/NibResource.swift
@@ -12,7 +12,7 @@ import Foundation
 public protocol NibResourceType {
 
   /// Bundle this nib is in or nil for main bundle
-  var bundle: NSBundle { get }
+  var bundle: Bundle { get }
 
   /// Name of the nib file on disk
   var name: String { get }
diff --git a/Library/Core/StoryboardResource.swift b/Library/Core/StoryboardResource.swift
index ae96351..e41f9dd 100644
--- a/Library/Core/StoryboardResource.swift
+++ b/Library/Core/StoryboardResource.swift
@@ -11,7 +11,7 @@ import Foundation
 public protocol StoryboardResourceType {
 
   /// Bundle this storyboard is in
-  var bundle: NSBundle { get }
+  var bundle: Bundle { get }
 
   /// Name of the storyboard file on disk
   var name: String { get }
diff --git a/Library/Core/StoryboardSegueIdentifierProtocol.swift b/Library/Core/StoryboardSegueIdentifierProtocol.swift
index 0d026b0..6066e44 100644
--- a/Library/Core/StoryboardSegueIdentifierProtocol.swift
+++ b/Library/Core/StoryboardSegueIdentifierProtocol.swift
@@ -44,7 +44,7 @@ public struct StoryboardSegueIdentifier<Segue, Source, Destination>: StoryboardS
   }
 
   /// Create a new StoryboardSegue based on the identifier and source view controller
-  public func storyboardSegueWithSource(sourceViewController: Source)
+  public func storyboardSegueWithSource(_ sourceViewController: Source)
     -> StoryboardSegue<Segue, Source, Destination>
   {
     return StoryboardSegue(identifier: self, sourceViewController: sourceViewController)
diff --git a/Library/Core/Validatable.swift b/Library/Core/Validatable.swift
index 764d486..0b23781 100644
--- a/Library/Core/Validatable.swift
+++ b/Library/Core/Validatable.swift
@@ -9,7 +9,7 @@
 import Foundation
 
 /// Error thrown during validation
-public struct ValidationError: ErrorType, CustomStringConvertible {
+public struct ValidationError: ErrorProtocol, CustomStringConvertible {
   /// Human readable description
   public let description: String
 
diff --git a/Library/Foundation/NSBundle+FileResource.swift b/Library/Foundation/Bundle+FileResource.swift
similarity index 74%
rename from Library/Foundation/NSBundle+FileResource.swift
rename to Library/Foundation/Bundle+FileResource.swift
index 64d9090..5d54468 100644
--- a/Library/Foundation/NSBundle+FileResource.swift
+++ b/Library/Foundation/Bundle+FileResource.swift
@@ -1,5 +1,5 @@
 //
-//  NSBundle+FileResource.swift
+//  Bundle+FileResource.swift
 //  R.swift.Library
 //
 //  Created by Mathijs Kadijk on 10-01-16.
@@ -8,7 +8,7 @@
 
 import Foundation
 
-public extension NSBundle {
+public extension Bundle {
   /**
    Returns the file URL for the given resource (R.file.*).
 
@@ -16,8 +16,8 @@ public extension NSBundle {
 
    - returns: The file URL for the resource file (R.file.*) or nil if the file could not be located.
    */
-  public func URLForResource(resource: FileResourceType) -> NSURL? {
-    return URLForResource(resource.name, withExtension: resource.pathExtension)
+  public func URLForResource(_ resource: FileResourceType) -> URL? {
+    return urlForResource(resource.name, withExtension: resource.pathExtension)
   }
 
   /**
@@ -27,7 +27,7 @@ public extension NSBundle {
 
    - returns: The full pathname for the resource file (R.file.*) or nil if the file could not be located.
    */
-  public func pathForResource(resource: FileResourceType) -> String? {
+  public func pathForResource(_ resource: FileResourceType) -> String? {
     return pathForResource(resource.name, ofType: resource.pathExtension)
   }
 }
diff --git a/Library/Foundation/NSData+FileResource.swift b/Library/Foundation/Data+FileResource.swift
similarity index 75%
rename from Library/Foundation/NSData+FileResource.swift
rename to Library/Foundation/Data+FileResource.swift
index 0aef3a4..d3f0f6d 100644
--- a/Library/Foundation/NSData+FileResource.swift
+++ b/Library/Foundation/Data+FileResource.swift
@@ -1,5 +1,5 @@
 //
-//  NSData+FileResource.swift
+//  Data+FileResource.swift
 //  R.swift.Library
 //
 //  Created by Tom Lokhorst on 2016-03-11.
@@ -8,7 +8,7 @@
 
 import Foundation
 
-public extension NSData {
+public extension Data {
 
   /**
    Creates and returns NSData with the contents of the specified file resource (R.file.*).
@@ -17,8 +17,8 @@ public extension NSData {
 
    - returns: A NSData object with the contents of the specified file.
    */
-  public convenience init?(resource: FileResourceType) {
+  public init?(resource: FileResourceType) throws {
     guard let url = resource.url() else { return nil }
-    self.init(contentsOfURL: url)
+    try self.init(contentsOf: url)
   }
 }
diff --git a/Library/UIKit/NibResource+UIKit.swift b/Library/UIKit/NibResource+UIKit.swift
index e6e22e7..eca9d9e 100644
--- a/Library/UIKit/NibResource+UIKit.swift
+++ b/Library/UIKit/NibResource+UIKit.swift
@@ -18,7 +18,7 @@ public extension NibResourceType {
 
    - returns: An array containing the top-level objects from the NIB
    */
-  public func instantiateWithOwner(ownerOrNil: AnyObject?, options optionsOrNil: [NSObject : AnyObject]? = nil) -> [AnyObject] {
-    return UINib(resource: self).instantiateWithOwner(ownerOrNil, options: optionsOrNil)
+  public func instantiateWithOwner(_ ownerOrNil: AnyObject?, options optionsOrNil: [NSObject : AnyObject]? = nil) -> [AnyObject] {
+    return UINib(resource: self).instantiate(withOwner: ownerOrNil, options: optionsOrNil)
   }
 }
diff --git a/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift b/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift
index aa5104b..cb97f65 100644
--- a/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift
+++ b/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift
@@ -17,12 +17,11 @@ extension TypedStoryboardSegueInfo {
   */
   public init?<SegueIdentifier: StoryboardSegueIdentifierType where SegueIdentifier.SegueType == Segue, SegueIdentifier.SourceType == Source, SegueIdentifier.DestinationType == Destination>(segueIdentifier: SegueIdentifier, segue: UIStoryboardSegue) {
     guard let identifier = segue.identifier,
-      sourceViewController = segue.sourceViewController as? SegueIdentifier.SourceType,
-      destinationViewController = segue.destinationViewController as? SegueIdentifier.DestinationType,
-      segue = segue as? SegueIdentifier.SegueType
-      where identifier == segueIdentifier.identifier
-      else {
-        return nil
+      let sourceViewController = segue.sourceViewController as? SegueIdentifier.SourceType,
+      let destinationViewController = segue.destinationViewController as? SegueIdentifier.DestinationType,
+      let segue = segue as? SegueIdentifier.SegueType, identifier == segueIdentifier.identifier
+    else {
+      return nil
     }
 
     self.segue = segue
diff --git a/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift b/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift
index 9362e0a..6c3f6dc 100644
--- a/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift
+++ b/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift
@@ -18,8 +18,8 @@ public extension UICollectionView {
    
    - returns: A subclass of UICollectionReusableView or nil if the cast fails.
   */
-  public func dequeueReusableCellWithReuseIdentifier<Identifier: ReuseIdentifierType where Identifier.ReusableType: UICollectionReusableView>(identifier: Identifier, forIndexPath indexPath: NSIndexPath) -> Identifier.ReusableType? {
-    return dequeueReusableCellWithReuseIdentifier(identifier.identifier, forIndexPath: indexPath) as? Identifier.ReusableType
+  public func dequeueReusableCellWithReuseIdentifier<Identifier: ReuseIdentifierType where Identifier.ReusableType: UICollectionReusableView>(_ identifier: Identifier, forIndexPath indexPath: IndexPath) -> Identifier.ReusableType? {
+    return dequeueReusableCell(withReuseIdentifier: identifier.identifier, for: indexPath) as? Identifier.ReusableType
   }
 
   /**
@@ -31,8 +31,8 @@ public extension UICollectionView {
    
    - returns: A subclass of UICollectionReusableView or nil if the cast fails.
   */
-  public func dequeueReusableSupplementaryViewOfKind<Identifier: ReuseIdentifierType where Identifier.ReusableType: UICollectionReusableView>(elementKind: String, withReuseIdentifier identifier: Identifier, forIndexPath indexPath: NSIndexPath) -> Identifier.ReusableType? {
-    return dequeueReusableSupplementaryViewOfKind(elementKind, withReuseIdentifier: identifier.identifier, forIndexPath: indexPath) as? Identifier.ReusableType
+  public func dequeueReusableSupplementaryViewOfKind<Identifier: ReuseIdentifierType where Identifier.ReusableType: UICollectionReusableView>(_ elementKind: String, withReuseIdentifier identifier: Identifier, forIndexPath indexPath: IndexPath) -> Identifier.ReusableType? {
+    return dequeueReusableSupplementaryView(ofKind: elementKind, withReuseIdentifier: identifier.identifier, for: indexPath) as? Identifier.ReusableType
   }
 
   /**
@@ -40,7 +40,7 @@ public extension UICollectionView {
 
    - parameter nibResources: An array of nib resources (R.nib.*) each containing a object of type UICollectionViewCell that has a reuse identifier
    */
-  public func registerNibs<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell>(nibResources: [Resource]) {
+  public func registerNibs<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell>(_ nibResources: [Resource]) {
     nibResources.forEach(registerNib)
   }
 
@@ -49,8 +49,8 @@ public extension UICollectionView {
 
    - parameter nibResource: A nib resource (R.nib.*) containing a object of type UICollectionViewCell that has a reuse identifier
    */
-  public func registerNib<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell>(nibResource: Resource) {
-    registerNib(UINib(resource: nibResource), forCellWithReuseIdentifier: nibResource.identifier)
+  public func registerNib<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell>(_ nibResource: Resource) {
+    register(UINib(resource: nibResource), forCellWithReuseIdentifier: nibResource.identifier)
   }
 
   /**
@@ -58,7 +58,7 @@ public extension UICollectionView {
 
    - parameter nibResources: An array of nib resources (R.nib.*) each containing a object of type UICollectionReusableView. that has a reuse identifier
    */
-  public func registerNibs<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView>(nibResources: [Resource], forSupplementaryViewOfKind kind: String) {
+  public func registerNibs<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView>(_ nibResources: [Resource], forSupplementaryViewOfKind kind: String) {
     nibResources.forEach { self.registerNib($0, forSupplementaryViewOfKind: kind) }
   }
 
@@ -67,7 +67,7 @@ public extension UICollectionView {
 
    - parameter nibResource: A nib resource (R.nib.*) containing a object of type UICollectionReusableView. that has a reuse identifier
    */
-  public func registerNib<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView>(nibResource: Resource, forSupplementaryViewOfKind kind: String) {
-    registerNib(UINib(resource: nibResource), forSupplementaryViewOfKind: kind, withReuseIdentifier: nibResource.identifier)
+  public func registerNib<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView>(_ nibResource: Resource, forSupplementaryViewOfKind kind: String) {
+    register(UINib(resource: nibResource), forSupplementaryViewOfKind: kind, withReuseIdentifier: nibResource.identifier)
   }
 }
diff --git a/Library/UIKit/UIImage+ImageResource.swift b/Library/UIKit/UIImage+ImageResource.swift
index cac64dc..cf92eae 100644
--- a/Library/UIKit/UIImage+ImageResource.swift
+++ b/Library/UIKit/UIImage+ImageResource.swift
@@ -18,6 +18,6 @@ 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, compatibleWithTraitCollection traitCollection: UITraitCollection? = nil) {
-    self.init(named: resource.name, inBundle: resource.bundle, compatibleWithTraitCollection: traitCollection)
+    self.init(named: resource.name, in: resource.bundle, compatibleWith: traitCollection)
   }
 }
diff --git a/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift b/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift
index ac754ed..e04e001 100644
--- a/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift
+++ b/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift
@@ -17,7 +17,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>(resource: ViewControllerResource) -> ViewControllerResource.ViewControllerType?  {
-    return instantiateViewControllerWithIdentifier(resource.identifier) as? ViewControllerResource.ViewControllerType
+  public func instantiateViewController<ViewControllerResource: StoryboardViewControllerResourceType>(_ 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 5516973..b436a10 100644
--- a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
+++ b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
@@ -20,8 +20,8 @@ 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 dequeueReusableCellWithIdentifier<Identifier: ReuseIdentifierType where Identifier.ReusableType: UITableViewCell>(identifier: Identifier, forIndexPath indexPath: NSIndexPath) -> Identifier.ReusableType? {
-    return dequeueReusableCellWithIdentifier(identifier.identifier, forIndexPath: indexPath) as? Identifier.ReusableType
+  public func dequeueReusableCellWithIdentifier<Identifier: ReuseIdentifierType where Identifier.ReusableType: UITableViewCell>(_ identifier: Identifier, forIndexPath indexPath: IndexPath) -> Identifier.ReusableType? {
+    return dequeueReusableCell(withIdentifier: identifier.identifier, for: indexPath) as? Identifier.ReusableType
   }
 
   /**
@@ -33,8 +33,8 @@ 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 dequeueReusableCellWithIdentifier<Identifier: ReuseIdentifierType where Identifier.ReusableType: UITableViewCell>(identifier: Identifier) -> Identifier.ReusableType? {
-    return dequeueReusableCellWithIdentifier(identifier.identifier) as? Identifier.ReusableType
+  public func dequeueReusableCellWithIdentifier<Identifier: ReuseIdentifierType where Identifier.ReusableType: UITableViewCell>(_ identifier: Identifier) -> Identifier.ReusableType? {
+    return dequeueReusableCell(withIdentifier: identifier.identifier) as? Identifier.ReusableType
   }
 
   /**
@@ -44,8 +44,8 @@ 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 dequeueReusableHeaderFooterViewWithIdentifier<Identifier: ReuseIdentifierType where Identifier.ReusableType: UITableViewHeaderFooterView>(identifier: Identifier) -> Identifier.ReusableType? {
-    return dequeueReusableHeaderFooterViewWithIdentifier(identifier.identifier) as? Identifier.ReusableType
+  public func dequeueReusableHeaderFooterViewWithIdentifier<Identifier: ReuseIdentifierType where Identifier.ReusableType: UITableViewHeaderFooterView>(_ identifier: Identifier) -> Identifier.ReusableType? {
+    return dequeueReusableHeaderFooterView(withIdentifier: identifier.identifier) as? Identifier.ReusableType
   }
 
   /**
@@ -53,7 +53,7 @@ public extension UITableView {
 
    - parameter nibResources: Array of nib resources (R.nib.*) each containing a table view cell that has a reuse identifier
    */
-  public func registerNibs<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell>(nibResources: [Resource]) {
+  public func registerNibs<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell>(_ nibResources: [Resource]) {
     nibResources.forEach(registerNib)
   }
 
@@ -62,8 +62,8 @@ public extension UITableView {
    
    - parameter nibResource: A nib resource (R.nib.*) containing a table view cell that has a reuse identifier
   */
-  public func registerNib<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell>(nibResource: Resource) {
-    registerNib(UINib(resource: nibResource), forCellReuseIdentifier: nibResource.identifier)
+  public func registerNib<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell>(_ nibResource: Resource) {
+    register(UINib(resource: nibResource), forCellReuseIdentifier: nibResource.identifier)
   }
 
   /**
@@ -71,7 +71,7 @@ public extension UITableView {
 
    - parameter nibResource: A nib resource (R.nib.*) containing a view that has a reuse identifier
    */
-  public func registerNibForHeaderFooterView<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UIView>(nibResource: Resource) {
-    registerNib(UINib(resource: nibResource), forHeaderFooterViewReuseIdentifier: nibResource.identifier)
+  public func registerNibForHeaderFooterView<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UIView>(_ nibResource: Resource) {
+    register(UINib(resource: nibResource), forHeaderFooterViewReuseIdentifier: nibResource.identifier)
   }
 }
diff --git a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
index f17f9b3..8b93dd6 100644
--- a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
+++ b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
@@ -10,7 +10,7 @@ import Foundation
 import UIKit
 
 public protocol SeguePerformerType {
-  func performSegueWithIdentifier(identifier: String, sender: AnyObject?)
+  func performSegueWithIdentifier(_ identifier: String, sender: AnyObject?)
 }
 
 extension UIViewController: SeguePerformerType { }
@@ -23,7 +23,7 @@ public extension SeguePerformerType {
    - SeeAlso: Library for typed block based segues: [tomlokhorst/SegueManager](https://github.com/tomlokhorst/SegueManager)
    */
   public func performSegueWithIdentifier<Segue, Destination>(
-    identifier: StoryboardSegueIdentifier<Segue, Self, Destination>,
+    _ identifier: StoryboardSegueIdentifier<Segue, Self, Destination>,
     sender: AnyObject?) {
     performSegueWithIdentifier(identifier.identifier, sender: sender)
   }
@@ -34,7 +34,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: AnyObject? = nil) {
-    sourceViewController.performSegueWithIdentifier(identifier.identifier, sender: sender)
+  public func performSegue(_ sender: AnyObject? = nil) {
+    sourceViewController.performSegue(withIdentifier: identifier.identifier, sender: sender)
   }
 }
diff --git a/LibraryTests/RswiftTests.swift b/LibraryTests/RswiftTests.swift
index 899ff73..d7e734e 100644
--- a/LibraryTests/RswiftTests.swift
+++ b/LibraryTests/RswiftTests.swift
@@ -28,7 +28,7 @@ class RswiftTests: XCTestCase {
     
     func testPerformanceExample() {
         // This is an example of a performance test case.
-        self.measureBlock {
+        self.measure {
             // Put the code you want to measure the time of here.
         }
     }
diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj
index 33a65af..3d7cda0 100644
--- a/R.swift.Library.xcodeproj/project.pbxproj
+++ b/R.swift.Library.xcodeproj/project.pbxproj
@@ -31,7 +31,7 @@
 		D51335291C95A79B0014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51335281C95A79B0014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift */; };
 		D513352A1C95B7510014C9D4 /* StoryboardViewControllerResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51335261C959DF20014C9D4 /* StoryboardViewControllerResource.swift */; };
 		D513352B1C95B7620014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51335281C95A79B0014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift */; };
-		D513352C1C95C61E0014C9D4 /* NSData+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20F34A61C92B44100338F81 /* NSData+FileResource.swift */; };
+		D513352C1C95C61E0014C9D4 /* Data+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20F34A61C92B44100338F81 /* Data+FileResource.swift */; };
 		D53F19241C229D7200AE2FAD /* Validatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53F19231C229D7200AE2FAD /* Validatable.swift */; };
 		D543F9BB1C1497EB00D16A0C /* Identifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = D543F9BA1C1497EB00D16A0C /* Identifier.swift */; };
 		D543F9BD1C14980600D16A0C /* ReuseIdentifierProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D543F9BC1C14980600D16A0C /* ReuseIdentifierProtocol.swift */; };
@@ -45,9 +45,9 @@
 		D553F5851C44157000885232 /* ImageResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D553F5841C44157000885232 /* ImageResource.swift */; };
 		D553F5871C44170E00885232 /* UIImage+ImageResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D553F5861C44170E00885232 /* UIImage+ImageResource.swift */; };
 		D5588CAB1C3F9DBE00912F97 /* UINib+NibResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5588CAA1C3F9DBE00912F97 /* UINib+NibResource.swift */; };
-		D56DC7731C42B65C00623437 /* NSBundle+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D56DC7721C42B65C00623437 /* NSBundle+FileResource.swift */; };
+		D56DC7731C42B65C00623437 /* Bundle+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D56DC7721C42B65C00623437 /* Bundle+FileResource.swift */; };
 		D5728B311C4D541200E38168 /* ImageResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D553F5841C44157000885232 /* ImageResource.swift */; };
-		D5728B321C4D541500E38168 /* NSBundle+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D56DC7721C42B65C00623437 /* NSBundle+FileResource.swift */; };
+		D5728B321C4D541500E38168 /* Bundle+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D56DC7721C42B65C00623437 /* Bundle+FileResource.swift */; };
 		D5728B331C4D541D00E38168 /* UIImage+ImageResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D553F5861C44170E00885232 /* UIImage+ImageResource.swift */; };
 		D5728B341C4D542300E38168 /* Rswift.h in Headers */ = {isa = PBXBuildFile; fileRef = D59246511C117A55007F94C7 /* Rswift.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		D57E1EB31C3D762300DDA68F /* FontResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D57E1EB21C3D762300DDA68F /* FontResource.swift */; };
@@ -60,7 +60,7 @@
 		D592465E1C117A55007F94C7 /* RswiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D592465D1C117A55007F94C7 /* RswiftTests.swift */; };
 		D5E435A91C3CFB460091090C /* NibResource+UIKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E435A81C3CFB460091090C /* NibResource+UIKit.swift */; };
 		D5E435AD1C3D00770091090C /* FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E435AC1C3D00770091090C /* FileResource.swift */; };
-		E20F34A71C92B44100338F81 /* NSData+FileResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20F34A61C92B44100338F81 /* NSData+FileResource.swift */; };
+		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 */; };
@@ -104,7 +104,7 @@
 		D553F5841C44157000885232 /* ImageResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageResource.swift; sourceTree = "<group>"; };
 		D553F5861C44170E00885232 /* UIImage+ImageResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+ImageResource.swift"; sourceTree = "<group>"; };
 		D5588CAA1C3F9DBE00912F97 /* UINib+NibResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UINib+NibResource.swift"; sourceTree = "<group>"; };
-		D56DC7721C42B65C00623437 /* NSBundle+FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSBundle+FileResource.swift"; sourceTree = "<group>"; };
+		D56DC7721C42B65C00623437 /* Bundle+FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Bundle+FileResource.swift"; sourceTree = "<group>"; };
 		D57E1EB21C3D762300DDA68F /* FontResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FontResource.swift; sourceTree = "<group>"; };
 		D57E1EB41C3D774000DDA68F /* UIFont+FontResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIFont+FontResource.swift"; sourceTree = "<group>"; };
 		D57E1EB61C3E482A00DDA68F /* StoryboardResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardResource.swift; sourceTree = "<group>"; };
@@ -118,7 +118,7 @@
 		D592465F1C117A55007F94C7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		D5E435A81C3CFB460091090C /* NibResource+UIKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NibResource+UIKit.swift"; sourceTree = "<group>"; };
 		D5E435AC1C3D00770091090C /* FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileResource.swift; sourceTree = "<group>"; };
-		E20F34A61C92B44100338F81 /* NSData+FileResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSData+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>"; };
@@ -200,8 +200,8 @@
 		D56DC7711C42B62E00623437 /* Foundation */ = {
 			isa = PBXGroup;
 			children = (
-				D56DC7721C42B65C00623437 /* NSBundle+FileResource.swift */,
-				E20F34A61C92B44100338F81 /* NSData+FileResource.swift */,
+				D56DC7721C42B65C00623437 /* Bundle+FileResource.swift */,
+				E20F34A61C92B44100338F81 /* Data+FileResource.swift */,
 			);
 			path = Foundation;
 			sourceTree = "<group>";
@@ -430,7 +430,7 @@
 			files = (
 				D5728B311C4D541200E38168 /* ImageResource.swift in Sources */,
 				D513352B1C95B7620014C9D4 /* UIStoryboard+StoryboardViewControllerResource.swift in Sources */,
-				D513352C1C95C61E0014C9D4 /* NSData+FileResource.swift in Sources */,
+				D513352C1C95C61E0014C9D4 /* Data+FileResource.swift in Sources */,
 				806E69AD1C42BDDA00DE3A8B /* ReuseIdentifierProtocol.swift in Sources */,
 				806E69B61C42BDE000DE3A8B /* UINib+NibResource.swift in Sources */,
 				806E69AA1C42BDDA00DE3A8B /* FontResource.swift in Sources */,
@@ -450,7 +450,7 @@
 				806E69B01C42BDDA00DE3A8B /* Validatable.swift in Sources */,
 				806E69B31C42BDE000DE3A8B /* TypedStoryboardSegueInfo+UIStoryboardSegue.swift in Sources */,
 				E250BE991CCBF7E900CC71DE /* StringResource.swift in Sources */,
-				D5728B321C4D541500E38168 /* NSBundle+FileResource.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 */,
@@ -481,7 +481,7 @@
 				D543F9BD1C14980600D16A0C /* ReuseIdentifierProtocol.swift in Sources */,
 				D543F9C11C14984300D16A0C /* NibResource.swift in Sources */,
 				D553F5851C44157000885232 /* ImageResource.swift in Sources */,
-				E20F34A71C92B44100338F81 /* NSData+FileResource.swift in Sources */,
+				E20F34A71C92B44100338F81 /* Data+FileResource.swift in Sources */,
 				D57E1EB51C3D774000DDA68F /* UIFont+FontResource.swift in Sources */,
 				D5588CAB1C3F9DBE00912F97 /* UINib+NibResource.swift in Sources */,
 				D553F5871C44170E00885232 /* UIImage+ImageResource.swift in Sources */,
@@ -495,7 +495,7 @@
 				D543F9CF1C149C0A00D16A0C /* TypedStoryboardSegueInfo+UIStoryboardSegue.swift in Sources */,
 				E250BE941CCBCEB100CC71DE /* ColorResource+UIKit.swift in Sources */,
 				D543F9C41C1498FB00D16A0C /* UITableView+ReuseIdentifierProtocol.swift in Sources */,
-				D56DC7731C42B65C00623437 /* NSBundle+FileResource.swift in Sources */,
+				D56DC7731C42B65C00623437 /* Bundle+FileResource.swift in Sources */,
 				D53F19241C229D7200AE2FAD /* Validatable.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -698,7 +698,7 @@
 				PRODUCT_NAME = Rswift;
 				SKIP_INSTALL = YES;
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
-				SWIFT_VERSION = 2.3;
+				SWIFT_VERSION = 3.0;
 			};
 			name = Debug;
 		};
@@ -718,7 +718,7 @@
 				PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.rswift.library;
 				PRODUCT_NAME = Rswift;
 				SKIP_INSTALL = YES;
-				SWIFT_VERSION = 2.3;
+				SWIFT_VERSION = 3.0;
 			};
 			name = Release;
 		};
@@ -729,7 +729,7 @@
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests;
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				SWIFT_VERSION = 2.3;
+				SWIFT_VERSION = 3.0;
 			};
 			name = Debug;
 		};
@@ -740,7 +740,7 @@
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests;
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				SWIFT_VERSION = 2.3;
+				SWIFT_VERSION = 3.0;
 			};
 			name = Release;
 		};

From e6f4575580bc196cbe8e7d62ad0526740c554a25 Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Fri, 5 Aug 2016 13:27:17 +0200
Subject: [PATCH 035/112] Rename to more Swiftier names

---
 Library/Core/FileResource.swift                  |  2 +-
 .../Core/StoryboardSegueIdentifierProtocol.swift |  2 +-
 .../Core/StoryboardViewControllerResource.swift  |  1 -
 Library/Foundation/Bundle+FileResource.swift     |  2 +-
 Library/UIKit/NibResource+UIKit.swift            |  2 +-
 ...edStoryboardSegueInfo+UIStoryboardSegue.swift |  3 ++-
 ...ICollectionView+ReuseIdentifierProtocol.swift | 16 ++++++++--------
 Library/UIKit/UIImage+ImageResource.swift        |  2 +-
 ...yboard+StoryboardViewControllerResource.swift |  2 +-
 .../UITableView+ReuseIdentifierProtocol.swift    | 14 +++++++-------
 ...oller+StoryboardSegueIdentifierProtocol.swift | 10 +++++-----
 11 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/Library/Core/FileResource.swift b/Library/Core/FileResource.swift
index b13fe1c..554b70e 100644
--- a/Library/Core/FileResource.swift
+++ b/Library/Core/FileResource.swift
@@ -41,7 +41,7 @@ public extension FileResourceType {
    - returns: The file URL for this resource or nil if the file could not be located.
    */
   func url() -> URL? {
-    return bundle.URLForResource(self)
+    return bundle.urlForResource(self)
   }
 }
 
diff --git a/Library/Core/StoryboardSegueIdentifierProtocol.swift b/Library/Core/StoryboardSegueIdentifierProtocol.swift
index 6066e44..76e2d7a 100644
--- a/Library/Core/StoryboardSegueIdentifierProtocol.swift
+++ b/Library/Core/StoryboardSegueIdentifierProtocol.swift
@@ -44,7 +44,7 @@ public struct StoryboardSegueIdentifier<Segue, Source, Destination>: StoryboardS
   }
 
   /// Create a new StoryboardSegue based on the identifier and source view controller
-  public func storyboardSegueWithSource(_ sourceViewController: Source)
+  public func storyboardSegue(withSource sourceViewController: Source)
     -> StoryboardSegue<Segue, Source, Destination>
   {
     return StoryboardSegue(identifier: self, sourceViewController: sourceViewController)
diff --git a/Library/Core/StoryboardViewControllerResource.swift b/Library/Core/StoryboardViewControllerResource.swift
index 3cb45ef..784ea3f 100644
--- a/Library/Core/StoryboardViewControllerResource.swift
+++ b/Library/Core/StoryboardViewControllerResource.swift
@@ -22,4 +22,3 @@ public struct StoryboardViewControllerResource<ViewController>: StoryboardViewCo
     self.identifier = identifier
   }
 }
-
diff --git a/Library/Foundation/Bundle+FileResource.swift b/Library/Foundation/Bundle+FileResource.swift
index 5d54468..f1a07e7 100644
--- a/Library/Foundation/Bundle+FileResource.swift
+++ b/Library/Foundation/Bundle+FileResource.swift
@@ -16,7 +16,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 URLForResource(_ resource: FileResourceType) -> URL? {
+  public func urlForResource(_ resource: FileResourceType) -> URL? {
     return urlForResource(resource.name, withExtension: resource.pathExtension)
   }
 
diff --git a/Library/UIKit/NibResource+UIKit.swift b/Library/UIKit/NibResource+UIKit.swift
index eca9d9e..3f55854 100644
--- a/Library/UIKit/NibResource+UIKit.swift
+++ b/Library/UIKit/NibResource+UIKit.swift
@@ -18,7 +18,7 @@ public extension NibResourceType {
 
    - returns: An array containing the top-level objects from the NIB
    */
-  public func instantiateWithOwner(_ ownerOrNil: AnyObject?, options optionsOrNil: [NSObject : AnyObject]? = nil) -> [AnyObject] {
+  public func instantiate(withOwner ownerOrNil: AnyObject?, options optionsOrNil: [NSObject : AnyObject]? = [:]) -> [AnyObject] {
     return UINib(resource: self).instantiate(withOwner: ownerOrNil, options: optionsOrNil)
   }
 }
diff --git a/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift b/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift
index cb97f65..abe8c15 100644
--- a/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift
+++ b/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift
@@ -15,7 +15,8 @@ extension TypedStoryboardSegueInfo {
    
    - returns: A newly initialized TypedStoryboardSegueInfo object or nil.
   */
-  public init?<SegueIdentifier: StoryboardSegueIdentifierType where SegueIdentifier.SegueType == Segue, SegueIdentifier.SourceType == Source, SegueIdentifier.DestinationType == Destination>(segueIdentifier: SegueIdentifier, segue: UIStoryboardSegue) {
+  public init?<SegueIdentifier: StoryboardSegueIdentifierType where SegueIdentifier.SegueType == Segue, SegueIdentifier.SourceType == Source, SegueIdentifier.DestinationType == Destination>(segueIdentifier: SegueIdentifier, segue: UIStoryboardSegue)
+  {
     guard let identifier = segue.identifier,
       let sourceViewController = segue.sourceViewController as? SegueIdentifier.SourceType,
       let destinationViewController = segue.destinationViewController as? SegueIdentifier.DestinationType,
diff --git a/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift b/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift
index 6c3f6dc..9bfc81a 100644
--- a/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift
+++ b/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift
@@ -18,7 +18,7 @@ public extension UICollectionView {
    
    - returns: A subclass of UICollectionReusableView or nil if the cast fails.
   */
-  public func dequeueReusableCellWithReuseIdentifier<Identifier: ReuseIdentifierType where Identifier.ReusableType: UICollectionReusableView>(_ identifier: Identifier, forIndexPath indexPath: IndexPath) -> Identifier.ReusableType? {
+  public func dequeueReusableCell<Identifier: ReuseIdentifierType where Identifier.ReusableType: UICollectionReusableView>(withReuseIdentifier identifier: Identifier, for indexPath: IndexPath) -> Identifier.ReusableType? {
     return dequeueReusableCell(withReuseIdentifier: identifier.identifier, for: indexPath) as? Identifier.ReusableType
   }
 
@@ -31,7 +31,7 @@ public extension UICollectionView {
    
    - returns: A subclass of UICollectionReusableView or nil if the cast fails.
   */
-  public func dequeueReusableSupplementaryViewOfKind<Identifier: ReuseIdentifierType where Identifier.ReusableType: UICollectionReusableView>(_ elementKind: String, withReuseIdentifier identifier: Identifier, forIndexPath indexPath: IndexPath) -> Identifier.ReusableType? {
+  public func dequeueReusableSupplementaryView<Identifier: ReuseIdentifierType where Identifier.ReusableType: UICollectionReusableView>(ofKind elementKind: String, withReuseIdentifier identifier: Identifier, for indexPath: IndexPath) -> Identifier.ReusableType? {
     return dequeueReusableSupplementaryView(ofKind: elementKind, withReuseIdentifier: identifier.identifier, for: indexPath) as? Identifier.ReusableType
   }
 
@@ -40,8 +40,8 @@ public extension UICollectionView {
 
    - parameter nibResources: An array of nib resources (R.nib.*) each containing a object of type UICollectionViewCell that has a reuse identifier
    */
-  public func registerNibs<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell>(_ nibResources: [Resource]) {
-    nibResources.forEach(registerNib)
+  public func register<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell>(_ nibResources: [Resource]) {
+    nibResources.forEach(register)
   }
 
   /**
@@ -49,7 +49,7 @@ public extension UICollectionView {
 
    - parameter nibResource: A nib resource (R.nib.*) containing a object of type UICollectionViewCell that has a reuse identifier
    */
-  public func registerNib<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell>(_ nibResource: Resource) {
+  public func register<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell>(_ nibResource: Resource) {
     register(UINib(resource: nibResource), forCellWithReuseIdentifier: nibResource.identifier)
   }
 
@@ -58,8 +58,8 @@ public extension UICollectionView {
 
    - parameter nibResources: An array of nib resources (R.nib.*) each containing a object of type UICollectionReusableView. that has a reuse identifier
    */
-  public func registerNibs<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView>(_ nibResources: [Resource], forSupplementaryViewOfKind kind: String) {
-    nibResources.forEach { self.registerNib($0, forSupplementaryViewOfKind: kind) }
+  public func register<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView>(_ nibResources: [Resource], forSupplementaryViewOfKind kind: String) {
+    nibResources.forEach { self.register($0, forSupplementaryViewOfKind: kind) }
   }
 
   /**
@@ -67,7 +67,7 @@ public extension UICollectionView {
 
    - parameter nibResource: A nib resource (R.nib.*) containing a object of type UICollectionReusableView. that has a reuse identifier
    */
-  public func registerNib<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView>(_ nibResource: Resource, forSupplementaryViewOfKind kind: String) {
+  public func register<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView>(_ nibResource: Resource, forSupplementaryViewOfKind kind: String) {
     register(UINib(resource: nibResource), forSupplementaryViewOfKind: kind, withReuseIdentifier: nibResource.identifier)
   }
 }
diff --git a/Library/UIKit/UIImage+ImageResource.swift b/Library/UIKit/UIImage+ImageResource.swift
index cf92eae..947f757 100644
--- a/Library/UIKit/UIImage+ImageResource.swift
+++ b/Library/UIKit/UIImage+ImageResource.swift
@@ -17,7 +17,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, compatibleWithTraitCollection traitCollection: UITraitCollection? = nil) {
+  public convenience init?(resource: ImageResourceType, compatibleWith traitCollection: UITraitCollection? = nil) {
     self.init(named: resource.name, in: resource.bundle, compatibleWith: traitCollection)
   }
 }
diff --git a/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift b/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift
index e04e001..e8627f8 100644
--- a/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift
+++ b/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift
@@ -17,7 +17,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>(_ resource: ViewControllerResource) -> ViewControllerResource.ViewControllerType?  {
+  public 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 b436a10..320ffd8 100644
--- a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
+++ b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
@@ -20,7 +20,7 @@ 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 dequeueReusableCellWithIdentifier<Identifier: ReuseIdentifierType where Identifier.ReusableType: UITableViewCell>(_ identifier: Identifier, forIndexPath indexPath: IndexPath) -> Identifier.ReusableType? {
+  public func dequeueReusableCell<Identifier: ReuseIdentifierType where Identifier.ReusableType: UITableViewCell>(withIdentifier identifier: Identifier, for indexPath: IndexPath) -> Identifier.ReusableType? {
     return dequeueReusableCell(withIdentifier: identifier.identifier, for: indexPath) as? Identifier.ReusableType
   }
 
@@ -33,7 +33,7 @@ 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 dequeueReusableCellWithIdentifier<Identifier: ReuseIdentifierType where Identifier.ReusableType: UITableViewCell>(_ identifier: Identifier) -> Identifier.ReusableType? {
+  public func dequeueReusableCell<Identifier: ReuseIdentifierType where Identifier.ReusableType: UITableViewCell>(withIdentifier identifier: Identifier) -> Identifier.ReusableType? {
     return dequeueReusableCell(withIdentifier: identifier.identifier) as? Identifier.ReusableType
   }
 
@@ -44,7 +44,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 dequeueReusableHeaderFooterViewWithIdentifier<Identifier: ReuseIdentifierType where Identifier.ReusableType: UITableViewHeaderFooterView>(_ identifier: Identifier) -> Identifier.ReusableType? {
+  public func dequeueReusableHeaderFooterView<Identifier: ReuseIdentifierType where Identifier.ReusableType: UITableViewHeaderFooterView>(withIdentifier identifier: Identifier) -> Identifier.ReusableType? {
     return dequeueReusableHeaderFooterView(withIdentifier: identifier.identifier) as? Identifier.ReusableType
   }
 
@@ -53,8 +53,8 @@ public extension UITableView {
 
    - parameter nibResources: Array of nib resources (R.nib.*) each containing a table view cell that has a reuse identifier
    */
-  public func registerNibs<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell>(_ nibResources: [Resource]) {
-    nibResources.forEach(registerNib)
+  public func register<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell>(_ nibResources: [Resource]) {
+    nibResources.forEach(register)
   }
 
   /**
@@ -62,7 +62,7 @@ public extension UITableView {
    
    - parameter nibResource: A nib resource (R.nib.*) containing a table view cell that has a reuse identifier
   */
-  public func registerNib<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell>(_ nibResource: Resource) {
+  public func register<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell>(_ nibResource: Resource) {
     register(UINib(resource: nibResource), forCellReuseIdentifier: nibResource.identifier)
   }
 
@@ -71,7 +71,7 @@ public extension UITableView {
 
    - parameter nibResource: A nib resource (R.nib.*) containing a view that has a reuse identifier
    */
-  public func registerNibForHeaderFooterView<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UIView>(_ nibResource: Resource) {
+  public func registerHeaderFooterView<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UIView>(_ nibResource: Resource) {
     register(UINib(resource: nibResource), forHeaderFooterViewReuseIdentifier: nibResource.identifier)
   }
 }
diff --git a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
index 8b93dd6..ff50393 100644
--- a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
+++ b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
@@ -10,7 +10,7 @@ import Foundation
 import UIKit
 
 public protocol SeguePerformerType {
-  func performSegueWithIdentifier(_ identifier: String, sender: AnyObject?)
+  func performSegue(withIdentifier identifier: String, sender: AnyObject?)
 }
 
 extension UIViewController: SeguePerformerType { }
@@ -22,10 +22,10 @@ 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 performSegueWithIdentifier<Segue, Destination>(
-    _ identifier: StoryboardSegueIdentifier<Segue, Self, Destination>,
+  public func performSegue<Segue, Destination>(
+    withIdentifier identifier: StoryboardSegueIdentifier<Segue, Self, Destination>,
     sender: AnyObject?) {
-    performSegueWithIdentifier(identifier.identifier, sender: sender)
+    performSegue(withIdentifier: identifier.identifier, sender: sender)
   }
 }
 
@@ -34,7 +34,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: AnyObject? = nil) {
+  public func performSegue(sender: AnyObject? = nil) {
     sourceViewController.performSegue(withIdentifier: identifier.identifier, sender: sender)
   }
 }

From 4820695a6a5bfd5865f6f136425a19e1bac8762a Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Fri, 5 Aug 2016 13:45:19 +0200
Subject: [PATCH 036/112] Rename initialViewController to
 instantiateInitialViewController

---
 .../UIKit/StoryboardResourceWithInitialController+UIKit.swift   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift b/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift
index c6e7cfa..3fb525c 100644
--- a/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift
+++ b/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift
@@ -15,7 +15,7 @@ public extension StoryboardResourceWithInitialControllerType {
 
    - returns: The initial view controller in the storyboard.
    */
-  public func initialViewController() -> InitialController? {
+  public func instantiateInitialViewController() -> InitialController? {
     return UIStoryboard(resource: self).instantiateInitialViewController() as? InitialController
   }
 }

From e67f6fc1c34444ccfba024df4be2f9e081e13ed5 Mon Sep 17 00:00:00 2001
From: Nolan Waite <nolan@nolanw.ca>
Date: Mon, 8 Aug 2016 20:53:01 -0300
Subject: [PATCH 037/112] Add a comment property to StringResource

---
 Library/Core/StringResource.swift | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/Library/Core/StringResource.swift b/Library/Core/StringResource.swift
index 76e5e61..fc49ee1 100644
--- a/Library/Core/StringResource.swift
+++ b/Library/Core/StringResource.swift
@@ -18,6 +18,9 @@ public protocol StringResourceType {
 
   /// Locales of the a localizable string
   var locales: [String] { get }
+  
+  /// Comment directly before and/or after the string, if any
+  var comment: String? { get }
 }
 
 public struct StringResource: StringResourceType {
@@ -30,10 +33,14 @@ public struct StringResource: StringResourceType {
 
   /// Locales of the a localizable string
   public let locales: [String]
+  
+  /// Comment directly before and/or after the string, if any
+  public let comment: String?
 
-  public init(key: String, tableName: String, locales: [String]) {
+  public init(key: String, tableName: String, locales: [String], comment: String?) {
     self.key = key
     self.tableName = tableName
     self.locales = locales
+    self.comment = comment
   }
 }

From a039751963d5fa32e868579b1e8400bd60e39569 Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Fri, 12 Aug 2016 14:28:26 +0200
Subject: [PATCH 038/112] Updates for Xcode 8 beta 5

---
 Library/Core/FileResource.swift                    |  4 ++--
 .../Core/StoryboardSegueIdentifierProtocol.swift   | 14 +++++++-------
 Library/Core/Validatable.swift                     |  2 +-
 Library/Foundation/Bundle+FileResource.swift       |  8 ++++----
 ...ypedStoryboardSegueInfo+UIStoryboardSegue.swift |  8 ++++----
 ...troller+StoryboardSegueIdentifierProtocol.swift |  2 +-
 6 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/Library/Core/FileResource.swift b/Library/Core/FileResource.swift
index 554b70e..8b560fe 100644
--- a/Library/Core/FileResource.swift
+++ b/Library/Core/FileResource.swift
@@ -32,7 +32,7 @@ public extension FileResourceType {
    - returns: The full pathname for this resource or nil if the file could not be located.
    */
   func path() -> String? {
-    return bundle.pathForResource(self)
+    return bundle.path(forResource: self)
   }
 
   /**
@@ -41,7 +41,7 @@ public extension FileResourceType {
    - returns: The file URL for this resource or nil if the file could not be located.
    */
   func url() -> URL? {
-    return bundle.urlForResource(self)
+    return bundle.url(forResource: self)
   }
 }
 
diff --git a/Library/Core/StoryboardSegueIdentifierProtocol.swift b/Library/Core/StoryboardSegueIdentifierProtocol.swift
index 76e2d7a..3404cdd 100644
--- a/Library/Core/StoryboardSegueIdentifierProtocol.swift
+++ b/Library/Core/StoryboardSegueIdentifierProtocol.swift
@@ -44,10 +44,10 @@ public struct StoryboardSegueIdentifier<Segue, Source, Destination>: StoryboardS
   }
 
   /// Create a new StoryboardSegue based on the identifier and source view controller
-  public func storyboardSegue(withSource sourceViewController: Source)
+  public func storyboardSegue(withSource source: Source)
     -> StoryboardSegue<Segue, Source, Destination>
   {
-    return StoryboardSegue(identifier: self, sourceViewController: sourceViewController)
+    return StoryboardSegue(identifier: self, source: source)
   }
 }
 
@@ -63,7 +63,7 @@ public struct TypedStoryboardSegueInfo<Segue, Source, Destination>: StoryboardSe
   public typealias DestinationType = Destination
 
   /// Segue destination view controller
-  public let destinationViewController: Destination
+  public let destination: Destination
 
   /// Segue identifier
   public let identifier: String
@@ -72,7 +72,7 @@ public struct TypedStoryboardSegueInfo<Segue, Source, Destination>: StoryboardSe
   public let segue: Segue
 
   /// Segue source view controller
-  public let sourceViewController: Source
+  public let source: Source
 }
 
 /// Segue with identifier and source view controller
@@ -81,15 +81,15 @@ public struct StoryboardSegue<Segue, Source, Destination> {
   public let identifier: StoryboardSegueIdentifier<Segue, Source, Destination>
 
   /// Segue source view controller
-  public let sourceViewController: Source
+  public let source: Source
 
   /**
    Create a new segue based on the identifier and source view controller
 
    - returns: A new StoryboardSegue
    */
-  public init(identifier: StoryboardSegueIdentifier<Segue, Source, Destination>, sourceViewController: Source) {
+  public init(identifier: StoryboardSegueIdentifier<Segue, Source, Destination>, source: Source) {
     self.identifier = identifier
-    self.sourceViewController = sourceViewController
+    self.source = source
   }
 }
diff --git a/Library/Core/Validatable.swift b/Library/Core/Validatable.swift
index 0b23781..f7ce177 100644
--- a/Library/Core/Validatable.swift
+++ b/Library/Core/Validatable.swift
@@ -9,7 +9,7 @@
 import Foundation
 
 /// Error thrown during validation
-public struct ValidationError: ErrorProtocol, CustomStringConvertible {
+public struct ValidationError: Error, CustomStringConvertible {
   /// Human readable description
   public let description: String
 
diff --git a/Library/Foundation/Bundle+FileResource.swift b/Library/Foundation/Bundle+FileResource.swift
index f1a07e7..b797e76 100644
--- a/Library/Foundation/Bundle+FileResource.swift
+++ b/Library/Foundation/Bundle+FileResource.swift
@@ -16,8 +16,8 @@ public extension Bundle {
 
    - returns: The file URL for the resource file (R.file.*) or nil if the file could not be located.
    */
-  public func urlForResource(_ resource: FileResourceType) -> URL? {
-    return urlForResource(resource.name, withExtension: resource.pathExtension)
+  public func url(forResource resource: FileResourceType) -> URL? {
+    return url(forResource: resource.name, withExtension: resource.pathExtension)
   }
 
   /**
@@ -27,7 +27,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 pathForResource(_ resource: FileResourceType) -> String? {
-    return pathForResource(resource.name, ofType: resource.pathExtension)
+  public func path(forResource resource: FileResourceType) -> String? {
+    return path(forResource: resource.name, ofType: resource.pathExtension)
   }
 }
diff --git a/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift b/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift
index abe8c15..1408454 100644
--- a/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift
+++ b/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift
@@ -18,8 +18,8 @@ extension TypedStoryboardSegueInfo {
   public init?<SegueIdentifier: StoryboardSegueIdentifierType where SegueIdentifier.SegueType == Segue, SegueIdentifier.SourceType == Source, SegueIdentifier.DestinationType == Destination>(segueIdentifier: SegueIdentifier, segue: UIStoryboardSegue)
   {
     guard let identifier = segue.identifier,
-      let sourceViewController = segue.sourceViewController as? SegueIdentifier.SourceType,
-      let destinationViewController = segue.destinationViewController as? SegueIdentifier.DestinationType,
+      let source = segue.source as? SegueIdentifier.SourceType,
+      let destination = segue.destination as? SegueIdentifier.DestinationType,
       let segue = segue as? SegueIdentifier.SegueType, identifier == segueIdentifier.identifier
     else {
       return nil
@@ -27,7 +27,7 @@ extension TypedStoryboardSegueInfo {
 
     self.segue = segue
     self.identifier = identifier
-    self.sourceViewController = sourceViewController
-    self.destinationViewController = destinationViewController
+    self.source = source
+    self.destination = destination
   }
 }
diff --git a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
index ff50393..ec63fd4 100644
--- a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
+++ b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
@@ -35,6 +35,6 @@ public extension StoryboardSegue where Source : UIViewController {
    - 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: AnyObject? = nil) {
-    sourceViewController.performSegue(withIdentifier: identifier.identifier, sender: sender)
+    source.performSegue(withIdentifier: identifier.identifier, sender: sender)
   }
 }

From 81dacb1a1e8ef5b634e06af7873c65b5174abf7e Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Mon, 15 Aug 2016 20:52:38 +0200
Subject: [PATCH 039/112] Updates for Xcode 8 beta 6

---
 Library/Core/Validatable.swift                |  4 ++--
 Library/UIKit/NibResource+UIKit.swift         |  2 +-
 ...toryboardSegueInfo+UIStoryboardSegue.swift |  3 ++-
 ...llectionView+ReuseIdentifierProtocol.swift | 24 ++++++++++++++-----
 .../UITableView+ReuseIdentifierProtocol.swift | 18 +++++++++-----
 ...er+StoryboardSegueIdentifierProtocol.swift | 10 ++++----
 6 files changed, 39 insertions(+), 22 deletions(-)

diff --git a/Library/Core/Validatable.swift b/Library/Core/Validatable.swift
index f7ce177..c30fe61 100644
--- a/Library/Core/Validatable.swift
+++ b/Library/Core/Validatable.swift
@@ -35,11 +35,11 @@ extension Validatable {
     assert( theRealAssert() )
   }
 
-  private static func theRealAssert() -> Bool {
+  fileprivate static func theRealAssert() -> Bool {
     do {
       try validate()
     } catch {
-      assertionFailure("Validation of \(self.dynamicType) failed with error: \(error)")
+      assertionFailure("Validation of \(type(of: self)) failed with error: \(error)")
     }
 
     return true
diff --git a/Library/UIKit/NibResource+UIKit.swift b/Library/UIKit/NibResource+UIKit.swift
index 3f55854..29cf41c 100644
--- a/Library/UIKit/NibResource+UIKit.swift
+++ b/Library/UIKit/NibResource+UIKit.swift
@@ -18,7 +18,7 @@ public extension NibResourceType {
 
    - returns: An array containing the top-level objects from the NIB
    */
-  public func instantiate(withOwner ownerOrNil: AnyObject?, options optionsOrNil: [NSObject : AnyObject]? = [:]) -> [AnyObject] {
+  public func instantiate(withOwner ownerOrNil: Any?, options optionsOrNil: [AnyHashable : Any]? = [:]) -> [Any] {
     return UINib(resource: self).instantiate(withOwner: ownerOrNil, options: optionsOrNil)
   }
 }
diff --git a/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift b/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift
index 1408454..d891f0f 100644
--- a/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift
+++ b/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift
@@ -15,7 +15,8 @@ extension TypedStoryboardSegueInfo {
    
    - returns: A newly initialized TypedStoryboardSegueInfo object or nil.
   */
-  public init?<SegueIdentifier: StoryboardSegueIdentifierType where SegueIdentifier.SegueType == Segue, SegueIdentifier.SourceType == Source, SegueIdentifier.DestinationType == Destination>(segueIdentifier: SegueIdentifier, segue: UIStoryboardSegue)
+  public init?<SegueIdentifier: StoryboardSegueIdentifierType>(segueIdentifier: SegueIdentifier, segue: UIStoryboardSegue)
+    where SegueIdentifier.SegueType == Segue, SegueIdentifier.SourceType == Source, SegueIdentifier.DestinationType == Destination
   {
     guard let identifier = segue.identifier,
       let source = segue.source as? SegueIdentifier.SourceType,
diff --git a/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift b/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift
index 9bfc81a..6df5dec 100644
--- a/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift
+++ b/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift
@@ -18,7 +18,9 @@ public extension UICollectionView {
    
    - returns: A subclass of UICollectionReusableView or nil if the cast fails.
   */
-  public func dequeueReusableCell<Identifier: ReuseIdentifierType where Identifier.ReusableType: UICollectionReusableView>(withReuseIdentifier identifier: Identifier, for indexPath: IndexPath) -> Identifier.ReusableType? {
+  public 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
   }
 
@@ -31,7 +33,9 @@ public extension UICollectionView {
    
    - returns: A subclass of UICollectionReusableView or nil if the cast fails.
   */
-  public func dequeueReusableSupplementaryView<Identifier: ReuseIdentifierType where Identifier.ReusableType: UICollectionReusableView>(ofKind elementKind: String, withReuseIdentifier identifier: Identifier, for indexPath: IndexPath) -> Identifier.ReusableType? {
+  public 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
   }
 
@@ -40,7 +44,9 @@ public extension UICollectionView {
 
    - parameter nibResources: An array of nib resources (R.nib.*) each containing a object of type UICollectionViewCell that has a reuse identifier
    */
-  public func register<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell>(_ nibResources: [Resource]) {
+  public func register<Resource: NibResourceType>(_ nibResources: [Resource])
+    where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell
+  {
     nibResources.forEach(register)
   }
 
@@ -49,7 +55,9 @@ 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 where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell>(_ nibResource: Resource) {
+  public func register<Resource: NibResourceType>(_ nibResource: Resource)
+    where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell
+  {
     register(UINib(resource: nibResource), forCellWithReuseIdentifier: nibResource.identifier)
   }
 
@@ -58,7 +66,9 @@ public extension UICollectionView {
 
    - parameter nibResources: An array of nib resources (R.nib.*) each containing a object of type UICollectionReusableView. that has a reuse identifier
    */
-  public func register<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView>(_ nibResources: [Resource], forSupplementaryViewOfKind kind: String) {
+  public func register<Resource: NibResourceType>(_ nibResources: [Resource], forSupplementaryViewOfKind kind: String)
+    where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView
+  {
     nibResources.forEach { self.register($0, forSupplementaryViewOfKind: kind) }
   }
 
@@ -67,7 +77,9 @@ 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 where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView>(_ nibResource: Resource, forSupplementaryViewOfKind kind: String) {
+  public func register<Resource: NibResourceType>(_ nibResource: Resource, forSupplementaryViewOfKind kind: String)
+    where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView
+  {
     register(UINib(resource: nibResource), forSupplementaryViewOfKind: kind, withReuseIdentifier: nibResource.identifier)
   }
 }
diff --git a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
index 320ffd8..5a74193 100644
--- a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
+++ b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
@@ -20,7 +20,9 @@ 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 where Identifier.ReusableType: UITableViewCell>(withIdentifier identifier: Identifier, for indexPath: IndexPath) -> Identifier.ReusableType? {
+  public 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
   }
 
@@ -33,7 +35,9 @@ 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 where Identifier.ReusableType: UITableViewCell>(withIdentifier identifier: Identifier) -> Identifier.ReusableType? {
+  public func dequeueReusableCell<Identifier: ReuseIdentifierType>(withIdentifier identifier: Identifier) -> Identifier.ReusableType?
+    where Identifier.ReusableType: UITableViewCell
+  {
     return dequeueReusableCell(withIdentifier: identifier.identifier) as? Identifier.ReusableType
   }
 
@@ -44,7 +48,9 @@ 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 where Identifier.ReusableType: UITableViewHeaderFooterView>(withIdentifier identifier: Identifier) -> Identifier.ReusableType? {
+  public func dequeueReusableHeaderFooterView<Identifier: ReuseIdentifierType>(withIdentifier identifier: Identifier) -> Identifier.ReusableType?
+    where Identifier.ReusableType: UITableViewHeaderFooterView
+  {
     return dequeueReusableHeaderFooterView(withIdentifier: identifier.identifier) as? Identifier.ReusableType
   }
 
@@ -53,7 +59,7 @@ public extension UITableView {
 
    - parameter nibResources: Array of nib resources (R.nib.*) each containing a table view cell that has a reuse identifier
    */
-  public func register<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell>(_ nibResources: [Resource]) {
+  public func register<Resource: NibResourceType>(_ nibResources: [Resource]) where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell {
     nibResources.forEach(register)
   }
 
@@ -62,7 +68,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 where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell>(_ nibResource: Resource) {
+  public func register<Resource: NibResourceType>(_ nibResource: Resource) where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell {
     register(UINib(resource: nibResource), forCellReuseIdentifier: nibResource.identifier)
   }
 
@@ -71,7 +77,7 @@ public extension UITableView {
 
    - parameter nibResource: A nib resource (R.nib.*) containing a view that has a reuse identifier
    */
-  public func registerHeaderFooterView<Resource: NibResourceType where Resource: ReuseIdentifierType, Resource.ReusableType: UIView>(_ nibResource: Resource) {
+  public 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+StoryboardSegueIdentifierProtocol.swift b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
index ec63fd4..3c68933 100644
--- a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
+++ b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
@@ -10,10 +10,10 @@ import Foundation
 import UIKit
 
 public protocol SeguePerformerType {
-  func performSegue(withIdentifier identifier: String, sender: AnyObject?)
+  func performSegue(withIdentifier identifier: String, sender: Any?)
 }
 
-extension UIViewController: SeguePerformerType { }
+extension UIViewController: SeguePerformerType {}
 
 public extension SeguePerformerType {
   /**
@@ -22,9 +22,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: AnyObject?) {
+  public func performSegue<Segue, Destination>(withIdentifier identifier: StoryboardSegueIdentifier<Segue, Self, Destination>, sender: Any?) {
     performSegue(withIdentifier: identifier.identifier, sender: sender)
   }
 }
@@ -34,7 +32,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: AnyObject? = nil) {
+  public func performSegue(sender: Any? = nil) {
     source.performSegue(withIdentifier: identifier.identifier, sender: sender)
   }
 }

From bbd67436d232aa05552d20da5deead709627ed5e Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Wed, 24 Aug 2016 10:49:28 +0200
Subject: [PATCH 040/112] Upgrade projectfile to Xcode 8

---
 .../contents.xcworkspacedata                  |  7 +++++
 .../R.swift.Library.xcscmblueprint            | 30 +++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 R.swift.Library.xcodeproj/project.xcworkspace/contents.xcworkspacedata
 create mode 100644 R.swift.Library.xcodeproj/project.xcworkspace/xcshareddata/R.swift.Library.xcscmblueprint

diff --git a/R.swift.Library.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/R.swift.Library.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/R.swift.Library.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:">
+   </FileRef>
+</Workspace>
diff --git a/R.swift.Library.xcodeproj/project.xcworkspace/xcshareddata/R.swift.Library.xcscmblueprint b/R.swift.Library.xcodeproj/project.xcworkspace/xcshareddata/R.swift.Library.xcscmblueprint
new file mode 100644
index 0000000..422543d
--- /dev/null
+++ b/R.swift.Library.xcodeproj/project.xcworkspace/xcshareddata/R.swift.Library.xcscmblueprint
@@ -0,0 +1,30 @@
+{
+  "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "E6D66735CE6FC1586FFE099FD28E4FCADA1AAB68",
+  "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
+
+  },
+  "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
+    "768F1F9CC867EF28C17472B184F0AF0781227AAE" : 9223372036854775807,
+    "E6D66735CE6FC1586FFE099FD28E4FCADA1AAB68" : 9223372036854775807
+  },
+  "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "9B2E86CA-CC78-4635-8917-9F1308E5433E",
+  "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
+    "768F1F9CC867EF28C17472B184F0AF0781227AAE" : "",
+    "E6D66735CE6FC1586FFE099FD28E4FCADA1AAB68" : "R.swift.Library\/"
+  },
+  "DVTSourceControlWorkspaceBlueprintNameKey" : "R.swift.Library",
+  "DVTSourceControlWorkspaceBlueprintVersion" : 204,
+  "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "R.swift.Library.xcodeproj",
+  "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
+    {
+      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:mac-cain13\/R.swift.git",
+      "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
+      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "768F1F9CC867EF28C17472B184F0AF0781227AAE"
+    },
+    {
+      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/mac-cain13\/R.swift.Library.git",
+      "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
+      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "E6D66735CE6FC1586FFE099FD28E4FCADA1AAB68"
+    }
+  ]
+}
\ No newline at end of file

From c6dc2126dbf4179b28617298b514598f81b8c37f Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Wed, 24 Aug 2016 10:59:47 +0200
Subject: [PATCH 041/112] Swift 3 fix StringResource

---
 Library/Core/StringResource.swift | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Library/Core/StringResource.swift b/Library/Core/StringResource.swift
index 822eacf..3d74b65 100644
--- a/Library/Core/StringResource.swift
+++ b/Library/Core/StringResource.swift
@@ -17,7 +17,7 @@ public protocol StringResourceType {
   var tableName: String { get }
 
   /// Bundle this string is in
-  var bundle: NSBundle { get }
+  var bundle: Bundle { get }
 
   /// Locales of the a localizable string
   var locales: [String] { get }
@@ -35,7 +35,7 @@ public struct StringResource: StringResourceType {
   public let tableName: String
 
   /// Bundle this string is in
-  public let bundle: NSBundle
+  public let bundle: Bundle
 
   /// Locales of the a localizable string
   public let locales: [String]
@@ -43,7 +43,7 @@ public struct StringResource: StringResourceType {
   /// Comment directly before and/or after the string, if any
   public let comment: String?
 
-  public init(key: String, tableName: String, bundle: NSBundle, locales: [String], comment: String?) {
+  public init(key: String, tableName: String, bundle: Bundle, locales: [String], comment: String?) {
     self.key = key
     self.tableName = tableName
     self.bundle = bundle

From 0d132f7c83cacd4b7bbbe608601432189667aa32 Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Wed, 24 Aug 2016 10:58:34 +0200
Subject: [PATCH 042/112] Set explicit simultor for tests

---
 fastlane/Fastfile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 3e7c4d2..529e982 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -75,11 +75,13 @@ lane :runalltests do
   scan(
     project: "R.swift.Library.xcodeproj",
     scheme: "Rswift-iOS",
+    destination: "name=iPhone SE",
     clean: true
   )
   scan(
     project: "R.swift.Library.xcodeproj",
     scheme: "Rswift-tvOS",
+    destination: "name=Apple TV 1080p",
     clean: true
   )
 end

From 038468fcc68190ff24056711b1f53cfc219e4216 Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Wed, 24 Aug 2016 11:02:20 +0200
Subject: [PATCH 043/112] Preparing for the 2.3.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 512fb2a..0547aba 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      = "2.2.0"
+  spec.version      = "2.3.0"
   spec.license      = "MIT"
 
   spec.summary      = "Companion library for R.swift, featuring types used to type resources"

From 3fcd4b678a0b2005dfd2efc147c185fd6999200e Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Wed, 24 Aug 2016 11:02:21 +0200
Subject: [PATCH 044/112] Update tvOS target to Swift 3

---
 R.swift.Library.xcodeproj/project.pbxproj | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj
index 3d7cda0..532953c 100644
--- a/R.swift.Library.xcodeproj/project.pbxproj
+++ b/R.swift.Library.xcodeproj/project.pbxproj
@@ -539,7 +539,7 @@
 				PRODUCT_NAME = Rswift;
 				SDKROOT = appletvos;
 				SKIP_INSTALL = YES;
-				SWIFT_VERSION = 2.3;
+				SWIFT_VERSION = 3.0;
 				TARGETED_DEVICE_FAMILY = 3;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
 			};
@@ -560,7 +560,7 @@
 				PRODUCT_NAME = Rswift;
 				SDKROOT = appletvos;
 				SKIP_INSTALL = YES;
-				SWIFT_VERSION = 2.3;
+				SWIFT_VERSION = 3.0;
 				TARGETED_DEVICE_FAMILY = 3;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
 			};
@@ -574,7 +574,7 @@
 				PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SDKROOT = appletvos;
-				SWIFT_VERSION = 2.3;
+				SWIFT_VERSION = 3.0;
 				TVOS_DEPLOYMENT_TARGET = 9.1;
 			};
 			name = Debug;
@@ -587,7 +587,7 @@
 				PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SDKROOT = appletvos;
-				SWIFT_VERSION = 2.3;
+				SWIFT_VERSION = 3.0;
 				TVOS_DEPLOYMENT_TARGET = 9.1;
 			};
 			name = Release;

From c92202282c2c814f94c3f9209c3104b24dc172ab Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Wed, 24 Aug 2016 13:19:29 +0200
Subject: [PATCH 045/112] Fix optional and throwing initializer

---
 Library/Foundation/Data+FileResource.swift | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Library/Foundation/Data+FileResource.swift b/Library/Foundation/Data+FileResource.swift
index d3f0f6d..17e8ca7 100644
--- a/Library/Foundation/Data+FileResource.swift
+++ b/Library/Foundation/Data+FileResource.swift
@@ -8,6 +8,8 @@
 
 import Foundation
 
+public struct NoUrlForResourceError: Error {}
+
 public extension Data {
 
   /**
@@ -17,8 +19,8 @@ public extension Data {
 
    - returns: A NSData object with the contents of the specified file.
    */
-  public init?(resource: FileResourceType) throws {
-    guard let url = resource.url() else { return nil }
+  public init(resource: FileResourceType) throws {
+    guard let url = resource.url() else { throw NoUrlForResourceError() }
     try self.init(contentsOf: url)
   }
 }

From 53101f1e08be2b232e3790ca7d34b020af84fbde Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Wed, 24 Aug 2016 14:38:43 +0200
Subject: [PATCH 046/112] Fix pod version command in release script

---
 fastlane/actions/version_get_podspec.rb | 107 ++++++++++++++++++++++++
 1 file changed, 107 insertions(+)
 create mode 100644 fastlane/actions/version_get_podspec.rb

diff --git a/fastlane/actions/version_get_podspec.rb b/fastlane/actions/version_get_podspec.rb
new file mode 100644
index 0000000..b2d82f1
--- /dev/null
+++ b/fastlane/actions/version_get_podspec.rb
@@ -0,0 +1,107 @@
+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 02c5faedcb4421f496e2efe55cc9b71c78d69e4a Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Wed, 24 Aug 2016 14:40:39 +0200
Subject: [PATCH 047/112] Preparing for the 3.0.0.beta.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 0547aba..587b6a4 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      = "2.3.0"
+  spec.version      = "3.0.0.beta.1"
   spec.license      = "MIT"
 
   spec.summary      = "Companion library for R.swift, featuring types used to type resources"

From 1dd63802fed7d9138e483d27785b90e893ba00a5 Mon Sep 17 00:00:00 2001
From: Tom Lokhorst <tom@lokhorst.eu>
Date: Thu, 8 Sep 2016 09:51:19 +0200
Subject: [PATCH 048/112] Extensions with unavailable/rename annotations for
 Swift 2 to Swift 3 update

---
 Library/Core/Core+Migration.swift             |  41 +++++
 Library/Foundation/Foundation+Migration.swift |  25 ++++
 Library/UIKit/UIKit+Migration.swift           | 141 ++++++++++++++++++
 R.swift.Library.xcodeproj/project.pbxproj     |  12 ++
 4 files changed, 219 insertions(+)
 create mode 100644 Library/Core/Core+Migration.swift
 create mode 100644 Library/Foundation/Foundation+Migration.swift
 create mode 100644 Library/UIKit/UIKit+Migration.swift

diff --git a/Library/Core/Core+Migration.swift b/Library/Core/Core+Migration.swift
new file mode 100644
index 0000000..0d48eea
--- /dev/null
+++ b/Library/Core/Core+Migration.swift
@@ -0,0 +1,41 @@
+//
+//  Core+Migration.swift
+//  R.swift.Library
+//
+//  Created by Tom Lokhorst on 2016-09-08.
+//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//
+
+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
new file mode 100644
index 0000000..758794e
--- /dev/null
+++ b/Library/Foundation/Foundation+Migration.swift
@@ -0,0 +1,25 @@
+//
+//  Foundation+Migration.swift
+//  R.swift.Library
+//
+//  Created by Tom Lokhorst on 2016-09-08.
+//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//
+
+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
new file mode 100644
index 0000000..6f94206
--- /dev/null
+++ b/Library/UIKit/UIKit+Migration.swift
@@ -0,0 +1,141 @@
+//
+//  UIKit+Migration.swift
+//  R.swift.Library
+//
+//  Created by Tom Lokhorst on 2016-09-08.
+//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//
+
+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 registerNibs<Resource: NibResourceType>(_ nibResources: [Resource])
+    where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell
+  {
+    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 registerNibs<Resource: NibResourceType>(_ nibResources: [Resource], forSupplementaryViewOfKind kind: String)
+    where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView
+  {
+    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 registerNibs<Resource: NibResourceType>(_ nibResources: [Resource]) where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell
+  {
+    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 532953c..fa8c471 100644
--- a/R.swift.Library.xcodeproj/project.pbxproj
+++ b/R.swift.Library.xcodeproj/project.pbxproj
@@ -67,6 +67,9 @@
 		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 */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -122,6 +125,9 @@
 		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>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -174,6 +180,7 @@
 				D543F9C31C1498FB00D16A0C /* UITableView+ReuseIdentifierProtocol.swift */,
 				D543F9C71C14995800D16A0C /* UIViewController+NibResource.swift */,
 				D543F9C91C14998800D16A0C /* UIViewController+StoryboardSegueIdentifierProtocol.swift */,
+				E2B0AF371D8142BF00A7196C /* UIKit+Migration.swift */,
 			);
 			path = UIKit;
 			sourceTree = "<group>";
@@ -193,6 +200,7 @@
 				D51335261C959DF20014C9D4 /* StoryboardViewControllerResource.swift */,
 				E250BE961CCBF60300CC71DE /* StringResource.swift */,
 				D53F19231C229D7200AE2FAD /* Validatable.swift */,
+				E2B0AF351D8142A400A7196C /* Core+Migration.swift */,
 			);
 			path = Core;
 			sourceTree = "<group>";
@@ -202,6 +210,7 @@
 			children = (
 				D56DC7721C42B65C00623437 /* Bundle+FileResource.swift */,
 				E20F34A61C92B44100338F81 /* Data+FileResource.swift */,
+				E2B0AF391D81483900A7196C /* Foundation+Migration.swift */,
 			);
 			path = Foundation;
 			sourceTree = "<group>";
@@ -481,6 +490,7 @@
 				D543F9BD1C14980600D16A0C /* ReuseIdentifierProtocol.swift in Sources */,
 				D543F9C11C14984300D16A0C /* NibResource.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 */,
@@ -490,7 +500,9 @@
 				D543F9C61C14992000D16A0C /* UICollectionView+ReuseIdentifierProtocol.swift in Sources */,
 				D543F9BF1C14983100D16A0C /* StoryboardSegueIdentifierProtocol.swift in Sources */,
 				D543F9C81C14995800D16A0C /* UIViewController+NibResource.swift in Sources */,
+				E2B0AF3A1D81483900A7196C /* Foundation+Migration.swift in Sources */,
 				D5E435A91C3CFB460091090C /* NibResource+UIKit.swift in Sources */,
+				E2B0AF361D8142A400A7196C /* Core+Migration.swift in Sources */,
 				E250BE971CCBF60300CC71DE /* StringResource.swift in Sources */,
 				D543F9CF1C149C0A00D16A0C /* TypedStoryboardSegueInfo+UIStoryboardSegue.swift in Sources */,
 				E250BE941CCBCEB100CC71DE /* ColorResource+UIKit.swift in Sources */,

From d3d1545f12d018e7df8b291e0c393fa9ebfa55f3 Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Tue, 13 Sep 2016 19:30:08 +0200
Subject: [PATCH 049/112] Ignore build folder

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 7465dc7..82ced1f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ fastlane/README.md
 fastlane/report.xml
 fastlane/test_output
 fastlane/settoken.sh
+/build

From e22748ddad58f80621ef3e1839cb194c79672a66 Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Tue, 13 Sep 2016 19:43:16 +0200
Subject: [PATCH 050/112] Preparing for the 3.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 587b6a4..77552dc 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.0.beta.1"
+  spec.version      = "3.0.0"
   spec.license      = "MIT"
 
   spec.summary      = "Companion library for R.swift, featuring types used to type resources"

From 745ca6ee531aa962bc754247bb3afdb17cc8b6ef Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Tue, 20 Sep 2016 22:15:44 +0200
Subject: [PATCH 051/112] Add swift-version file for cocoapods

---
 .swift-version | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 .swift-version

diff --git a/.swift-version b/.swift-version
new file mode 100644
index 0000000..9f55b2c
--- /dev/null
+++ b/.swift-version
@@ -0,0 +1 @@
+3.0

From 291d00431fb73ead7bde6f3af551ed61e701d741 Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Tue, 20 Sep 2016 22:17:49 +0200
Subject: [PATCH 052/112] Preparing for the 3.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 77552dc..3a67c02 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.0"
+  spec.version      = "3.0.1"
   spec.license      = "MIT"
 
   spec.summary      = "Companion library for R.swift, featuring types used to type resources"

From cb3113ed388fb50646578d2d9126d18befbb6963 Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Mon, 3 Oct 2016 18:24:37 +0200
Subject: [PATCH 053/112] Deprecate assertValid method on Validatables

Calling validate() from a test is a much better option then using assertions.
---
 Library/Core/Validatable.swift | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Library/Core/Validatable.swift b/Library/Core/Validatable.swift
index c30fe61..5c5e8b3 100644
--- a/Library/Core/Validatable.swift
+++ b/Library/Core/Validatable.swift
@@ -31,6 +31,7 @@ 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() )
   }

From 15325038aedb7bd208396ca00c96136cb48f6283 Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Mon, 3 Oct 2016 18:39:01 +0200
Subject: [PATCH 054/112] Fix swift 3 upgrade of availability

---
 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 5c5e8b3..ded5faa 100644
--- a/Library/Core/Validatable.swift
+++ b/Library/Core/Validatable.swift
@@ -31,7 +31,7 @@ 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.")
+  @available(*, deprecated, message: "Use validate() instead, preferably from a testcase.")
   public static func assertValid() {
     assert( theRealAssert() )
   }

From cfcd80998418a049d391a7274ff7f36b5ffb9d6d Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Sat, 8 Oct 2016 12:32:22 +0200
Subject: [PATCH 055/112] Upgrade project settings

---
 R.swift.Library.xcodeproj/project.pbxproj | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/R.swift.Library.xcodeproj/project.pbxproj b/R.swift.Library.xcodeproj/project.pbxproj
index fa8c471..9970879 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 = 0710;
+				LastUpgradeCheck = 0800;
 				ORGANIZATIONNAME = "Mathijs Kadijk";
 				TargetAttributes = {
 					806E69911C42BD9C00DE3A8B = {
@@ -540,6 +540,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				APPLICATION_EXTENSION_API_ONLY = YES;
+				"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
 				DYLIB_CURRENT_VERSION = 1;
@@ -561,6 +562,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				APPLICATION_EXTENSION_API_ONLY = YES;
+				"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
 				DYLIB_CURRENT_VERSION = 1;
@@ -617,8 +619,10 @@
 				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_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
 				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -665,8 +669,10 @@
 				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_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
 				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -686,6 +692,7 @@
 				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				SDKROOT = iphoneos;
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 				TARGETED_DEVICE_FAMILY = "1,2";
 				VALIDATE_PRODUCT = YES;
 				VERSIONING_SYSTEM = "apple-generic";
@@ -698,6 +705,7 @@
 			buildSettings = {
 				APPLICATION_EXTENSION_API_ONLY = YES;
 				CLANG_ENABLE_MODULES = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
 				DYLIB_CURRENT_VERSION = 1;
@@ -719,6 +727,7 @@
 			buildSettings = {
 				APPLICATION_EXTENSION_API_ONLY = YES;
 				CLANG_ENABLE_MODULES = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
 				DYLIB_CURRENT_VERSION = 1;

From 185ccef67f8a7f8173bd4bc6127c75daf2594a8c Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Sat, 8 Oct 2016 12:32:33 +0200
Subject: [PATCH 056/112] Remove uncallable methods

---
 ...llectionView+ReuseIdentifierProtocol.swift | 30 +++----------------
 Library/UIKit/UIKit+Migration.swift           | 22 --------------
 .../UITableView+ReuseIdentifierProtocol.swift | 11 +------
 3 files changed, 5 insertions(+), 58 deletions(-)

diff --git a/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift b/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift
index 6df5dec..a96ee85 100644
--- a/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift
+++ b/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift
@@ -39,46 +39,24 @@ public extension UICollectionView {
     return dequeueReusableSupplementaryView(ofKind: elementKind, withReuseIdentifier: identifier.identifier, for: indexPath) as? Identifier.ReusableType
   }
 
-  /**
-   Register a serie of R.nib.* for use in creating new collection view cells.
-
-   - parameter nibResources: An array of nib resources (R.nib.*) each containing a object of type UICollectionViewCell that has a reuse identifier
-   */
-  public func register<Resource: NibResourceType>(_ nibResources: [Resource])
-    where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell
-  {
-    nibResources.forEach(register)
-  }
-
   /**
    Register a R.nib.* for use in creating new collection view cells.
 
    - parameter nibResource: A nib resource (R.nib.*) containing a object of type UICollectionViewCell that has a reuse identifier
    */
-  public func register<Resource: NibResourceType>(_ nibResource: Resource)
-    where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell
+  public func register<Resource: NibResourceType & ReuseIdentifierType>(_ nibResource: Resource)
+    where Resource.ReusableType: UICollectionViewCell
   {
     register(UINib(resource: nibResource), forCellWithReuseIdentifier: nibResource.identifier)
   }
 
-  /**
-   Register a serie of R.nib.* for use in creating supplementary views for the collection view.
-
-   - parameter nibResources: An array of nib resources (R.nib.*) each containing a object of type UICollectionReusableView. that has a reuse identifier
-   */
-  public func register<Resource: NibResourceType>(_ nibResources: [Resource], forSupplementaryViewOfKind kind: String)
-    where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView
-  {
-    nibResources.forEach { self.register($0, forSupplementaryViewOfKind: kind) }
-  }
-
   /**
    Register a R.nib.* for use in creating supplementary views for the collection view.
 
    - parameter nibResource: A nib resource (R.nib.*) containing a object of type UICollectionReusableView. that has a reuse identifier
    */
-  public func register<Resource: NibResourceType>(_ nibResource: Resource, forSupplementaryViewOfKind kind: String)
-    where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView
+  public 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/UIKit+Migration.swift b/Library/UIKit/UIKit+Migration.swift
index 6f94206..f9cffd8 100644
--- a/Library/UIKit/UIKit+Migration.swift
+++ b/Library/UIKit/UIKit+Migration.swift
@@ -45,14 +45,6 @@ public extension UICollectionView {
   }
 
 
-  @available(*, unavailable, renamed: "register")
-  public func registerNibs<Resource: NibResourceType>(_ nibResources: [Resource])
-    where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell
-  {
-    fatalError()
-  }
-
-
   @available(*, unavailable, renamed: "register")
   public func registerNib<Resource: NibResourceType>(_ nibResource: Resource)
     where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionViewCell
@@ -61,13 +53,6 @@ public extension UICollectionView {
   }
 
 
-  @available(*, unavailable, renamed: "register")
-  public func registerNibs<Resource: NibResourceType>(_ nibResources: [Resource], forSupplementaryViewOfKind kind: String)
-    where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView
-  {
-    fatalError()
-  }
-
   @available(*, unavailable, renamed: "register")
   public func registerNib<Resource: NibResourceType>(_ nibResource: Resource, forSupplementaryViewOfKind kind: String)
     where Resource: ReuseIdentifierType, Resource.ReusableType: UICollectionReusableView
@@ -103,13 +88,6 @@ public extension UITableView {
   }
 
 
-  @available(*, unavailable, renamed: "register")
-  public func registerNibs<Resource: NibResourceType>(_ nibResources: [Resource]) where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell
-  {
-    fatalError()
-  }
-
-
   @available(*, unavailable, renamed: "register")
   public func registerNib<Resource: NibResourceType>(_ nibResource: Resource) where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell
   {
diff --git a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
index 5a74193..f4173c4 100644
--- a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
+++ b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
@@ -54,21 +54,12 @@ public extension UITableView {
     return dequeueReusableHeaderFooterView(withIdentifier: identifier.identifier) as? Identifier.ReusableType
   }
 
-  /**
-   Register an array of R.nib.*, each containing a cell, with the table view under it's contained identifier.
-
-   - parameter nibResources: Array of nib resources (R.nib.*) each containing a table view cell that has a reuse identifier
-   */
-  public func register<Resource: NibResourceType>(_ nibResources: [Resource]) where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell {
-    nibResources.forEach(register)
-  }
-
   /**
    Register a R.nib.* containing a cell with the table view under it's contained identifier.
    
    - parameter nibResource: A nib resource (R.nib.*) containing a table view cell that has a reuse identifier
   */
-  public func register<Resource: NibResourceType>(_ nibResource: Resource) where Resource: ReuseIdentifierType, Resource.ReusableType: UITableViewCell {
+  public func register<Resource: NibResourceType & ReuseIdentifierType>(_ nibResource: Resource) where Resource.ReusableType: UITableViewCell {
     register(UINib(resource: nibResource), forCellReuseIdentifier: nibResource.identifier)
   }
 

From 4ee8e9830f2765dc64b6350708aafbf0336acc8b Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Sun, 9 Oct 2016 12:46:15 +0200
Subject: [PATCH 057/112] Update headers in library swift files

---
 Library/Core/ColorResource.swift                             | 3 ++-
 Library/Core/Core+Migration.swift                            | 3 ++-
 Library/Core/FileResource.swift                              | 5 +++--
 Library/Core/FontResource.swift                              | 3 ++-
 Library/Core/Identifier.swift                                | 3 ++-
 Library/Core/ImageResource.swift                             | 3 ++-
 Library/Core/NibResource.swift                               | 3 ++-
 Library/Core/ReuseIdentifierProtocol.swift                   | 3 ++-
 Library/Core/StoryboardResource.swift                        | 3 ++-
 Library/Core/StoryboardSegueIdentifierProtocol.swift         | 3 ++-
 Library/Core/StoryboardViewControllerResource.swift          | 3 ++-
 Library/Core/StringResource.swift                            | 3 ++-
 Library/Core/Validatable.swift                               | 3 ++-
 Library/Foundation/Bundle+FileResource.swift                 | 3 ++-
 Library/Foundation/Data+FileResource.swift                   | 3 ++-
 Library/Foundation/Foundation+Migration.swift                | 3 ++-
 Library/Rswift.h                                             | 3 ++-
 Library/UIKit/ColorResource+UIKit.swift                      | 3 ++-
 Library/UIKit/NibResource+UIKit.swift                        | 3 ++-
 .../StoryboardResourceWithInitialController+UIKit.swift      | 3 ++-
 .../UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift   | 3 ++-
 Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift | 3 ++-
 Library/UIKit/UIFont+FontResource.swift                      | 3 ++-
 Library/UIKit/UIImage+ImageResource.swift                    | 3 ++-
 Library/UIKit/UIKit+Migration.swift                          | 3 ++-
 Library/UIKit/UINib+NibResource.swift                        | 3 ++-
 Library/UIKit/UIStoryboard+StoryboardResource.swift          | 3 ++-
 .../UIStoryboard+StoryboardViewControllerResource.swift      | 3 ++-
 Library/UIKit/UITableView+ReuseIdentifierProtocol.swift      | 3 ++-
 Library/UIKit/UIViewController+NibResource.swift             | 3 ++-
 .../UIViewController+StoryboardSegueIdentifierProtocol.swift | 3 ++-
 31 files changed, 63 insertions(+), 32 deletions(-)

diff --git a/Library/Core/ColorResource.swift b/Library/Core/ColorResource.swift
index 2174872..1bff0ff 100644
--- a/Library/Core/ColorResource.swift
+++ b/Library/Core/ColorResource.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Tom Lokhorst on 2016-03-13.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/Core/Core+Migration.swift b/Library/Core/Core+Migration.swift
index 0d48eea..c54a4b9 100644
--- a/Library/Core/Core+Migration.swift
+++ b/Library/Core/Core+Migration.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Tom Lokhorst on 2016-09-08.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/Core/FileResource.swift b/Library/Core/FileResource.swift
index 8b560fe..093ee0b 100644
--- a/Library/Core/FileResource.swift
+++ b/Library/Core/FileResource.swift
@@ -1,9 +1,10 @@
 //
 //  FileResource.swift
-//  Pods
+//  R.swift.Library
 //
 //  Created by Mathijs Kadijk on 06-01-16.
-//
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/Core/FontResource.swift b/Library/Core/FontResource.swift
index 7a7fbae..6ce96a7 100644
--- a/Library/Core/FontResource.swift
+++ b/Library/Core/FontResource.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Mathijs Kadijk on 06-01-16.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/Core/Identifier.swift b/Library/Core/Identifier.swift
index 0da396a..17e7365 100644
--- a/Library/Core/Identifier.swift
+++ b/Library/Core/Identifier.swift
@@ -3,7 +3,8 @@
 //  R.swift Library
 //
 //  Created by Mathijs Kadijk on 06-12-15.
-//  Copyright © 2015 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/Core/ImageResource.swift b/Library/Core/ImageResource.swift
index dc6aca1..6fd3d8a 100644
--- a/Library/Core/ImageResource.swift
+++ b/Library/Core/ImageResource.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Mathijs Kadijk on 11-01-16.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/Core/NibResource.swift b/Library/Core/NibResource.swift
index a0bd2a0..3a5e904 100644
--- a/Library/Core/NibResource.swift
+++ b/Library/Core/NibResource.swift
@@ -3,7 +3,8 @@
 //  R.swift Library
 //
 //  Created by Mathijs Kadijk on 06-12-15.
-//  Copyright © 2015 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/Core/ReuseIdentifierProtocol.swift b/Library/Core/ReuseIdentifierProtocol.swift
index e32db59..9637e01 100644
--- a/Library/Core/ReuseIdentifierProtocol.swift
+++ b/Library/Core/ReuseIdentifierProtocol.swift
@@ -3,7 +3,8 @@
 //  R.swift Library
 //
 //  Created by Mathijs Kadijk on 06-12-15.
-//  Copyright © 2015 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/Core/StoryboardResource.swift b/Library/Core/StoryboardResource.swift
index e41f9dd..46a0e35 100644
--- a/Library/Core/StoryboardResource.swift
+++ b/Library/Core/StoryboardResource.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Mathijs Kadijk on 07-01-16.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/Core/StoryboardSegueIdentifierProtocol.swift b/Library/Core/StoryboardSegueIdentifierProtocol.swift
index 3404cdd..9b51797 100644
--- a/Library/Core/StoryboardSegueIdentifierProtocol.swift
+++ b/Library/Core/StoryboardSegueIdentifierProtocol.swift
@@ -3,7 +3,8 @@
 //  R.swift Library
 //
 //  Created by Mathijs Kadijk on 06-12-15.
-//  Copyright © 2015 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/Core/StoryboardViewControllerResource.swift b/Library/Core/StoryboardViewControllerResource.swift
index 784ea3f..4a29d91 100644
--- a/Library/Core/StoryboardViewControllerResource.swift
+++ b/Library/Core/StoryboardViewControllerResource.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Mathijs Kadijk on 13-03-16.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/Core/StringResource.swift b/Library/Core/StringResource.swift
index 3d74b65..56e1193 100644
--- a/Library/Core/StringResource.swift
+++ b/Library/Core/StringResource.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Tom Lokhorst on 2016-04-23.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/Core/Validatable.swift b/Library/Core/Validatable.swift
index ded5faa..feec70c 100644
--- a/Library/Core/Validatable.swift
+++ b/Library/Core/Validatable.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Mathijs Kadijk on 17-12-15.
-//  Copyright © 2015 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/Foundation/Bundle+FileResource.swift b/Library/Foundation/Bundle+FileResource.swift
index b797e76..83af4ff 100644
--- a/Library/Foundation/Bundle+FileResource.swift
+++ b/Library/Foundation/Bundle+FileResource.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Mathijs Kadijk on 10-01-16.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/Foundation/Data+FileResource.swift b/Library/Foundation/Data+FileResource.swift
index 17e8ca7..2f612bd 100644
--- a/Library/Foundation/Data+FileResource.swift
+++ b/Library/Foundation/Data+FileResource.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Tom Lokhorst on 2016-03-11.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/Foundation/Foundation+Migration.swift b/Library/Foundation/Foundation+Migration.swift
index 758794e..d41957a 100644
--- a/Library/Foundation/Foundation+Migration.swift
+++ b/Library/Foundation/Foundation+Migration.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Tom Lokhorst on 2016-09-08.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/Rswift.h b/Library/Rswift.h
index 9b7482f..b77027e 100644
--- a/Library/Rswift.h
+++ b/Library/Rswift.h
@@ -3,7 +3,8 @@
 //  Rswift
 //
 //  Created by Mathijs Kadijk on 04-12-15.
-//  Copyright © 2015 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 #import <UIKit/UIKit.h>
diff --git a/Library/UIKit/ColorResource+UIKit.swift b/Library/UIKit/ColorResource+UIKit.swift
index e4d50e5..3efe71b 100644
--- a/Library/UIKit/ColorResource+UIKit.swift
+++ b/Library/UIKit/ColorResource+UIKit.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Tom Lokhorst on 2016-04-23.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import UIKit
diff --git a/Library/UIKit/NibResource+UIKit.swift b/Library/UIKit/NibResource+UIKit.swift
index 29cf41c..3e3d14a 100644
--- a/Library/UIKit/NibResource+UIKit.swift
+++ b/Library/UIKit/NibResource+UIKit.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Mathijs Kadijk on 06-01-16.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift b/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift
index 3fb525c..23f4f46 100644
--- a/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift
+++ b/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Mathijs Kadijk on 07-01-16.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift b/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift
index d891f0f..5edd9be 100644
--- a/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift
+++ b/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift
@@ -3,7 +3,8 @@
 //  R.swift Library
 //
 //  Created by Mathijs Kadijk on 06-12-15.
-//  Copyright © 2015 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift b/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift
index a96ee85..aabcf14 100644
--- a/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift
+++ b/Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift
@@ -3,7 +3,8 @@
 //  R.swift Library
 //
 //  Created by Mathijs Kadijk on 06-12-15.
-//  Copyright © 2015 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/UIKit/UIFont+FontResource.swift b/Library/UIKit/UIFont+FontResource.swift
index c644c0b..237d9cf 100644
--- a/Library/UIKit/UIFont+FontResource.swift
+++ b/Library/UIKit/UIFont+FontResource.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Mathijs Kadijk on 06-01-16.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/UIKit/UIImage+ImageResource.swift b/Library/UIKit/UIImage+ImageResource.swift
index 947f757..6037b4f 100644
--- a/Library/UIKit/UIImage+ImageResource.swift
+++ b/Library/UIKit/UIImage+ImageResource.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Mathijs Kadijk on 11-01-16.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import UIKit
diff --git a/Library/UIKit/UIKit+Migration.swift b/Library/UIKit/UIKit+Migration.swift
index f9cffd8..bd66ddc 100644
--- a/Library/UIKit/UIKit+Migration.swift
+++ b/Library/UIKit/UIKit+Migration.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Tom Lokhorst on 2016-09-08.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import UIKit
diff --git a/Library/UIKit/UINib+NibResource.swift b/Library/UIKit/UINib+NibResource.swift
index 3e73baa..70cba8a 100644
--- a/Library/UIKit/UINib+NibResource.swift
+++ b/Library/UIKit/UINib+NibResource.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Mathijs Kadijk on 08-01-16.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import UIKit
diff --git a/Library/UIKit/UIStoryboard+StoryboardResource.swift b/Library/UIKit/UIStoryboard+StoryboardResource.swift
index 8252eea..bc03c2e 100644
--- a/Library/UIKit/UIStoryboard+StoryboardResource.swift
+++ b/Library/UIKit/UIStoryboard+StoryboardResource.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Mathijs Kadijk on 07-01-16.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import UIKit
diff --git a/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift b/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift
index e8627f8..f816d62 100644
--- a/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift
+++ b/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift
@@ -3,7 +3,8 @@
 //  R.swift.Library
 //
 //  Created by Mathijs Kadijk on 13-03-16.
-//  Copyright © 2016 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
index f4173c4..5952625 100644
--- a/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
+++ b/Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
@@ -3,7 +3,8 @@
 //  R.swift Library
 //
 //  Created by Mathijs Kadijk on 06-12-15.
-//  Copyright © 2015 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/UIKit/UIViewController+NibResource.swift b/Library/UIKit/UIViewController+NibResource.swift
index 93afbb2..38c24ca 100644
--- a/Library/UIKit/UIViewController+NibResource.swift
+++ b/Library/UIKit/UIViewController+NibResource.swift
@@ -3,7 +3,8 @@
 //  R.swift Library
 //
 //  Created by Mathijs Kadijk on 06-12-15.
-//  Copyright © 2015 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation
diff --git a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
index 3c68933..6c886b4 100644
--- a/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
+++ b/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift
@@ -3,7 +3,8 @@
 //  R.swift Library
 //
 //  Created by Mathijs Kadijk on 06-12-15.
-//  Copyright © 2015 Mathijs Kadijk. All rights reserved.
+//  From: https://github.com/mac-cain13/R.swift.Library
+//  License: MIT License
 //
 
 import Foundation

From b520035ddad4a47eb580b576ba5c6fb72df51c97 Mon Sep 17 00:00:00 2001
From: Mathijs Kadijk <mkadijk@gmail.com>
Date: Sun, 9 Oct 2016 12:51:34 +0200
Subject: [PATCH 058/112] Preparing for the 3.0.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 3a67c02..1a1e8bd 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.1"
+  spec.version      = "3.0.2"
   spec.license      = "MIT"
 
   spec.summary      = "Companion library for R.swift, featuring types used to type resources"

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 059/112] 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 060/112] 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 061/112] 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 062/112] 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 063/112] 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 064/112] 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 065/112] 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 066/112] 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 067/112] 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 068/112] 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 069/112] 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 070/112] 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 071/112] 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 072/112] 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 073/112] 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 074/112] 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 075/112] 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 076/112] 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 077/112] 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 078/112] 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 079/112] 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 080/112] 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 [![Version](https://img.shields.io/cocoapods/v/R.swift.Library.svg?style=flat)](http://cocoapods.org/?q=R.swift.Library) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![License](https://img.shields.io/cocoapods/l/R.swift.Library.svg?style=flat)](blob/master/License) ![Platform](https://img.shields.io/cocoapods/p/R.swift.Library.svg?style=flat)
+# R.swift.Library [![Version](https://img.shields.io/cocoapods/v/R.swift.Library.svg?style=flat)](https://cocoapods.org/pods/R.swift) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![License](https://img.shields.io/cocoapods/l/R.swift.Library.svg?style=flat)](blob/master/License) ![Platform](https://img.shields.io/cocoapods/p/R.swift.Library.svg?style=flat)
 
 _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 081/112] 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 082/112] 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 083/112] 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 084/112] 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 085/112] 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 086/112] 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 087/112] 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 088/112] 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 089/112] 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 090/112] 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 091/112] 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 092/112] 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 093/112] 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 094/112] 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 095/112] 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 096/112] 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 097/112] 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 098/112] 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 099/112] 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 100/112] 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 101/112] 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 102/112] 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 103/112] 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 104/112] 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 105/112] 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 106/112] 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 107/112] 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 108/112] 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 109/112] 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 110/112] 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 111/112] 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 112/112] 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 [![Version](https://img.shields.io/cocoapods/v/R.swift.Library.svg?style=flat)](https://cocoapods.org/pods/R.swift) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![License](https://img.shields.io/cocoapods/l/R.swift.Library.svg?style=flat)](blob/master/License) ![Platform](https://img.shields.io/cocoapods/p/R.swift.Library.svg?style=flat)
 
-_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?