Skip to content

Swift 5 Support #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
osx_image: xcode10
osx_image: xcode10.2
language: swift
cache:
directories:
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Base58Swift.podspec
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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" => "[email protected]" }
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"
Expand Down
12 changes: 6 additions & 6 deletions Base58Swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@
TargetAttributes = {
770DFBF42214CD2F00E8E70A = {
CreatedOnToolsVersion = 10.1;
LastSwiftMigration = 1010;
LastSwiftMigration = 1020;
};
770DFBFD2214CD2F00E8E70A = {
CreatedOnToolsVersion = 10.1;
LastSwiftMigration = 1010;
LastSwiftMigration = 1020;
};
};
};
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Base58Swift/Base58.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down