का उपयोग करके लॉगिन करने में सक्षम हो सकता है मैं robbiehanson से XMPPFramework का उपयोग करके एक साधारण चैट एप्लिकेशन विकसित कर रहा हूं। मैंने अपने सिस्टम में eJabberd सर्वर स्थापित किया है और कुछ उपयोगकर्ताओं को बनाया है। मैंने होस्टनाम = "लोकलहोस्ट" सेट किया है और उस उपयोगकर्ता प्रमाण-पत्र के साथ लॉगिन करने का प्रयास किया है। यह सफलतापूर्वक लॉग इन है। जब मैं होस्टनाम यानी होस्टनाम = "talk.google.com" बदलता हूं। मैं लॉगिन करने में सक्षम नहीं हूँ। मैं "साइन करने का प्रयास रोका" मेल औरआईओएस: एक्सएमपीपी फ्रेमवर्क: जीमेल अकाउंट
<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized></not-authorized></failure>
,
- (BOOL)connectWithUsername:(NSString*)username WithPassword:(NSString*)pwd
{
if (![xmppStream isDisconnected]) {
return YES;
}
// NSString *myJID = [[NSUserDefaults standardUserDefaults] stringForKey:kXMPPmyJID];
//NSString *myPassword = [[NSUserDefaults standardUserDefaults] stringForKey:kXMPPmyPassword];
NSString* myJID=username;
NSString* myPassword=pwd;
//
// If you don't want to use the Settings view to set the JID,
// uncomment the section below to hard code a JID and password.
//
// Replace me with the proper JID and password:
// myJID = @"[email protected]/xmppframework";
// myPassword = @"";
if (myJID == nil || myPassword == nil) {
NSLog(@"JID and password must be set before connecting!");
return NO;
}
[xmppStream setMyJID:[XMPPJID jidWithString:myJID]];
password = myPassword;
NSError *error = nil;
if (![xmppStream connectWithTimeout:100 error:&error])
{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error connecting"
message:@"See console for error details."
delegate:nil
cancelButtonTitle:@"Ok"
otherButtonTitles:nil];
[alertView show];
NSLog(@"Error connecting: %@", error);
return NO;
}
[self goOnline];
return YES;
}
हूँ मैं Google डेवलपर कंसोल में अनुप्रयोग रजिस्टर करने की आवश्यकता है? कृपया मुझे XMPPFramework में जीमेल खाते को एकीकृत करने का समाधान प्रदान करें।
[यह जाँच] (http://stackoverflow.com/questions/22865340/gtalk-implementation-in-ios) –
@the_UB मैं सके – Sridhar
देखना टेक्स्ट पर क्लिक करें 'इसे जांचें' –