From 946001fcd09161136f7957050cf9bfe5ad46d2b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ANNotunzdY=C2=AE?= Date: Tue, 2 Apr 2019 13:34:17 +0900 Subject: [PATCH 1/2] Convert to Swift 5 --- PySwiftyRegex.xcodeproj/project.pbxproj | 13 +++++++------ .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++++ PySwiftyRegex/PySwiftyRegex.swift | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 PySwiftyRegex.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/PySwiftyRegex.xcodeproj/project.pbxproj b/PySwiftyRegex.xcodeproj/project.pbxproj index c9bf6c2..164bd0e 100644 --- a/PySwiftyRegex.xcodeproj/project.pbxproj +++ b/PySwiftyRegex.xcodeproj/project.pbxproj @@ -160,11 +160,11 @@ TargetAttributes = { 0CEBDD231B39B8C3003A40BB = { CreatedOnToolsVersion = 7.0; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; }; 0CEBDD2C1B39B8C4003A40BB = { CreatedOnToolsVersion = 7.0; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; }; }; }; @@ -173,6 +173,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 0CEBDCD41B39B2FB003A40BB; @@ -360,7 +361,7 @@ MACH_O_TYPE = mh_dylib; MACOSX_DEPLOYMENT_TARGET = 10.9; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -380,7 +381,7 @@ MACOSX_DEPLOYMENT_TARGET = 10.9; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -395,7 +396,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "me.cezheng.PySwiftyRegex-OSXTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -411,7 +412,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/PySwiftyRegex.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/PySwiftyRegex.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/PySwiftyRegex.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/PySwiftyRegex/PySwiftyRegex.swift b/PySwiftyRegex/PySwiftyRegex.swift index cfb29ab..ca037ef 100644 --- a/PySwiftyRegex/PySwiftyRegex.swift +++ b/PySwiftyRegex/PySwiftyRegex.swift @@ -271,7 +271,7 @@ public class re { return } - end = string.characters.index(string.startIndex, offsetBy: result.range.location) + end = string.index(string.startIndex, offsetBy: result.range.location) results.append(String(string[start.. 0 { results += MatchObject(string: string, match: result).groups() From 9b7ff2f9588b25172b51cca887cd673365cb607c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ANNotunzdY=C2=AE?= Date: Thu, 11 Apr 2019 15:33:33 +0900 Subject: [PATCH 2/2] Travis CI - Xcode version changed. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e97d495..51ceee2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: objective-c os: osx -osx_image: xcode9 +osx_image: xcode10.2 env: global: