From 28e9af2d3ac2d11daeaf4373815bf720d5417343 Mon Sep 17 00:00:00 2001 From: keefertaylor Date: Wed, 27 Mar 2019 02:13:53 +0000 Subject: [PATCH 1/4] Update to Swift5 --- Base58Swift.xcodeproj/project.pbxproj | 12 ++++++------ Base58Swift/Base58.swift | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Base58Swift.xcodeproj/project.pbxproj b/Base58Swift.xcodeproj/project.pbxproj index 4d41c64..c92a51f 100644 --- a/Base58Swift.xcodeproj/project.pbxproj +++ b/Base58Swift.xcodeproj/project.pbxproj @@ -165,11 +165,11 @@ TargetAttributes = { 770DFBF42214CD2F00E8E70A = { CreatedOnToolsVersion = 10.1; - LastSwiftMigration = 1010; + LastSwiftMigration = 1020; }; 770DFBFD2214CD2F00E8E70A = { CreatedOnToolsVersion = 10.1; - LastSwiftMigration = 1010; + LastSwiftMigration = 1020; }; }; }; @@ -428,7 +428,7 @@ PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -459,7 +459,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.keefertaylor.Base58Swift; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -480,7 +480,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.keefertaylor.Base58SwiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -500,7 +500,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.keefertaylor.Base58SwiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/Base58Swift/Base58.swift b/Base58Swift/Base58.swift index 98d3b3a..6c1df1e 100644 --- a/Base58Swift/Base58.swift +++ b/Base58Swift/Base58.swift @@ -68,7 +68,7 @@ public enum Base58 { let byteString = [UInt8](input.utf8) for char in byteString.reversed() { - guard let alphabetIndex = alphabet.index(of: char) else { + guard let alphabetIndex = alphabet.firstIndex(of: char) else { return nil } answer += (i * BigUInt(alphabetIndex)) From 7570c5f9365279fbe529f4122e414dc781edca09 Mon Sep 17 00:00:00 2001 From: keefertaylor Date: Wed, 27 Mar 2019 02:14:29 +0000 Subject: [PATCH 2/4] Bump version for Swift 5 --- Base58Swift.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Base58Swift.podspec b/Base58Swift.podspec index 7103bb7..6087728 100644 --- a/Base58Swift.podspec +++ b/Base58Swift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Base58Swift" - s.version = "1.1.0" + s.version = "2.0.0" s.summary = "A pure swift implementation of base58 string encoding and decoding." s.description = <<-DESC A pure swift implementation of base58 string encoding and decoding. Based off of https://github.com/jbenet/go-base58. @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.homepage = "https://github.com/keefertaylor/Base58Swift" s.license = { :type => "MIT", :file => "LICENSE" } s.author = { "Keefer Taylor" => "keefer@keefertaylor.com" } - s.source = { :git => "https://github.com/keefertaylor/Base58Swift.git", :tag => "1.1.0" } + s.source = { :git => "https://github.com/keefertaylor/Base58Swift.git", :tag => "2.0.0" } s.source_files = "Base58Swift/*.swift" s.swift_version = "4.2" s.ios.deployment_target = "8.0" From c3e05421acc1140c66904877fbc3984996bbd74c Mon Sep 17 00:00:00 2001 From: keefertaylor Date: Wed, 27 Mar 2019 02:22:35 +0000 Subject: [PATCH 3/4] Update OSX image --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 03152f1..8065fef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -osx_image: xcode10 +osx_image: xcode10.2 language: swift cache: directories: From 66de318ea53474a303ffc0df248e195bcb3d70d1 Mon Sep 17 00:00:00 2001 From: keefertaylor Date: Wed, 27 Mar 2019 02:34:42 +0000 Subject: [PATCH 4/4] update simulator version for build --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8065fef..f8e62cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ after_deploy: - pod trunk push --skip-import-validation --skip-tests --allow-warnings script: - set -o pipefail && xcodebuild test -scheme Base58Swift -destination 'platform=iOS - Simulator,name=iPhone XS,OS=12.0' ONLY_ACTIVE_ARCH=YES | xcpretty + Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty after_success: - slather - bash <(curl -s https://codecov.io/bash)