Skip to content

Commit

Permalink
Improvements (#95)
Browse files Browse the repository at this point in the history
* Improvements
* Swift Lint fixes
* Using new networking library version 1.1.4
  • Loading branch information
kober32 authored Aug 15, 2022
1 parent e4e15ca commit a40eb13
Show file tree
Hide file tree
Showing 12 changed files with 175 additions and 179 deletions.
1 change: 0 additions & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
github "wultra/powerauth-mobile-sdk" "release/1.7.x"
github "wultra/networking-apple" "release/1.1.x"
7 changes: 3 additions & 4 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
binary "https://raw.githubusercontent.com/wultra/powerauth-mobile-sdk-spm/develop/PowerAuth2.json" "1.6.2"
binary "https://raw.githubusercontent.com/wultra/powerauth-mobile-sdk-spm/develop/PowerAuthCore.json" "1.6.2"
github "wultra/networking-apple" "77288a9d1c440784d83780f8eb710d4356c0e331"
github "wultra/powerauth-mobile-sdk" "ee587d5b85b4f8692208148ab8be697ea2f5e50a"
binary "https://raw.githubusercontent.com/wultra/powerauth-mobile-sdk-spm/develop/PowerAuth2.json" "1.7.1"
binary "https://raw.githubusercontent.com/wultra/powerauth-mobile-sdk-spm/develop/PowerAuthCore.json" "1.7.1"
github "wultra/networking-apple" "eaf413b0ef0fcf2c5cef9c3ff0735b2643450e8c"
2 changes: 1 addition & 1 deletion Deploy/WultraMobileTokenSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Pod::Spec.new do |s|
s.subspec 'Common' do |sub|
sub.source_files = 'WultraMobileTokenSDK/Common/**/*.swift'
sub.dependency 'PowerAuth2', '>= 1.7'
sub.dependency 'WultraPowerAuthNetworking', '>= 1.1.3'
sub.dependency 'WultraPowerAuthNetworking', '>= 1.1.4'
end

# 'Operations' subspec
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ let package = Package(
.library(name: "WultraMobileTokenSDK", targets: ["WultraMobileTokenSDK"])
],
dependencies: [
.package(name: "PowerAuth2", url: "https://github.com/wultra/powerauth-mobile-sdk-spm.git", .upToNextMinor(from: "1.6.3")),
.package(name: "WultraPowerAuthNetworking", url: "https://github.com/wultra/networking-apple.git", .upToNextMinor(from: "1.1.3"))
.package(name: "PowerAuth2", url: "https://github.com/wultra/powerauth-mobile-sdk-spm.git", .upToNextMinor(from: "1.7.0")),
.package(name: "WultraPowerAuthNetworking", url: "https://github.com/wultra/networking-apple.git", .upToNextMinor(from: "1.1.4"))
],
targets: [
.target(
Expand Down
4 changes: 2 additions & 2 deletions WultraMobileTokenSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Pod::Spec.new do |s|
# 'Common' subspec
s.subspec 'Common' do |sub|
sub.source_files = 'WultraMobileTokenSDK/Common/**/*.swift'
sub.dependency 'PowerAuth2', '>= 1.6'
sub.dependency 'WultraPowerAuthNetworking', '>= 1.1.3'
sub.dependency 'PowerAuth2', '>= 1.7'
sub.dependency 'WultraPowerAuthNetworking', '>= 1.1.4'
end

# 'Operations' subspec
Expand Down
22 changes: 22 additions & 0 deletions WultraMobileTokenSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@
DCC5CC962449EE21004679AC /* Sources */,
DCC5CC972449EE21004679AC /* Frameworks */,
DCC5CC982449EE21004679AC /* Resources */,
DCDA0A3128A6851400EDB6D4 /* Swift Lint */,
);
buildRules = (
);
Expand Down Expand Up @@ -429,6 +430,27 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
DCDA0A3128A6851400EDB6D4 /* Swift Lint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Swift Lint";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if ! [ -x \"$(command -v swiftlint)\" ]; then\n echo 'warning: swiftlint is not installed on this computer.' >&2\n exit 0\nfi\n\nswiftlint\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
DC61622F248508F8000DED17 /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down
18 changes: 6 additions & 12 deletions WultraMobileTokenSDK/Operations/QR/WMTQROperationParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -303,19 +303,13 @@ public class WMTQROperationParser {
bic = nil
}
let allowedChars = "01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for c in iban {
if allowedChars.firstIndex(of: c) == nil {
// Invalid character in IBAN
return nil
}
if iban.contains(where: { !allowedChars.contains($0) }) {
// Invalid character in IBAN
return nil
}
if let bic = bic {
for c in bic {
if allowedChars.firstIndex(of: c) == nil {
// Invalid character in BIC
return nil
}
}
if bic?.contains(where: { !allowedChars.contains($0) }) == true {
// Invalid character in BIC
return nil
}
return .account(iban: iban, bic: bic)
}
Expand Down
Loading

0 comments on commit a40eb13

Please sign in to comment.