Stopping the SDK
The stopSDK: function stops the SDK that was started with startSDK. If explicit sessions are allowed (multiSessionsEnabled = true in createConfig), then any sessions that have been started with startSession: that have not been stopped with stopSession: are automatically stopped. A manual synchronization with the Server, sync:, will be performed at stop depending on the value of doSync (as described in Parameters).
stopSDK: must be called after startSDK and must be called only once. After stopSDK: is called, the various event tracking APIs are no longer available. The only APIs available are getState: and the Objective-C instance release. The SDK cannot be re-started with a subsequent call to startSDK.
stopSDK: is a synchronous function, including the manual synchronization with the Server (if requested), returning when all functionality is completed.
(RUIRESULTOBJC) stopSDK: (int32_t)doSync
The stopSDK: function has the following parameters.
Parameter |
Description |
|||||||||
Determines if the SDK will synchronize with the Server when exiting the SDK. Normally, doSync is set to RUI_SDK_STOP_SYNC_INDEFINITE_WAIT. Possible values are:
|
Returns
The stopSDK: function returns one of the return status constants below.
Return |
Description |
RUI_OK |
Function successful. |
RUI_SDK_INTERNAL_ERROR_FATAL |
Irrecoverable internal fatal error. No further API calls should be made. |
RUI_SDK_ABORTED |
A required New Registration has failed, and hence the SDK is aborted. stopSDK: and Objective-C instance release are possible. |
RUI_CONFIG_NOT_CREATED |
Configuration has not been successfully created. |
RUI_SDK_NOT_STARTED |
SDK has not been successfully started. |
RUI_SDK_ALREADY_STOPPED |
SDK has already been successfully stopped. |
RUI_INVALID_DO_SYNC_VALUE |
The doSync manual sync flag/limit violates its allowable range. |