Skip to content

Commit

Permalink
Release 9.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
iProovBot committed Oct 28, 2021
1 parent c7c953c commit 92f24b9
Show file tree
Hide file tree
Showing 57 changed files with 309 additions and 225 deletions.
2 changes: 0 additions & 2 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@
"${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework",
"${BUILT_PRODUCTS_DIR}/Socket.IO-Client-Swift/SocketIO.framework",
"${BUILT_PRODUCTS_DIR}/Starscream/Starscream.framework",
"${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework",
"${BUILT_PRODUCTS_DIR}/iProovAPIClient/iProovAPIClient.framework",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/iProov/iProov.framework/iProov",
);
Expand All @@ -229,7 +228,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SocketIO.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Starscream.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/iProovAPIClient.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/iProov.framework",
);
Expand Down
125 changes: 64 additions & 61 deletions Example/Example/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,69 +41,72 @@ class ViewController: UIViewController {
hud.mode = .indeterminate
hud.label.text = "Getting token..."

apiClient.getToken(assuranceType: assuranceType, type: claimType, userID: userID, success: { token in

IProov.launch(streamingURL: Self.baseURL, token: token) { status in

switch status {
case .connecting:
hud.mode = .indeterminate
hud.label.text = "Connecting..."

case .connected:
break

case let .processing(progress, message):
hud.mode = .determinateHorizontalBar
hud.label.text = message
hud.progress = Float(progress)

case let .success(result):
hud.hide(animated: true)

let alert = UIAlertController(title: "✅ Success", message: "Token: \(result.token)", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Dismiss", style: .default, handler: nil))
self.present(alert, animated: true, completion: nil)

case let .failure(result):
hud.hide(animated: true)

let alert = UIAlertController(title: "\(result.feedbackCode)", message: result.reason, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
alert.addAction(UIAlertAction(title: "Retry", style: .default, handler: { (_) -> Void in
self.launch(claimType: claimType, assuranceType: assuranceType)
}))
self.present(alert, animated: true, completion: nil)

case .cancelled:
hud.hide(animated: true)

case let .error(error):
hud.hide(animated: true)

let alert = UIAlertController(title: "❌ Error", message: error.localizedDescription, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
alert.addAction(UIAlertAction(title: "Retry", style: .default, handler: { (_) -> Void in
self.launch(claimType: claimType, assuranceType: assuranceType)
}))
self.present(alert, animated: true, completion: nil)

@unknown default:
break
apiClient.getToken(assuranceType: assuranceType,
type: claimType,
userID: userID) { result in

switch result {
case let .success(token):
IProov.launch(streamingURL: Self.baseURL, token: token) { status in

switch status {
case .connecting:
hud.mode = .indeterminate
hud.label.text = "Connecting..."

case .connected:
break

case let .processing(progress, message):
hud.mode = .determinateHorizontalBar
hud.label.text = message
hud.progress = Float(progress)

case let .success(result):
hud.hide(animated: true)

let alert = UIAlertController(title: "✅ Success", message: "Token: \(result.token)", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Dismiss", style: .default, handler: nil))
self.present(alert, animated: true, completion: nil)

case let .failure(result):
hud.hide(animated: true)

let alert = UIAlertController(title: "\(result.feedbackCode)", message: result.reason, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
alert.addAction(UIAlertAction(title: "Retry", style: .default, handler: { (_) -> Void in
self.launch(claimType: claimType, assuranceType: assuranceType)
}))
self.present(alert, animated: true, completion: nil)

case .cancelled:
hud.hide(animated: true)

case let .error(error):
hud.hide(animated: true)

let alert = UIAlertController(title: "❌ Error", message: error.localizedDescription, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
alert.addAction(UIAlertAction(title: "Retry", style: .default, handler: { (_) -> Void in
self.launch(claimType: claimType, assuranceType: assuranceType)
}))
self.present(alert, animated: true, completion: nil)

@unknown default:
break
}
}
}

}, failure: { error in
case let .failure(error):
hud.hide(animated: true)

hud.hide(animated: true)

let alert = UIAlertController(title: "Failed to get token", message: error.localizedDescription, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
alert.addAction(UIAlertAction(title: "Retry", style: .default, handler: { (_) -> Void in
self.launch(claimType: claimType, assuranceType: assuranceType)
}))
self.present(alert, animated: true, completion: nil)

})
let alert = UIAlertController(title: "Failed to get token", message: error.localizedDescription, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
alert.addAction(UIAlertAction(title: "Retry", style: .default, handler: { (_) -> Void in
self.launch(claimType: claimType, assuranceType: assuranceType)
}))
self.present(alert, animated: true, completion: nil)
}
}
}
}
22 changes: 9 additions & 13 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
PODS:
- Alamofire (4.9.1)
- iProov (9.0.1):
- Alamofire (5.4.3)
- iProov (9.1.0):
- Socket.IO-Client-Swift (~> 16.0)
- iProovAPIClient (0.4.0):
- Alamofire (~> 4.9)
- SwiftyJSON (~> 5.0)
- iProovAPIClient (1.0.0):
- Alamofire (~> 5.0)
- MBProgressHUD (1.2.0)
- Socket.IO-Client-Swift (16.0.1):
- Starscream (~> 4.0)
- Starscream (4.0.4)
- SwiftyJSON (5.0.1)

DEPENDENCIES:
- iProov (from `../`)
Expand All @@ -22,7 +20,6 @@ SPEC REPOS:
- MBProgressHUD
- Socket.IO-Client-Swift
- Starscream
- SwiftyJSON

EXTERNAL SOURCES:
iProov:
Expand All @@ -32,18 +29,17 @@ EXTERNAL SOURCES:

CHECKOUT OPTIONS:
iProovAPIClient:
:commit: 239ca8a962e4dbc5360448a8afe0ab88dc612dec
:commit: 9cf62d6a9655cca4dd7eb8cec4159b4a25133099
:git: https://github.com/iProov/ios-api-client.git

SPEC CHECKSUMS:
Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18
iProov: 229c72183e440790a58a0298ae24f1515eea1432
iProovAPIClient: 9484820449f5570655325bc48e58d2fc02a4411e
Alamofire: e447a2774a40c996748296fa2c55112fdbbc42f9
iProov: aa2bf3acd526d9545c649e3de1a3bf2ee535c4dc
iProovAPIClient: d0246a5a46e48c7f0f9f61f6606b92de7faa3959
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
Socket.IO-Client-Swift: c116d6dc9fd6be9c259bacfe143f8725bce7d79e
Starscream: 5178aed56b316f13fa3bc55694e583d35dd414d9
SwiftyJSON: 2f33a42c6fbc52764d96f13368585094bfd8aa5e

PODFILE CHECKSUM: 39da1444dfba6fa4a1792b0aceedd179eef46153

COCOAPODS: 1.10.2
COCOAPODS: 1.11.2
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![iProov: Flexible authentication for identity assurance](images/banner.jpg)

# iProov Biometrics iOS SDK v9.0.1
# iProov Biometrics iOS SDK v9.1.0

## Table of contents

Expand All @@ -23,7 +23,9 @@ The iProov Biometrics iOS SDK enables you to integrate iProov into your iOS app.
### Requirements

- iOS 10.0 and above
- Xcode 11.0 and above
- Xcode 12.4 and above*

*(\*You may find that previous versions of Xcode also work fine, but this is not officially supported.)*

The framework has been written in Swift 5.3, and we recommend use of Swift for the simplest and cleanest integration, however it is also possible to call iProov from within an Objective-C app using our [Objective-C API](https://github.com/iProov/ios/wiki/Objective-C-Support), which provides an Objective-C friendly API to invoke the Swift code.

Expand All @@ -44,7 +46,7 @@ These dependencies are vendored and compiled into the SDK, this requires no acti

Module stability is supported in Swift 5.1 (Xcode 11) and above. The advantage of this is that the SDK no longer needs to be recompiled for every new version of the Swift compiler.

iProov is built with the _"Build Libraries for Distribution"_ build setting enabled, which means that its dependencies must also be built in the same fashion. However, this is still not fully supported in either Cocoapods nor Carthage as of July 2021, therefore some workarounds are required (see installation documentation for details).
iProov is built with the _"Build Libraries for Distribution"_ build setting enabled, which means that its dependencies must also be built in the same fashion. This must be also be set for both Cocoapods and Carthage (see installation documentation for details).

## Repository contents

Expand Down Expand Up @@ -354,7 +356,7 @@ options.ui.stringsTable = "Localizable-MyApp.strings" // Pass a custom strings f
Configure options relating to networking & security
*/

options.network.certificates = [Bundle.main.path(forResource: "custom_cert", ofType: "der")!] // Supply an array of paths of certificates to be used for pinning. Useful when using your own reverse proxy to stream to iProov. Pinning can be disabled by passing an empty array (never do this in production apps!) Certificates should be generated in DER-encoded X.509 certificate format, e.g. with the command: $ openssl x509 -in cert.crt -outform der -out cert.der
options.network.certificates = [Bundle.main.path(forResource: "custom_cert", ofType: "der")!] // Certificates to be used for SSL pinning. Array elements should be of type String (path to certificate) or Data (the certificate itself). Useful when using your own reverse proxy to stream to iProov. Pinning can be disabled by passing an empty array (never do this in production apps!) See more info in the FAQs. Certificates should be passed in DER-encoded X.509 certificate format, e.g. with the command: $ openssl x509 -in cert.crt -outform der -out cert.der
options.network.timeout = 10 // The network timeout in seconds.
options.network.path = "/socket.io/v2/" // The path to use when streaming, defaults to /socket.io/v2/. You should not need to change this unless directed to do so by iProov.

Expand Down
3 changes: 2 additions & 1 deletion carthage/IProov.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
"8.3.1": "https://raw.githubusercontent.com/iProov/ios/master/carthage/iProov_8_3_1.zip",
"8.4.0": "https://raw.githubusercontent.com/iProov/ios/master/carthage/iProov_8_4_0.zip",
"9.0.0": "https://raw.githubusercontent.com/iProov/ios/master/carthage/iProov_9_0_0.zip",
"9.0.1": "https://raw.githubusercontent.com/iProov/ios/master/carthage/iProov_9_0_1.zip"
"9.0.1": "https://raw.githubusercontent.com/iProov/ios/master/carthage/iProov_9_0_1.zip",
"9.1.0": "https://raw.githubusercontent.com/iProov/ios/master/carthage/iProov_9_1_0.zip"
}
Binary file added carthage/iProov_9_1_0.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 5 additions & 5 deletions iProov.framework/Headers/iProov-Swift.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ SWIFT_CLASS_NAMED("LivenessAssurance")

SWIFT_CLASS_NAMED("Network")
@interface IPNetworkOptions : NSObject
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull certificates;
@property (nonatomic, copy) NSArray * _Nonnull certificates;
@property (nonatomic) NSTimeInterval timeout;
@property (nonatomic, copy) NSString * _Nonnull path;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
Expand Down Expand Up @@ -797,7 +797,7 @@ SWIFT_CLASS_NAMED("LivenessAssurance")

SWIFT_CLASS_NAMED("Network")
@interface IPNetworkOptions : NSObject
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull certificates;
@property (nonatomic, copy) NSArray * _Nonnull certificates;
@property (nonatomic) NSTimeInterval timeout;
@property (nonatomic, copy) NSString * _Nonnull path;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
Expand Down Expand Up @@ -1234,7 +1234,7 @@ SWIFT_CLASS_NAMED("LivenessAssurance")

SWIFT_CLASS_NAMED("Network")
@interface IPNetworkOptions : NSObject
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull certificates;
@property (nonatomic, copy) NSArray * _Nonnull certificates;
@property (nonatomic) NSTimeInterval timeout;
@property (nonatomic, copy) NSString * _Nonnull path;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
Expand Down Expand Up @@ -1674,7 +1674,7 @@ SWIFT_CLASS_NAMED("LivenessAssurance")

SWIFT_CLASS_NAMED("Network")
@interface IPNetworkOptions : NSObject
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull certificates;
@property (nonatomic, copy) NSArray * _Nonnull certificates;
@property (nonatomic) NSTimeInterval timeout;
@property (nonatomic, copy) NSString * _Nonnull path;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
Expand Down Expand Up @@ -2111,7 +2111,7 @@ SWIFT_CLASS_NAMED("LivenessAssurance")

SWIFT_CLASS_NAMED("Network")
@interface IPNetworkOptions : NSObject
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull certificates;
@property (nonatomic, copy) NSArray * _Nonnull certificates;
@property (nonatomic) NSTimeInterval timeout;
@property (nonatomic, copy) NSString * _Nonnull path;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
Expand Down
Binary file modified iProov.framework/Info.plist
Binary file not shown.
16 changes: 10 additions & 6 deletions iProov.framework/Modules/iProov.swiftmodule/arm.swiftinterface
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ import AVFoundation
import Accelerate
import AudioToolbox
import CommonCrypto
import CoreImage
import CoreMedia
import CoreMotion
import CoreVideo
import Dispatch
import Foundation
import ImageIO
import OpenGLES
import QuartzCore
import Security
Expand Down Expand Up @@ -56,6 +54,12 @@ public enum IProovError : Foundation.LocalizedError, Foundation.CustomNSError {
public var errorDescription: Swift.String? {
get
}
public var localizedTitle: Swift.String {
get
}
public var localizedMessage: Swift.String? {
get
}
}
@objc public protocol IProovPresentationDelegate : AnyObject {
@objc func present(iProovViewController: UIKit.UIViewController, completion: (() -> Swift.Void)?)
Expand Down Expand Up @@ -109,7 +113,7 @@ extension IProov {
@objc deinit
}
@_inheritsConvenienceInitializers @objc(IPNetworkOptions) public class Network : ObjectiveC.NSObject {
@objc public var certificates: [Swift.String]
@objc public var certificates: [Any]
@objc public var timeout: Swift.Double
@objc public var path: Swift.String
@objc override dynamic public init()
Expand Down Expand Up @@ -193,9 +197,6 @@ extension IProov {
public static func launch(streamingURL: Swift.String, token: Swift.String, options: iProov.Options = Options(), callback: @escaping iProov.Callback)
@objc public static var keyPair: iProov.KeyPair
}
extension SSLSecurity : Starscream.CertificatePinning {
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: (Starscream.PinningState) -> Swift.Void)
}
public protocol SSLTrustValidator {
func isValid(_ trust: Security.SecTrust, domain: Swift.String?) -> Swift.Bool
}
Expand All @@ -216,6 +217,9 @@ open class SSLSecurity : iProov.SSLTrustValidator {
public func publicKeyChain(_ trust: Security.SecTrust) -> [Security.SecKey]
@objc deinit
}
extension SSLSecurity : Starscream.CertificatePinning {
public func evaluateTrust(trust: Security.SecTrust, domain: Swift.String?, completion: (Starscream.PinningState) -> Swift.Void)
}
extension UIImage {
convenience public init?(pixelBuffer: CoreVideo.CVPixelBuffer)
}
Expand Down
Binary file modified iProov.framework/Modules/iProov.swiftmodule/arm.swiftmodule
Binary file not shown.
Loading

0 comments on commit 92f24b9

Please sign in to comment.