cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple users in online app with SUP

Former Member
0 Kudos

Hello,

I am creating an online app with web services via SUP (v2.2). Is it possible to have more than one user of the app? With one or more SUP servers. I am using the tutorials and have implemented the methods basically like that:

Registration

NSError *error;

ODPUserManager *um = [ODPUserManager getInstance:appId];

BOOL success = [um setConnectionProfileWithHost:host port:port farm:farmId error:&error];

if(success && ![um isUserRegistered])

{

     [um setDelegate:self];

     [um registerUser:user securityConfiguration:sc password:pw error:nil isSyncFlag:NO];

}

Deletion

ODPClientConnection *cc = [ODPClientConnection getInstance:appId];

[cc stopClient];

NSError *error;

ODPUserManager *um = [ODPUserManager getInstance:appId];

[um deleteUserWithError:&error];

Unfortynately, I have no idea what to do in case of multiple users (and one or more SUPs). Is such a scenario possible? It seems like I have a single user per appID.

Thank you,

Marina

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I may be misunderstanding the question, but a single device (for a particular application / AppID) can only have a single user. 

A Single user can have multiple devices.

You can not share a device between users without first unregistering and then re-registering for the new user.

Edgar

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you for the answers! Unfortunately, I cannot find a method for clearing the server verification key, there is only the deleteUserWithError: method. I hope, this one is sufficient for cleaning everything.

former_member186566
Active Participant
0 Kudos

Hi

you have to clear server verification key before registering a new user. The below code used for android device

LiteUserManager usrMngr;

usrMngr = LiteUserManager.getInstance();

if (!usrMngr.isRegistered()) {

usrMngr.clearServerVerificationKey();

}

First remove the user from SUP server, then clear the server verification key. if the device registered with other users or with other sup server, we can clear this way.

Refer the API doc for other platforms.

Regards

Yokesvaran Kumarasamy