indigitall SDK for inbox clicking here
In this section you will find a series of more advanced functionalities that require a more complex development. We recommend that a developer be in charge of this configuration.
User identification
In order to get the notifications from Indigitall's Inbox, the user must identify himself. First you have to initialize the SDK of Indigitall so that it generates our identifier (deviceId) and to be able to associate it with the custom ID that you associate to the device.
To perform the registration tasks, these two methods are used:
//User ID
Indigitall.logIn(withId: "YOUR_ID", onSuccess: { (device) in
//DO SOMETHING
}) { (error) in
//LOG ERROR
}
//Disconnection
Indigitall.logOut(success: { (device) in
//DO SOMETHING
}, onError: { (error) in
//LOG ERROR
})
//User ID
[Indigitall logInWithId:"YOUR_ID" onSuccess:^(INDevice * _Nonnull device) {
//DO SOMETHING
} onError:^(INError * _Nonnull error) {
//LOG ERROR
}];
//Disconnection
[Indigitall logOutWithSuccess:^(INDevice * _Nonnull device) {
//DO SOMETHING
} onError:^(INError * _Nonnull error) {
//LOG ERROR
}];
Generate authentication token
In this section you will see how to generate a validation token for an application that has configured authentication with webhook. To generate this token, you need to add the JSON with the configuration.
The token has a predetermined expiration date, once it has expired in our system, an event of type 'Protocol' will be launched, which will indicate said expiration and will have to return the configuration JSON. To collect the event, you have to implement it in the corresponding class, and override the following method:
class YOURCLASS: GetAuthConfig
func getAuthConfig() -> [AnyHashable : Any] {
...
return YOUR_JSON
}
@interface YOURCLASS: NSObject<GetAuthConfig>
- (NSDictionary *) getAuthConfig;