diff --git a/.travis.yml b/.travis.yml index 03152f1..f8e62cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -osx_image: xcode10 +osx_image: xcode10.2 language: swift cache: directories: @@ -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) 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" 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))