Opt-Out Mechanism
Starting from Version 5.5.1, a new opt-out mechanism was introduced. Using this mechanism, if a user does not want to send tracking information to Usage Intelligence, the function optOut: must be called after calling createConfig and before startSDK.
When optOut: is called, the SDK sends a message to the server after startup (startSDK). This message informs the server that this client has opted-out and the server will register the opt-out. This message is only sent to the server once. The opt-out flag on the server will be used for reporting opt-out statistics only.
If optOut: is called before a new registration, the server will never have any data about that installation. If optOut: is called for an installation which was already being tracked, the server would still contain the data that had been collected in the past and no past data is deleted.
The SDK will send no further information to the server as long as the user is opted-out. The application must keep calling optOut: before every startup as long as the user wants to stay opted-out. If this function is not called, then the SDK assumes that the user is opting-in again and will start tracking normally.
Note:When an installation is not opted-out, it communicates with the server immediately on calling startSDK. At this point, the SDK attempts to sync data regarding past application and event usage that had not been synced yet, and also system and product information such as OS version, CPU, GPU, product version, product edition, etc.
The optOut: function instructs the SDK to send a message to the server to indicate that this user is opting-out (if not already send in previous sessions) and disables all further functionality and communication with the server.
RUIRESULT optOut:
Returns
The optOut: function returns one of the return status constants below.
Return |
Description |
RUI_OK |
Function successful. |
RUI_INVALID_SDK_OBJECT |
SDK Instance parameter is NULL or invalid. |
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_SDK_PERMANENTLY_DISABLED |
The Server has instructed a permanent disable. |
RUI_CONFIG_NOT_CREATED |
Configuration has not been successfully created. |
RUI_SDK_ALREADY_STARTED |
SDK has already been successfully started. |
RUI_SDK_ALREADY_STOPPED |
SDK has already been successfully stopped. |