Skip to Content
0
Former Member
Jan 18, 2013 at 01:44 PM

iOS Registration Error - SUP 2.1.3

17 Views

After the first connection to the Unwired Server, the application gets the status 203 (SUPRegistrationStatus_REGISTERED). The problem occurs when I close the application and connect the second time in Unwired Server with the same device and the same username and password. It appears that the device isn't keeping internally that is already registered. Thus, the entire registration procedure is performed to the server again. Moreover, it's possible to see that after the first connection (first login) still left some pending items to be sent to the device by the server.

What is missing in that first connection to the application get's registered correctly and download the pending items?

The code used for the connection and registration is below:

We´re using an iPad 2 with iOS 6, SUP 2.1.3 and Replication Based Message.

SUPConnectionProperties *supConnectionProperties = [SUPApplication connectionProperties];[supConnectionProperties setServerName:kHostName];[supConnectionProperties setPortNumber:5001];    SUPLoginCredentials *supLoginCredentials = [SUPLoginCredentials getInstance];[supLoginCredentials setUsername:[self username]];[supLoginCredentials setPassword:[self password]];[supConnectionProperties setLoginCredentials:supLoginCredentials];        SUPConnectionProfile *supSynchronizationProfile = [OTMobileOTMobileDB getSynchronizationProfile];[supSynchronizationProfile setServerName:kHostName];[supSynchronizationProfile setNetworkProtocol:@"http"];[supSynchronizationProfile setPortNumber:2480];[supSynchronizationProfile setUser:[self username]];[supSynchronizationProfile setPassword:[self password]];[supSynchronizationProfile setAsyncReplay:NO];        if ([SUPApplication registrationStatus] == SUPRegistrationStatus_REGISTERED) {    [SUPApplication startConnection:kServerTimeout];    [OTMobileOTMobileDB onlineLogin];} else {    [SUPApplication registerApplication:kServerTimeout];}if ([SUPApplication connectionStatus] == SUPConnectionStatus_CONNECTED) {                    [OTMobileOTMobileDB disableChangeLog];    [OTMobileOTMobileDB synchronize:@"system"];    [OTMobileOTMobileDB synchronize:@"Usuario"];}