Testing the Connection Between the SDK and the Server

The testConnection: function tests the connection between the SDK and the Server. If a valid configuration file exists from createConfig, the URL used for the test will be the one in that file, set by the Server. Otherwise, the URL used for the test will be the one set by the client in the call to createConfig. If set, the proxy is used during the test (setProxyAddress:).

The testConnection: function can be called between createConfig and stopSDK: and can be called zero or more times.

The testConnection: function is a synchronous function and only returns with all functionality is completed.

testConnection:

(RUIRESULTOBJC) testConnection

Returns

The testConnection: function returns one of the return status constants below.

testConnection: Returns

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_SDK_PERMANENTLY_DISABLED

The Server has instructed a permanent disable.

RUI_SDK_OPTED_OUT

Instance has been instructed by the application to opt-out.

RUI_CONFIG_NOT_CREATED

Configuration has not been successfully created.

RUI_SDK_ALREADY_STOPPED

SDK has already been stopped.

RUI_NETWORK_COMMUNICATION_ERROR

Not able to reach the Server.

RUI_NETWORK_SERVER_ERROR

Error while communicating with the Server.

RUI_NETWORK_RESPONSE_INVALID

Message format error while communicating with the Server.

RUI_TEST_CONNECTION_INVALID_PRODUCT_ID

Invalid Product ID.

RUI_TEST_CONNECTION_MISMATCH

Mismatch between Product ID and URL.