xmppframework

How to send message using XMPP Framework

僤鯓⒐⒋嵵緔 提交于 2019-11-29 09:07:43
问题 I am creating a chat application using XMPP Framework in iphone. i could get received messages but i am not able to send a message. can any one give me solution for this?? 回答1: - (void)sendMessage:(NSString *)msgContent { NSString *messageStr = textField.text; if([messageStr length] > 0) { NSXMLElement *body = [NSXMLElement elementWithName:@"body"]; [body setStringValue:messageStr]; NSXMLElement *message = [NSXMLElement elementWithName:@"message"]; [message addAttributeWithName:@"type"

XMPPFramework - How can I update my own avatar image?

女生的网名这么多〃 提交于 2019-11-29 02:37:41
I am developing an application in that I want to update my avatar image. I am following XEP-0153 guidelines to update my avatar image and I constructed an NSXMLElement correspond to the following code in XEP-0153 and sent that element through XMPPStream . <iq from='juliet@capulet.com' type='set' id='vc1'> <vCard xmlns='vcard-temp'> <PHOTO> <TYPE>image/jpeg</TYPE> <BINVAL> Base64-encoded-avatar-file-here! </BINVAL> </PHOTO> </vCard> </iq> The server responses the following error: <iq xmlns="jabber:client" type="error" id="vc1" to="vvreddy50@gmail.com/83557F96"> <vCard xmlns="vcard-temp"> <photo

(转)直接拿来用!最火的iOS开源项目(二)

可紊 提交于 2019-11-28 22:28:47
“每一次的改变总意味着新的开始。”这句话用在iOS上可谓是再合适不过的了。GitHub上的iOS开源项目数不胜数,iOS每一次的改变,总会引发iOS开源项目的演变,从iOS 1.x到如今的iOS 7,有的项目已经被弃用,即使曾经的它很受开发者喜爱,有的项目则继续发扬光大,新项目更是层出不穷。在本文中,我们将继续为大家介绍20个在GitHub上非常受开发者欢迎的iOS开源项目,在这些项目中,有哪些是你经常使用的?又有哪些是你曾经使用过的? 21. SSToolkit SSToolkit可以说是iOS开发者最常使用的工具类之一,该开源项目提供了一个完整的iOS类库集合,用于解决iOS开发者在开发过程中常碰到的一些问题,比如追踪一款设备是否具有视网膜显示屏或是否能剪裁图片,包含SSCollectionView、SSGradientView、SSSwitch等诸多非常方便的类。 如果想要对SSToolkit作进一步了解,可以在iPad/iPhone上使用SSToolkit的Demo应用 SSCatalog 。获取更多信息,可直接登陆 S.S. TOOLKIT 。 22. XMPPFramework XMPPFramework是一个使用Objective-C编写的用于Mac/iOS开发的XMPP框架,它提供了一个RFC-3920(XMPP标准)核心实现,通过某些特定工具读写XML

Build a chat application in ios using XMPP [closed]

二次信任 提交于 2019-11-28 21:25:18
I am trying to build a chat application in ios. I came across XMPP for ios. I am bit confused on how to move forward. Here are my doubts: Do I need to create an XMPP server to implement this application? Or are there any existing servers/services which can be used for the same purpose? Yes, XMPP library you found above is perfect to integrate chat in any iOS devices. Coming to your questions . Ideally yes, you should create your own XMPP server so that you have control over it plus there is security issue. A very popular XMPP server is ejabberd . ejabber is awesome :) Its not must that you

xmpp messages are lost when client connection lost suddently

夙愿已清 提交于 2019-11-28 19:21:15
问题 I am using ejabberd server and ios xmppframework. there are two clients, A and B. When A and B are online, A can send message to B successfully. If B is offline, B can receive the message when B is online again. But when B is suddenly/unexpectedly lost connection, such as manually close wi-fi, the message sent by A is lost. B will never receive this message. I guess the reason is that B lost connection suddenly and the server still think B is online. Thus the offline message does work under

Accepting chatroom invitation

孤人 提交于 2019-11-28 18:59:16
I'm able to create a MUC using XMPPFramework and send user invitation requests to join that room by using the code below. // Creating AppDelegate *dele =(AppDelegate *) [[UIApplication sharedApplication]delegate]; xmppRoom = [[XMPPRoom alloc] initWithRoomStorage:dele jid:[XMPPJID jidWithString:self.roomName] dispatchQueue:dispatch_get_main_queue()]; [xmppRoom addDelegate:dele delegateQueue:dispatch_get_main_queue()]; [xmppRoom activate:dele.xmppStream]; [xmppRoom joinRoomUsingNickname:self.myNick history:nil]; // Inviting [xmppRoom inviteUser:[XMPPJID jidWithString:@"abc@host"] withMessage:@

How to get the message delivary status using XMPP framework

北慕城南 提交于 2019-11-28 18:03:17
I am using the XMPP Framework for chatting between the users , Chatting is happening perfectly .Now I need to show the message is delivered perfectly to both devices like (What's app messenger). I am not getting any tutorial to follow. Below code represents while we send message to the other user. //Sending the message to the other user NSXMLElement *body = [NSXMLElement elementWithName:@"body"]; [body setStringValue:txtChat.text]; NSXMLElement *message = [NSXMLElement elementWithName:@"message"]; [message addAttributeWithName:@"type" stringValue:@"chat"]; [message addAttributeWithName:@"to"

How to list only online users on facebook with xmpp framework

落爺英雄遲暮 提交于 2019-11-28 17:40:53
I have integrated xmpp in my app and able to list all the users in a table view, but I only want to display the online users and then want to implement the feature to send and recieve messages to my online friends... Please suggest me some helpful code... Here is my code, executed after facebook login. - (void)fbDidLogin { NSLog(@"logged in....................."); [appDelegate.facebook requestWithGraphPath:@"me" andDelegate:self]; DDLogVerbose(@"%s accessToken: %@ expirationDate: %@",__PRETTY_FUNCTION__,appDelegate.facebook.accessToken,appDelegate.facebook.expirationDate); self.accessToken =

Up to date instructions on how to install XMPPFramework manually?

本小妞迷上赌 提交于 2019-11-28 17:39:15
I'm having a really tough time getting XMPPFramework to work. I've followed every direction written on the net, and XCode is not finding any of my XMPPFramework classes. Expected specifier-qualifier-list before 'XMPPStream' XMPP.h: No such file or directory XMPPRoster.h: No such file or directory I have XMPPFramework copied into my project's root directory. Why can't these files be seen? Is there something that I need to do under Header Search Paths or Library Search Paths? I've set those entries to $(inherited) and $(SRCROOT) and XCode 4.2 auto-fills in my project's root directory and still

App blocks while dipatching a queue

ぐ巨炮叔叔 提交于 2019-11-28 11:54:13
问题 Im using XMPPFramework and in it's code there's a method like this: - (NSDictionary *)occupants { if (dispatch_get_current_queue() == moduleQueue) { return occupants; } else { __block NSDictionary *result; dispatch_sync(moduleQueue, ^{//IT BLOCKS HERE, WITHOUT MESSAGE result = [occupants copy]; }); return [result autorelease]; } } [EDIT] It blocks inconsistently, not always, since the app is not doing anything I pause it and I see the thread has stopped there, and it never continues to