diff --git a/.gitignore b/.gitignore index 59e79107..0a2525ff 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ rswift.xcarchive rswift.xcodeproj .build build +DerivedData \ No newline at end of file diff --git a/Podfile b/Podfile index ce835d83..2567b543 100644 --- a/Podfile +++ b/Podfile @@ -6,7 +6,7 @@ project 'ResourceApp/ResourceApp' abstract_target 'Shared' do inhibit_all_warnings! - pod 'R.swift.Library', :git => 'git@github.com:mac-cain13/R.swift.Library.git' # for CI builds + pod 'R.swift.Library', :git => 'https://github.com/mac-cain13/R.swift.Library.git' # for CI builds # pod 'R.swift.Library', :path => '../R.swift.Library' # for development target 'ResourceApp' do diff --git a/Podfile.lock b/Podfile.lock index 0602cd1f..e130c58b 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,9 +1,9 @@ PODS: - - R.swift.Library (5.0.0.alpha.1) + - R.swift.Library (5.0.0.alpha.2) - SWRevealViewController (2.3.0) DEPENDENCIES: - - "R.swift.Library (from `git@github.com:mac-cain13/R.swift.Library.git`)" + - R.swift.Library (from `https://github.com/mac-cain13/R.swift.Library.git`) - SWRevealViewController SPEC REPOS: @@ -12,17 +12,17 @@ SPEC REPOS: EXTERNAL SOURCES: R.swift.Library: - :git: "git@github.com:mac-cain13/R.swift.Library.git" + :git: https://github.com/mac-cain13/R.swift.Library.git CHECKOUT OPTIONS: R.swift.Library: - :commit: b6d4ccb5042f933b9b7acb2fb1d424f93512033e - :git: "git@github.com:mac-cain13/R.swift.Library.git" + :commit: cb11aec9943393c9903b3623068207b26c9e246b + :git: https://github.com/mac-cain13/R.swift.Library.git SPEC CHECKSUMS: - R.swift.Library: 50421682fe36726a830ad2b727c5362b8959cc1e + R.swift.Library: 3c21b823839bf5a6769dc7f96cb44479dab51b1b SWRevealViewController: 6d3fd97f70112fd7cef9de14df4260eacce4c63a -PODFILE CHECKSUM: 60ef58c3328649cce6ac12481f40d26d722e5079 +PODFILE CHECKSUM: dcf609a63a9cb222b7167b110c27de036120bae0 COCOAPODS: 1.5.3 diff --git a/Sources/RswiftCore/Generators/NibStructGenerator.swift b/Sources/RswiftCore/Generators/NibStructGenerator.swift index fbe432fc..58dcf9cc 100644 --- a/Sources/RswiftCore/Generators/NibStructGenerator.swift +++ b/Sources/RswiftCore/Generators/NibStructGenerator.swift @@ -204,7 +204,7 @@ struct NibStructGenerator: StructGenerator { } let validateColorLines = nib.usedColorResources.uniqueAndSorted() .map { - "if UIKit.UIColor(named: \"\($0)\") == nil { throw Rswift.ValidationError(description: \"[R.swift] Color named '\($0)' is used in storyboard '\(nib.name)', but couldn't be loaded.\") }" + "if UIKit.UIColor(named: \"\($0)\", in: R.hostingBundle, compatibleWith: nil) == nil { throw Rswift.ValidationError(description: \"[R.swift] Color named '\($0)' is used in storyboard '\(nib.name)', but couldn't be loaded.\") }" } let validateColorLinesWithAvailableIf = ["if #available(iOS 11.0, *) {"] + validateColorLines.map { $0.indent(with: " ") } + diff --git a/Sources/RswiftCore/Generators/StoryboardGenerator.swift b/Sources/RswiftCore/Generators/StoryboardGenerator.swift index 9063591a..c52940fd 100644 --- a/Sources/RswiftCore/Generators/StoryboardGenerator.swift +++ b/Sources/RswiftCore/Generators/StoryboardGenerator.swift @@ -160,11 +160,11 @@ struct StoryboardStructGenerator: StructGenerator { // Validation let validateImagesLines = storyboard.usedImageIdentifiers.uniqueAndSorted() .map { - "if UIKit.UIImage(named: \"\($0)\") == nil { throw Rswift.ValidationError(description: \"[R.swift] Image named '\($0)' is used in storyboard '\(storyboard.name)', but couldn't be loaded.\") }" + "if UIKit.UIImage(named: \"\($0)\", in: R.hostingBundle, compatibleWith: nil) == nil { throw Rswift.ValidationError(description: \"[R.swift] Image named '\($0)' is used in storyboard '\(storyboard.name)', but couldn't be loaded.\") }" } let validateColorLines = storyboard.usedColorResources.uniqueAndSorted() .map { - "if UIKit.UIColor(named: \"\($0)\") == nil { throw Rswift.ValidationError(description: \"[R.swift] Color named '\($0)' is used in storyboard '\(storyboard.name)', but couldn't be loaded.\") }" + "if UIKit.UIColor(named: \"\($0)\", in: R.hostingBundle, compatibleWith: nil) == nil { throw Rswift.ValidationError(description: \"[R.swift] Color named '\($0)' is used in storyboard '\(storyboard.name)', but couldn't be loaded.\") }" } let validateColorLinesWithAvailableIf = ["if #available(iOS 11.0, *) {"] + validateColorLines.map { $0.indent(with: " ") } +