Skip to content
Open
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: 3 additions & 1 deletion Figo.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pod::Spec.new do |s|

s.name = "Figo"
s.version = "2.0.2"
s.version = "2.0.3"
s.summary = "Wraps the figo Connect API endpoints in nicely typed Swift functions and types for your conveniece."
s.description = <<-DESC
The figo Connect API allows you to easily access your bank account including transaction history and submitting payments.
Expand All @@ -23,6 +23,8 @@ Pod::Spec.new do |s|
# s.watchos.deployment_target = "2.0"
# s.tvos.deployment_target = "9.0"

s.swift_version = '4.2'

s.source = { :git => "https://github.com/figo-connect/ios-sdk.git", :tag => "#{s.version}" }
s.source_files = "Source/**/*.swift"
s.resources = "*.cer"
Expand Down
52 changes: 37 additions & 15 deletions Figo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -577,25 +577,27 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 0830;
LastUpgradeCheck = 1010;
ORGANIZATIONNAME = CodeStage;
TargetAttributes = {
833C00EE1E2AA6A100AA5E7C = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 1010;
ProvisioningStyle = Manual;
};
833C00FA1E2AA72A00AA5E7C = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 1010;
ProvisioningStyle = Automatic;
};
833C01391E2AAB4200AA5E7C = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 0830;
LastSwiftMigration = 1010;
ProvisioningStyle = Manual;
};
83F3AF211BFF28D900767D77 = {
CreatedOnToolsVersion = 7.1.1;
LastSwiftMigration = 0830;
LastSwiftMigration = 1010;
ProvisioningStyle = Manual;
};
};
Expand Down Expand Up @@ -869,8 +871,8 @@
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 3.0;
VALID_ARCHS = x86_64;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -892,8 +894,8 @@
PRODUCT_BUNDLE_IDENTIFIER = io.figo.macOS;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = macosx;
SWIFT_VERSION = 3.0;
VALID_ARCHS = x86_64;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -911,7 +913,8 @@
PRODUCT_NAME = "Figo-macOS-Tests";
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -928,7 +931,8 @@
PRODUCT_BUNDLE_IDENTIFIER = io.figo.macOS.test;
PRODUCT_NAME = "Figo-macOS-Tests";
SDKROOT = macosx;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -948,7 +952,8 @@
PRODUCT_NAME = "Figo-iOS-Tests";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -966,7 +971,8 @@
PRODUCT_BUNDLE_IDENTIFIER = io.figo.iOS.test;
PRODUCT_NAME = "Figo-iOS-Tests";
SDKROOT = iphoneos;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -976,14 +982,22 @@
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -1015,7 +1029,6 @@
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "arm64 armv7 armv7s x86_64";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand All @@ -1027,14 +1040,22 @@
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand All @@ -1061,7 +1082,6 @@
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VALID_ARCHS = "arm64 armv7 armv7s x86_64";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand All @@ -1079,7 +1099,8 @@
PRODUCT_BUNDLE_IDENTIFIER = io.figo.iOS;
PRODUCT_NAME = Figo;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -1095,7 +1116,8 @@
PRODUCT_BUNDLE_IDENTIFIER = io.figo.iOS;
PRODUCT_NAME = Figo;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion Figo.xcodeproj/xcshareddata/xcschemes/Figo iOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "NO"
Expand Down
2 changes: 1 addition & 1 deletion Figo.xcodeproj/xcshareddata/xcschemes/Figo macOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Response.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal func decodeVoidResponse(_ response: FigoResult<Data>) -> FigoResult<Voi
case .failure(let error):
return .failure(error)
case .success:
return .success()
return .success(())
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Dependencies/Unbox.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ private extension Sequence {
return try self.map(transform)
}

return self.flatMap {
return self.compactMap {
return try? transform($0)
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Endpoints/AuthorizationEndpoints.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public extension FigoClient {
case .success(let authorization):
self.accessToken = authorization.accessToken
self.refreshToken = authorization.refreshToken
completionHandler(.success())
completionHandler(.success(()))
break
case .failure(let error):
completionHandler(.failure(error))
Expand Down
2 changes: 1 addition & 1 deletion Source/Endpoints/TaskEndpoints.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public extension FigoClient {
}

else if state.isEnded {
completionHandler(.success())
completionHandler(.success(()))
}

else if state.isWaitingForPIN {
Expand Down
7 changes: 7 additions & 0 deletions Source/Request Parameters/RetrieveSecuritiesParameters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ public enum SecuritySinceType: String, UnboxableEnum {
*/
public struct RetrieveSecuritiesParameters: JSONObjectConvertible {

public init(accounts: [String]? = nil, since: String? = nil, sinceType: TransactionSinceType? = nil, count: Int? = nil) {
self.accounts = accounts
self.since = since
self.sinceType = sinceType
self.count = count
}

/// **optional** If retrieving the securities for all accounts, filter the transactions to be only from these accounts
public var accounts: [String]?

Expand Down
4 changes: 2 additions & 2 deletions Tests/ErrorHandlingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ class ErrorHandlingTests: BaseTestCaseWithLogin {
}
if case .failure(let error) = result {
XCTAssertGreaterThan(error.code, 0)
XCTAssertGreaterThan(error.description.characters.count, 0)
XCTAssertGreaterThan(error.message?.characters.count ?? 0, 0)
XCTAssertGreaterThan(error.description.count, 0)
XCTAssertGreaterThan(error.message?.count ?? 0, 0)
}

expectation.fulfill()
Expand Down