Applozic register user ios

196 views Asked by At

I created app in Applozic, I got AppKey etc. but when I tried to register user I constantly get error: invalid password

here is my code:

 let alUser : ALUser =  ALUser()
    alUser.userId = "someuserid"     // NOTE : +,*,? are not allowed chars in userId.
    alUser.email = "[email protected]"
    alUser.imageLink = ""                                // User's profile image link.
    alUser.displayName = "abcName"      // User's Display Name
    alUser.password = "Abc321123"
//    alUser.authenticationTypeId = 0

    ALUserDefaultsHandler.setUserId(alUser.userId)
    ALUserDefaultsHandler.setEmailId(alUser.email)
    ALUserDefaultsHandler.setDisplayName(alUser.displayName)
    ALUserDefaultsHandler.setPassword(alUser.password)
 //   ALUserDefaultsHandler.setUserAuthenticationTypeId(alUser.authenticationTypeId)

    let chatManager = ALChatManager(applicationKey: "31fb06a4a5c44509cb76bdebbf96afd51")


    chatManager.registerUser(alUser) { (response, error) in

        if (error == nil)
        {
            //Applozic registration successful
        } else {
            print("Error in Applozic registration : ",error!.description);
        }
    }
}

and response:

RESPONSE_USER_REGISTRATION :: {
currentTimeStamp = 1513038440083;
deactivate = 0;
message = "INVALID_PARAMETER";
totalUnreadCount = 0;}

I set appkey also in ALChatManager.swift - applicationId

1

There are 1 answers

0
Deepak Thakur On

Try this and check web dashboard...

 let user = ALUser()
user.userId = str_user_id
    user.displayName = first_name + " " + last_name
    user.imageLink =  str_Url
    ALUserDefaultsHandler.setUserId(user.userId)
    ALUserDefaultsHandler.setDisplayName(user.displayName)

    let demoChatManager = ALChatManager.init()
    demoChatManager.register(user)