Developer Zone

SDK Status Checks¶

(RUISTATEOBJC) getState

Returns the current state of the RUI SDK instance. The RUI SDK state can change asynchronously.

getState can be called more than once.

getState is a synchronous function, returning when all functionality is completed.

Return Type:

Integer constant. Possible values below:

* RUI_SDK_STATE_FATAL_ERROR                             Irrecoverable internal fatal error.  No further API calls should be made.
* RUI_SDK_STATE_UNINITIALIZED                           Instance successfully created (initRegisterDefaultGraphicalReachOutHandler:())
                                                        but not yet successfully configured
                                                        (createConfig:productID:appName:serverURL:protocol:aesKeyHex:multiSessionEnabled:reachOutOnAutoSync:()).
* RUI_SDK_STATE_CONFIG_INITIALIZED_NOT_STARTED          Successfully configured
                                                        (createConfig:productID:appName:serverURL:protocol:aesKeyHex:multiSessionEnabled:reachOutOnAutoSync:())
                                                        and not yet started (startSDK()).  Will be normal start.
* RUI_SDK_STATE_CONFIG_MISSING_OR_CORRUPT_NOT_STARTED   Successfully configured
                                                        (createConfig:productID:appName:serverURL:protocol:aesKeyHex:multiSessionEnabled:reachOutOnAutoSync:())
                                                        and not yet started (startSDK()).  Will be a New Registration start.
* RUI_SDK_STATE_STARTED_NEW_REG_RUNNING                 Running (startSDK()) with New Registration in progress, not yet completed.
* RUI_SDK_STATE_RUNNING                                 Running (startSDK()) with no need for New Registration or with successfully completed New Registration.
* RUI_SDK_STATE_ABORTED_NEW_REG_PROXY_AUTH_FAILURE      Aborted run (startSDK()) due to failed New Registration
                                                        (createConfig:productID:appName:serverURL:protocol:aesKeyHex:multiSessionEnabled:reachOutOnAutoSync:()).
* RUI_SDK_STATE_ABORTED_NEW_REG_NETWORK_FAILURE         Aborted run (startSDK()) due to failed New Registration
                                                        (createConfig:productID:appName:serverURL:protocol:aesKeyHex:multiSessionEnabled:reachOutOnAutoSync:()).
* RUI_SDK_STATE_ABORTED_NEW_REG_FAILED                  Aborted run (startSDK()) due to failed New Registration
                                                        (createConfig:productID:appName:serverURL:protocol:aesKeyHex:multiSessionEnabled:reachOutOnAutoSync:()).
* RUI_SDK_STATE_SUSPENDED                               Instance has been instructed by RUI Server to back-off.  Will return to Running once back-off cleared.
* RUI_SDK_STATE_PERMANENTLY_DISABLED                    Instance has been instructed by RUI Server to disable.  This is permanent, irrecoverable state.
* RUI_SDK_STATE_STOPPING_NON_SYNC                       Stop in progress (stopSDK:()).  Stopping non-Sync-related threads.
* RUI_SDK_STATE_STOPPING_ALL                            Stop in progress (stopSDK:()).  Stopping Sync-related threads.
* RUI_SDK_STATE_STOPPED                                 Stop completed (stopSDK:()).
* RUI_SDK_STATE_OPTED_OUT                             Instance has been instructed by the application to opt-out.

(RUIRESULTOBJC) testConnection

Tests the connection between the RUI SDK and the RUI Server. If a valid configuration file exists (createConfig:productID:appName:serverURL:protocol:aesKeyHex:multiSessionEnabled:reachOutOnAutoSync:), the URL used for the test will be the one in that file, set by the RUI Server. Otherwise, the URL used for the test will be one set by the client in the call to createConfig:productID:appName:serverURL:protocol:aesKeyHex:multiSessionEnabled:reachOutOnAutoSync:. If set, the proxy is used during the test (setProxyAddress:port:username:password:).

testConnection can be called between createConfig:productID:appName:serverURL:protocol:aesKeyHex:multiSessionEnabled:reachOutOnAutoSync: and stopSDK:, and can be called zero or more times.

testConnection is a synchronous function, returning when all functionality is completed.

Return Type:

Integer constant. Possible values below:

* 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 DestroySDK are possible.
* RUI_SDK_PERMANENTLY_DISABLED                  The RUI 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 successfully stopped.
* RUI_NETWORK_CONNECTION_ERROR                  Not able to reach the RUI Server.
* RUI_NETWORK_SERVER_ERROR                      Error while communicating with the RUI Server.
* RUI_NETWORK_RESPONSE_INVALID                  Message format error while communicating with the RUI Server.
* RUI_TEST_CONNECTION_INVALID_PRODUCT_ID        Invalid ProductID.
* RUI_TEST_CONNECTION_MISMATCH                  Mismatch between URL and ProductID.