Synaps is an all-in-one compliance platform. It offers a simple, fast and secure way to meet compliance requirements at scale.
Visit Synaps.io | Read the Synaps documentation
pod 'SynapsVerify'
github "synaps-io/ios-verify"
dependencies: [
.package(url: "https://github.com/synaps-io/ios-verify", from: "0.0.2")
]
import SynapsVerify
...
@State private var sessionId = ""
var body: some View {
...
VerifyView(
sessionId: self.$sessionId,
lang: .french,
)
...
The library allows you to use all the features of standard View with a lot of new cool features
First of all, drag & drop a new View inside your view controller in storyboard.
Then set the View class to VerifyUiView
and link your view to your variable of the same type in your ViewController
Swift
import UIKit
import SynapsVerify
class VerifyViewController : UIViewController {
@IBOutlet weak var verifyView: VerifyUiView!
var sessionId: String = ""
override func viewDidLoad() {
super.viewDidLoad()
verifyView.startSession(sessionId: sessionId, lang: .french)
}
}
You are free to use VerifyUiView
without StoryBoard
First of all, you should set the session id. Session Id can be referred as a customer verification session. More info
Parameter name | Parameter type | Default | Required | Description |
---|---|---|---|---|
sessionId |
string |
'' |
Y | Session can be referred as a customer verification session. More info |
lang |
VerifyLang |
.english |
N | You can set a predefined language for your user. Synaps already take advantage of browser language to display the relevant language to the end-user but if your user has set up a language option to your website, you can definitely pass it as an option. |
tier |
int |
null |
N | Tier is a simply way to divide your workflow into small pieces. It is very useful when you offer different features based on the verification level of your customer. More info |
Avant de lancer une session Verify. Le projet de votre application a besoin de quelque configuration.
The application must declare the use of the NFC chip, and must have NFC entilement :
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>TAG</string>
</array>
The Info.plist file must contain the field NFCReaderUsageDescription
Your application's Info.plist file must contain the application IDs needed to scan the documents.
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>A0000002471001</string>
<string>A0000002472001</string>
<string>E80704007F00070302</string>
<string>A000000167455349474E</string>
<string>A0000002480100</string>
<string>A0000002480200</string>
<string>A0000002480300</string>
<string>A00000045645444C2D3031</string>
<string>D2760000850101</string>
<string>00000000000000</string>
</array>
More informations here : https://developer.apple.com/documentation/corenfc/nfciso7816tag
The Info.plist file may contain the field NSCameraUsageDescription
To be able to take photos and analyze identification documents, the right to use the camera is required and must be claimed before building the Verify view (swiftui or UIKit). The Verify view will fire a warning
if the rights are not acquired when the view is built.
AVCaptureDevice.requestAccess(
for: .video,
completionHandler: { accessGranted in
...
}
)
Now you are ready to listen Verify event by using a callback
Swift UI
VerifyView(
...
)
.onReady {
...
}
.onFinished {
...
}
UIKit
verifyView.onReady {
...
}
verifyView.onFinished {
...
}
Parameter name | Parameter type | Default | Required | Description |
---|---|---|---|---|
onReady |
() => Void |
null |
No | Event listener called when the page is fully loaded |
onFinished |
() => Void |
null |
No | Event listener called when the user finished verification |