Skip to content
This repository was archived by the owner on Sep 19, 2024. It is now read-only.

Commit 997b6e5

Browse files
committed
Update to Swift 5
1 parent fc22d31 commit 997b6e5

File tree

5 files changed

+41
-45
lines changed

5 files changed

+41
-45
lines changed

Library/UIKit/UIColor+ColorResource.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public extension UIColor {
3636
- 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.
3737
*/
3838
@available(watchOSApplicationExtension 4.0, *)
39-
public convenience init?(resource: ColorResourceType) {
39+
convenience init?(resource: ColorResourceType) {
4040
self.init(named: resource.name)
4141
}
4242
#endif

Library/UIKit/UIImage+ImageResource.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public extension UIImage {
3333

3434
- 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.
3535
*/
36-
public convenience init?(resource: ImageResourceType) {
36+
convenience init?(resource: ImageResourceType) {
3737
self.init(named: resource.name)
3838
}
3939
#endif

R.swift.Library.xcodeproj/project.pbxproj

+19-15
Original file line numberDiff line numberDiff line change
@@ -402,28 +402,29 @@
402402
isa = PBXProject;
403403
attributes = {
404404
LastSwiftUpdateCheck = 0720;
405-
LastUpgradeCheck = 1000;
405+
LastUpgradeCheck = 1100;
406406
ORGANIZATIONNAME = "Mathijs Kadijk";
407407
TargetAttributes = {
408408
2F5FBC3F21355A1400A83A69 = {
409409
CreatedOnToolsVersion = 10.0;
410+
LastSwiftMigration = 1100;
410411
ProvisioningStyle = Automatic;
411412
};
412413
806E69911C42BD9C00DE3A8B = {
413414
CreatedOnToolsVersion = 7.2;
414-
LastSwiftMigration = 0900;
415+
LastSwiftMigration = 1020;
415416
};
416417
806E699A1C42BD9C00DE3A8B = {
417418
CreatedOnToolsVersion = 7.2;
418-
LastSwiftMigration = 0900;
419+
LastSwiftMigration = 1020;
419420
};
420421
D592464D1C117A55007F94C7 = {
421422
CreatedOnToolsVersion = 7.1.1;
422-
LastSwiftMigration = 0900;
423+
LastSwiftMigration = 1020;
423424
};
424425
D59246571C117A55007F94C7 = {
425426
CreatedOnToolsVersion = 7.1.1;
426-
LastSwiftMigration = 0900;
427+
LastSwiftMigration = 1020;
427428
};
428429
};
429430
};
@@ -432,6 +433,7 @@
432433
developmentRegion = English;
433434
hasScannedForEncodings = 0;
434435
knownRegions = (
436+
English,
435437
en,
436438
);
437439
mainGroup = D59246441C117A54007F94C7;
@@ -638,7 +640,7 @@
638640
SDKROOT = watchos;
639641
SKIP_INSTALL = YES;
640642
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
641-
SWIFT_VERSION = 4.2;
643+
SWIFT_VERSION = 5.0;
642644
TARGETED_DEVICE_FAMILY = 4;
643645
WATCHOS_DEPLOYMENT_TARGET = 2.2;
644646
};
@@ -669,7 +671,7 @@
669671
PRODUCT_NAME = Rswift;
670672
SDKROOT = watchos;
671673
SKIP_INSTALL = YES;
672-
SWIFT_VERSION = 4.2;
674+
SWIFT_VERSION = 5.0;
673675
TARGETED_DEVICE_FAMILY = 4;
674676
WATCHOS_DEPLOYMENT_TARGET = 2.2;
675677
};
@@ -691,7 +693,7 @@
691693
PRODUCT_NAME = Rswift;
692694
SDKROOT = appletvos;
693695
SKIP_INSTALL = YES;
694-
SWIFT_VERSION = 4.2;
696+
SWIFT_VERSION = 5.0;
695697
TARGETED_DEVICE_FAMILY = 3;
696698
TVOS_DEPLOYMENT_TARGET = 9.0;
697699
};
@@ -713,7 +715,7 @@
713715
PRODUCT_NAME = Rswift;
714716
SDKROOT = appletvos;
715717
SKIP_INSTALL = YES;
716-
SWIFT_VERSION = 4.2;
718+
SWIFT_VERSION = 5.0;
717719
TARGETED_DEVICE_FAMILY = 3;
718720
TVOS_DEPLOYMENT_TARGET = 9.0;
719721
};
@@ -727,7 +729,7 @@
727729
PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests;
728730
PRODUCT_NAME = "$(TARGET_NAME)";
729731
SDKROOT = appletvos;
730-
SWIFT_VERSION = 4.2;
732+
SWIFT_VERSION = 5.0;
731733
TVOS_DEPLOYMENT_TARGET = 9.1;
732734
};
733735
name = Debug;
@@ -740,7 +742,7 @@
740742
PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests;
741743
PRODUCT_NAME = "$(TARGET_NAME)";
742744
SDKROOT = appletvos;
743-
SWIFT_VERSION = 4.2;
745+
SWIFT_VERSION = 5.0;
744746
TVOS_DEPLOYMENT_TARGET = 9.1;
745747
};
746748
name = Release;
@@ -749,6 +751,7 @@
749751
isa = XCBuildConfiguration;
750752
buildSettings = {
751753
ALWAYS_SEARCH_USER_PATHS = NO;
754+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
752755
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
753756
CLANG_CXX_LIBRARY = "libc++";
754757
CLANG_ENABLE_MODULES = YES;
@@ -807,6 +810,7 @@
807810
isa = XCBuildConfiguration;
808811
buildSettings = {
809812
ALWAYS_SEARCH_USER_PATHS = NO;
813+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
810814
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
811815
CLANG_CXX_LIBRARY = "libc++";
812816
CLANG_ENABLE_MODULES = YES;
@@ -873,7 +877,7 @@
873877
PRODUCT_NAME = Rswift;
874878
SKIP_INSTALL = YES;
875879
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
876-
SWIFT_VERSION = 4.2;
880+
SWIFT_VERSION = 5.0;
877881
};
878882
name = Debug;
879883
};
@@ -894,7 +898,7 @@
894898
PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.rswift.library;
895899
PRODUCT_NAME = Rswift;
896900
SKIP_INSTALL = YES;
897-
SWIFT_VERSION = 4.2;
901+
SWIFT_VERSION = 5.0;
898902
};
899903
name = Release;
900904
};
@@ -905,7 +909,7 @@
905909
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
906910
PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests;
907911
PRODUCT_NAME = "$(TARGET_NAME)";
908-
SWIFT_VERSION = 4.2;
912+
SWIFT_VERSION = 5.0;
909913
};
910914
name = Debug;
911915
};
@@ -916,7 +920,7 @@
916920
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
917921
PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.RswiftTests;
918922
PRODUCT_NAME = "$(TARGET_NAME)";
919-
SWIFT_VERSION = 4.2;
923+
SWIFT_VERSION = 5.0;
920924
};
921925
name = Release;
922926
};

