-
Notifications
You must be signed in to change notification settings - Fork 10
Objective C Support
Emre Sari edited this page Oct 18, 2023
·
5 revisions
We strongly recommend Swift for the cleanest and easiest integration. However, we have developed a convenient wrapper to provide an Objective-C-friendly API. It's a little more clunky, however you can still access all of the same SDK functionality, and there is no difference in terms of the user experience whether you integrate from Swift or ObjC.
Be sure to follow the main README. The usual installation (Cocoapods/Carthage) steps still apply, as does adding the NSCameraUsageDescription
to your Info.plist.
You can then launch the SDK as follows:
#import <iProov/iProov-Swift.h>
[IProov launchWithStreamingURL: [NSURL URLWithString: @"wss://eu.rp.secure.iproov.me/ws"]
token:@"{{ your token here }}"
options:[IPOptions new]
connecting:^{
// ...
} connected:^{
// ...
} processing:^(double progress, NSString * _Nonnull message) {
// ...
} success:^(IPSuccessResult * _Nonnull token) {
// ...
} canceled:^(enum IPCanceler canceler){
// ...
} failure:^(IPFailureResult * _Nonnull reason) {
// ...
} error:^(NSError * _Nonnull error) {
// ...
}];