Building-a-Jabber-client-for-iOS
Building-a-Jabber-client-for-iOS copied to clipboard
Jabber Client Not working
Hi For your Information I add my local URL:
xmppStream = [[[XMPPStream alloc] init]autorelease]; xmppStream setHostName:@"prem-apple.local"];
But this is Crash with following Image: Please help me.
Kindly provide one working copy. please help me. Thanks.
Please Help me.
Have you tried "localhost"?
Yes I tried. for using steps. But i cant find. Please help me dude.
you have any other source. plz send me
Hi Can you send any working copy please.
Hi, I have also got the problem. Please explain how to resolve it. Regards
have you tried "localhost" (while running in the simulator)?
Yes, I tried to test on "localhost" But It was crashed as soon as I logged in. If you could know what it happened, please let me know.
Thanks. On Aug 21, 2013, at 4:18 AM, Cesare [email protected] wrote:
have you tried "localhost" (while running in the simulator)?
— Reply to this email directly or view it on GitHub.
Maybe the problem is that you use: xmppStream = [[[XMPPStream alloc] init]autorelease]; rather than self.xmppStream = [[[XMPPStream alloc] init]autorelease]; Otherwise your object will be autoreleased and maybe that's the problem.
Hi, please replace this method to handle that connecting xmpp crash.
-
(BOOL)connect {
[self setupStream];
NSString *jabberID = [[NSUserDefaults standardUserDefaults] stringForKey:@"userID"]; NSString *myPassword = [[NSUserDefaults standardUserDefaults] stringForKey:@"userPassword"];
if (![xmppStream isDisconnected]) { return YES; }
if (jabberID == nil || myPassword == nil) {
return NO;
}
[xmppStream setMyJID:[XMPPJID jidWithString:jabberID]]; password = myPassword;
NSError *error = nil; // if (![xmppStream connect:&error]) // { if (![self.xmppStream connectWithTimeout:XMPPStreamTimeoutNone error:&error]) {
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error" message:[NSString stringWithFormat:@"Can't connect to server %@", [error localizedDescription]] delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alertView show]; [alertView release]; return NO;
}
return YES; }
Can you send a pull request?
Its just one line of code change Funckyboy..
change : if (![xmppStream connect:&error]) to if (![self.xmppStream connectWithTimeout:XMPPStreamTimeoutNone error:&error])
That't it..
Regards Ram
Could u please help me with this
this occurs when i run the second time. I have no idea how to solve this. Kindly help me please.
hi, i am fix issue making this project ARC Compatible.
Hi iphoneProlix could u share it. I got a headache with it. Thanks
The issue is actually with the xmppStream property. It is defined as readonly but should be actually retain. The object loses its value and thus leads to a crash of the program even in ARC. I hope this is right .
i have same problem which chibipond mentioned. My app get crash and it will show parsing error also. can anybody suggest the answer. Thanks in Advance...