R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-iOS.xcscheme

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1000"
3+
LastUpgradeVersion = "1100"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,6 +27,15 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "D592464D1C117A55007F94C7"
34+
BuildableName = "Rswift.framework"
35+
BlueprintName = "Rswift-iOS"
36+
ReferencedContainer = "container:R.swift.Library.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3039
<Testables>
3140
<TestableReference
3241
skipped = "NO">
@@ -39,17 +48,6 @@
3948
</BuildableReference>
4049
</TestableReference>
4150
</Testables>
42-
<MacroExpansion>
43-
<BuildableReference
44-
BuildableIdentifier = "primary"
45-
BlueprintIdentifier = "D592464D1C117A55007F94C7"
46-
BuildableName = "Rswift.framework"
47-
BlueprintName = "Rswift-iOS"
48-
ReferencedContainer = "container:R.swift.Library.xcodeproj">
49-
</BuildableReference>
50-
</MacroExpansion>
51-
<AdditionalOptions>
52-
</AdditionalOptions>
5351
</TestAction>
5452
<LaunchAction
5553
buildConfiguration = "Debug"
@@ -70,8 +68,6 @@
7068
ReferencedContainer = "container:R.swift.Library.xcodeproj">
7169
</BuildableReference>
7270
</MacroExpansion>
73-
<AdditionalOptions>
74-
</AdditionalOptions>
7571
</LaunchAction>
7672
<ProfileAction
7773
buildConfiguration = "Release"

R.swift.Library.xcodeproj/xcshareddata/xcschemes/Rswift-tvOS.xcscheme

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1000"
3+
LastUpgradeVersion = "1100"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,6 +27,15 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "806E69911C42BD9C00DE3A8B"
34+
BuildableName = "Rswift.framework"
35+
BlueprintName = "Rswift-tvOS"
36+
ReferencedContainer = "container:R.swift.Library.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3039
<Testables>
3140
<TestableReference
3241
skipped = "NO">
@@ -39,17 +48,6 @@
3948
</BuildableReference>
4049
</TestableReference>
4150
</Testables>
42-
<MacroExpansion>
43-
<BuildableReference
44-
BuildableIdentifier = "primary"
45-
BlueprintIdentifier = "806E69911C42BD9C00DE3A8B"
46-
BuildableName = "Rswift.framework"
47-
BlueprintName = "Rswift-tvOS"
48-
ReferencedContainer = "container:R.swift.Library.xcodeproj">
49-
</BuildableReference>
50-
</MacroExpansion>
51-
<AdditionalOptions>
52-
</AdditionalOptions>
5351
</TestAction>
5452
<LaunchAction
5553
buildConfiguration = "Debug"
@@ -70,8 +68,6 @@
7068
ReferencedContainer = "container:R.swift.Library.xcodeproj">
7169
</BuildableReference>
7270
</MacroExpansion>
73-
<AdditionalOptions>
74-
</AdditionalOptions>
7571
</LaunchAction>
7672
<ProfileAction
7773
buildConfiguration = "Release"

0 commit comments

Comments
 (0)