-
Notifications
You must be signed in to change notification settings - Fork 4
Upgrade Guide
In order to match the changes from the latest native SDKs, the options related to the faceDetector
are no longer available. This includes the faceDetector
option, and those related to the pose maxPitch
, maxYaw
and maxRaw
.
The method iProov.cancel()
can be used to cancel an ongoing claim without canceling the subscription to the Stream<IProovEvent>
returned by IProov.
final stream = IProov.launch(streamingUrl: '< YOUR STREAMING URL', token: '< YOUR TOKEN >');
iProov.cancel();
The enum IProov.Canceller
has now been renamed following U.S. English naming conventions to IProov.Canceler
The UserTimeout
exception has been added to IProovException
. This exception is only reported on iOS.
An ongoing claim can be cancelled by cancelling the subscription to the Stream<IProovEvent>
returned by IProov.
final stream = IProov.launch(streamingUrl: '< YOUR STREAMING URL', token: '< YOUR TOKEN >');
final subscription = stream.listen((event) {
...
});
subscription.cancel();
With the latest release of the native SDK for iOS and Android, a new UX/UI is provided. Options
has been restructured accordingly, so some options have been renamed and others have been removed.
Old API:
const options = Options(
ui: UiOptions(
title: 'Example',
floatingPromptEnabled: true,
genuinePresenceAssurance: GenuinePresenceAssuranceUiOptions(
autoStartDisabled: true,
notReadyTintColor: Colors.grey,
readyTintColor: Colors.green,
progressBarColor: Colors.blue)));
New API:
const options = Options(
filter: NaturalFilter(style: NaturalFilterStyle.clear),
title: 'Example',
titleTextColor: Colors.black,
promptTextColor: Colors.red,
promptRoundedCorners: true,
promptBackgroundColor: Colors.lightBlue,
surroundColor: Colors.grey,
genuinePresenceAssurance: GenuinePresenceAssuranceOptions(
readyOvalStrokeColor: Colors.purple,
notReadyOvalStrokeColor: Colors.brown
),
livenessAssurance: LivenessAssuranceOptions(
ovalStrokeColor: Colors.purple,
completedOvalStrokeColor: Colors.white
));
For more information on the new Options
, check the documentation here.
The SDK now streams over WebSockets instead of Socket.IO. In practice, this means that you should replace any references to https://*.rp.secure.iproov.me
with wss://*.rp.secure.iproov.me/ws
when passing the streamingURL
parameter to IProov.launch()
.
Further guidance will be forthcoming in due course for any customers making use of reverse proxies. In the meantime, please contact us to discuss your requirements further.
The iProov SDK now returns a Stream<IProovEvent>
instead of having a Function(IProovEvent)
callback.
This means you can now use iProov more idiomatically from Dart, with better integration into the Dart/Flutter ecosystem, enabling, for example, direct usage with StreamBuilder
.
Old API:
IProov.launch(streamingUrl: '< YOUR STREAMING URL', token: '< YOUR TOKEN >', callback: (event) {
...
});
New API:
final stream = IProov.launch(streamingUrl: '< YOUR STREAMING URL', token: '< YOUR TOKEN >');
stream.listen((event) {
...
});
Options
are now built via const
constructors rather than setting properties on a mutable object.
Old API:
final options = Options();
options.ui.title = 'Example';
options.ui.floatingPromptEnabled = true;
options.ui.genuinePresenceAssurance.autoStartDisabled = true;
options.ui.genuinePresenceAssurance.notReadyTintColor = Colors.grey;
options.ui.genuinePresenceAssurance.readyTintColor = Colors.green;
options.ui.genuinePresenceAssurance.progressBarColor = Colors.blue;
New API:
const options = Options(
ui: UiOptions(
title: 'Example',
floatingPromptEnabled: true,
genuinePresenceAssurance: GenuinePresenceAssuranceUiOptions(
autoStartDisabled: true,
notReadyTintColor: Colors.grey,
readyTintColor: Colors.green,
progressBarColor: Colors.blue)));
The type of NetworkOptions.certificates
(previously defined as Options.network.certificates
) has been changed from List<Int>
to List<Uint8List>
.
IProovEventProgress
is now renamed to IProovEventProcessing
to better align with our other SDKs. Its properties and behavior remain unchanged.
Old API:
if (event is IProovEventProgress) {
final progress = event.progress;
final message = event.message;
}
New API:
if (event is IProovEventProcessing) {
final progress = event.progress;
final message = event.message;
}
For convenience, the Dart API client is now unbundled from the Example app and is available as a separate package, iproov_api_client
.
There are also some minor API changes to improve ergonomics and readability.
Old API:
final apiClient = APIClient(baseUrl, apiKey, secret);
New API:
final apiClient = const APIClient(baseUrl: baseUrl, apiKey: apiKey, secret: secret);
There are various new UI options which have been added in the latest versions of the iOS & Android SDKs that are now available for use from Flutter.
Consult the CHANGELOG for further details.