Code: Select all
INFSmartFoxExtHandler:handleMessage msgObj:<msg t='xt'><body action='xtRes' r='-1'><![CDATA[<dataObj><var n='_cmd' t='s'>OK</var></dataObj>]]></body></msg>
I get this back when I run login but onLogin don't get called.
Any ideas?
Code: Select all
INFSmartFoxExtHandler:handleMessage msgObj:<msg t='xt'><body action='xtRes' r='-1'><![CDATA[<dataObj><var n='_cmd' t='s'>OK</var></dataObj>]]></body></msg>
Lapo wrote:Yes, this is correct.
With Zone attribute customLogin set to true you will be responsible for sending the login response back to the client.
In the response you will need to at least send the user Id that should be assigned to the local API userId property. You can also add any other custom data that is relevant to your application logic.
You can take a look at the Custom Login tutorial for Flash here:
http://www.smartfoxserver.com/docs/docP ... /index.htm
Although the client part might be slightly different, the server side is the same for any client technology.
NOTE 2: for SmartFoxServer PRO. If the Zone you are accessing uses a custom login the login-response will be sent from server side and you will need to handle it using the onExtensionResponse handler.
Additionally you will need to manually set the myUserId and myUserName properties if you need them. (This is automagically done by the API when using a default login)
Lapo wrote:By the way both login tutorials explain the myUserId matter:
http://www.smartfoxserver.com/docs/docP ... _loginExt/
http://www.smartfoxserver.com/docs/docP ... /index.htm
hope it helps
Return to “iPhone Objective-C API”
Users browsing this forum: No registered users and 29 guests