Device registration (aka Dynamic Client Registration - DCR)

To initialize user registration the device must be registered. This is done via device registration. As an app developer there is no need to initialize device registration because it is automatically triggered by the SDK. If any error occur during this process, they are reported back to the app via the delegates that you pass to the SDK methods. For device registration the app needs to identify itself to the Token Server. This is done by sending the identifier, version and platform of the app. Furthermore the app needs to provide proof of it's identity to the Token Server. Common reason why device registration would fail is that application version is not properly configured in the token server. The SDK does not provide the app with an error other then a general device registration error since it is not able to distinguish what error did occur. The result of successful Dynamic Client Registration is: client id and client-specific key pair. The SDK stores them securely on the device in the keychain (client id) or Secure Enclave (key pair). Of those two, you can only retrieve the clientId. It is done using the -[ONGDeviceClient clientIdWithError:] method.

NSError *dataAccessError = nil;
NSString *clientId = [[ONGDeviceClient sharedInstance] clientIdWithError:&dataAccessError];
if (dataAccessError) {
    // handle data access error

results matching ""

    No results matching ""