Building-a-Jabber-client-for-iOS icon indicating copy to clipboard operation
Building-a-Jabber-client-for-iOS copied to clipboard

Jabber Client Not working

Open ghost opened this issue 11 years ago • 19 comments

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. Uploading Screen Shot 2013-03-11 at 5.08.10 PM.png . . .

ghost avatar Mar 11 '13 12:03 ghost

Screen Shot 2013-03-11 at 5 08 10 PM

ghost avatar Mar 11 '13 12:03 ghost

Please Help me.

ghost avatar Mar 11 '13 12:03 ghost

Have you tried "localhost"?

funkyboy avatar Mar 11 '13 12:03 funkyboy

Yes I tried. for using steps. But i cant find. Please help me dude.

ghost avatar Mar 11 '13 16:03 ghost

you have any other source. plz send me

ghost avatar Mar 11 '13 18:03 ghost

Hi Can you send any working copy please.

ghost avatar Mar 12 '13 05:03 ghost

Hi, I have also got the problem. Please explain how to resolve it. Regards

shinan888 avatar Aug 20 '13 20:08 shinan888

have you tried "localhost" (while running in the simulator)?

funkyboy avatar Aug 20 '13 20:08 funkyboy

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.

shinan888 avatar Aug 21 '13 00:08 shinan888

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.

Ricardo1980 avatar Oct 14 '13 08:10 Ricardo1980

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; }

RamChandraReddy avatar Mar 03 '14 06:03 RamChandraReddy

Can you send a pull request?

funkyboy avatar Mar 03 '14 07:03 funkyboy

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

RamChandraReddy avatar Mar 03 '14 08:03 RamChandraReddy

screen shot 2014-03-03 at 3 44 21 pm Could u please help me with this

Chibipond avatar Mar 03 '14 08:03 Chibipond

screen shot 2014-03-03 at 3 57 50 pm this occurs when i run the second time. I have no idea how to solve this. Kindly help me please.

Chibipond avatar Mar 03 '14 08:03 Chibipond

hi, i am fix issue making this project ARC Compatible.

iphoneProlix avatar Mar 07 '14 06:03 iphoneProlix

Hi iphoneProlix could u share it. I got a headache with it. Thanks

Chibipond avatar Mar 07 '14 07:03 Chibipond

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 .

TejeshwarGill avatar Mar 26 '14 11:03 TejeshwarGill

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...

mdcconcepts avatar Jan 15 '15 08:01 mdcconcepts