Skip to content

Commit e8789d1

Browse files
committed
Update to swift 5
1 parent 7c30e1a commit e8789d1

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2
1+
5.0

Prephirences.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Pod::Spec.new do |s|
22

33
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
44
s.name = "Prephirences"
5-
s.version = "4.2.1"
5+
s.version = "5.0.0"
66
s.summary = "A Swift library to manage preferences"
77
s.description = <<-DESC
88
Prephirences is a Swift library that provides useful protocols and methods to manage preferences.

Prephirences.xcodeproj/project.pbxproj

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -599,9 +599,11 @@
599599
};
600600
C42114FD1AE7D8E200A09DD9 = {
601601
CreatedOnToolsVersion = 6.3;
602+
LastSwiftMigration = 1020;
602603
};
603604
C42DB81020E26123004380CC = {
604605
CreatedOnToolsVersion = 9.4.1;
606+
LastSwiftMigration = 1020;
605607
ProvisioningStyle = Automatic;
606608
};
607609
C4FF650A1B6B7C7300BFE4F4 = {
@@ -875,7 +877,7 @@
875877
PRODUCT_NAME = Prephirences;
876878
SDKROOT = watchos;
877879
SKIP_INSTALL = YES;
878-
SWIFT_VERSION = 4.2;
880+
SWIFT_VERSION = 5.0;
879881
TARGETED_DEVICE_FAMILY = 4;
880882
WATCHOS_DEPLOYMENT_TARGET = 3.0;
881883
};
@@ -897,7 +899,7 @@
897899
PRODUCT_NAME = Prephirences;
898900
SDKROOT = watchos;
899901
SKIP_INSTALL = YES;
900-
SWIFT_VERSION = 4.2;
902+
SWIFT_VERSION = 5.0;
901903
TARGETED_DEVICE_FAMILY = 4;
902904
VALIDATE_PRODUCT = YES;
903905
WATCHOS_DEPLOYMENT_TARGET = 3.0;
@@ -921,7 +923,7 @@
921923
SDKROOT = appletvos;
922924
SKIP_INSTALL = YES;
923925
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
924-
SWIFT_VERSION = 4.2;
926+
SWIFT_VERSION = 5.0;
925927
TARGETED_DEVICE_FAMILY = 3;
926928
TVOS_DEPLOYMENT_TARGET = 9.2;
927929
};
@@ -943,7 +945,7 @@
943945
PRODUCT_NAME = Prephirences;
944946
SDKROOT = appletvos;
945947
SKIP_INSTALL = YES;
946-
SWIFT_VERSION = 4.2;
948+
SWIFT_VERSION = 5.0;
947949
TARGETED_DEVICE_FAMILY = 3;
948950
TVOS_DEPLOYMENT_TARGET = 9.2;
949951
VALIDATE_PRODUCT = YES;
@@ -1003,7 +1005,7 @@
10031005
ONLY_ACTIVE_ARCH = YES;
10041006
SDKROOT = macosx;
10051007
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1006-
SWIFT_VERSION = 4.0;
1008+
SWIFT_VERSION = 5.0;
10071009
VERSIONING_SYSTEM = "apple-generic";
10081010
VERSION_INFO_PREFIX = "";
10091011
};
@@ -1054,7 +1056,7 @@
10541056
MTL_ENABLE_DEBUG_INFO = NO;
10551057
SDKROOT = macosx;
10561058
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1057-
SWIFT_VERSION = 4.0;
1059+
SWIFT_VERSION = 5.0;
10581060
VERSIONING_SYSTEM = "apple-generic";
10591061
VERSION_INFO_PREFIX = "";
10601062
};
@@ -1082,7 +1084,7 @@
10821084
PRODUCT_NAME = Prephirences;
10831085
SDKROOT = iphoneos;
10841086
SKIP_INSTALL = YES;
1085-
SWIFT_VERSION = 4.2;
1087+
SWIFT_VERSION = 5.0;
10861088
TARGETED_DEVICE_FAMILY = "1,2";
10871089
};
10881090
name = Debug;
@@ -1104,7 +1106,7 @@
11041106
PRODUCT_NAME = Prephirences;
11051107
SDKROOT = iphoneos;
11061108
SKIP_INSTALL = YES;
1107-
SWIFT_VERSION = 4.2;
1109+
SWIFT_VERSION = 5.0;
11081110
TARGETED_DEVICE_FAMILY = "1,2";
11091111
VALIDATE_PRODUCT = YES;
11101112
};
@@ -1130,7 +1132,7 @@
11301132
PRODUCT_BUNDLE_IDENTIFIER = tv.phimage.Prephirences;
11311133
PRODUCT_NAME = Prephirences;
11321134
SKIP_INSTALL = YES;
1133-
SWIFT_VERSION = 4.2;
1135+
SWIFT_VERSION = 5.0;
11341136
};
11351137
name = Debug;
11361138
};
@@ -1150,7 +1152,7 @@
11501152
PRODUCT_BUNDLE_IDENTIFIER = tv.phimage.Prephirences;
11511153
PRODUCT_NAME = Prephirences;
11521154
SKIP_INSTALL = YES;
1153-
SWIFT_VERSION = 4.2;
1155+
SWIFT_VERSION = 5.0;
11541156
};
11551157
name = Release;
11561158
};
@@ -1173,7 +1175,7 @@
11731175
PRODUCT_BUNDLE_IDENTIFIER = org.phimage.PrephirencesMacTests;
11741176
PRODUCT_NAME = "$(TARGET_NAME)";
11751177
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
1176-
SWIFT_VERSION = 4.2;
1178+
SWIFT_VERSION = 5.0;
11771179
};
11781180
name = Debug;
11791181
};
@@ -1195,7 +1197,7 @@
11951197
MACOSX_DEPLOYMENT_TARGET = 10.13;
11961198
PRODUCT_BUNDLE_IDENTIFIER = org.phimage.PrephirencesMacTests;
11971199
PRODUCT_NAME = "$(TARGET_NAME)";
1198-
SWIFT_VERSION = 4.2;
1200+
SWIFT_VERSION = 5.0;
11991201
};
12001202
name = Release;
12011203
};
@@ -1209,7 +1211,7 @@
12091211
PRODUCT_BUNDLE_IDENTIFIER = tv.phimage.PrephirencesiOSTests;
12101212
PRODUCT_NAME = "$(TARGET_NAME)";
12111213
SDKROOT = iphoneos;
1212-
SWIFT_VERSION = 4.2;
1214+
SWIFT_VERSION = 5.0;
12131215
};
12141216
name = Debug;
12151217
};
@@ -1222,7 +1224,7 @@
12221224
PRODUCT_BUNDLE_IDENTIFIER = tv.phimage.PrephirencesiOSTests;
12231225
PRODUCT_NAME = "$(TARGET_NAME)";
12241226
SDKROOT = iphoneos;
1225-
SWIFT_VERSION = 4.2;
1227+
SWIFT_VERSION = 5.0;
12261228
VALIDATE_PRODUCT = YES;
12271229
};
12281230
name = Release;

Sources/PatternPreferences.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ extension Collection {
605605
}
606606

607607
func find(_ predicate: (Self.Iterator.Element) throws -> Bool) rethrows -> Self.Iterator.Element? {
608-
return try index(where: predicate).map({ self[$0] })
608+
return try firstIndex(where: predicate).map({ self[$0] })
609609
}
610610

611611
}

0 commit comments

Comments
 (0)