xmppframework

Change XMPPPresence to Away/Busy/Invisible

一笑奈何 提交于 2019-12-03 10:19:24
问题 How do you change your presence to show dnd/away and etc.? XMPPPresence *presence = [XMPPPresence presenceWithType:status]; [[[self appDelegate] xmppStream] sendElement:presence]; status is an NSString that I set to online/unavailable/away/busy/invisible. It only works when I go online and/or unavailable. Here's how it looks like after sending presence in my xmppStream : <presence type="away"><x xmlns="vcard-temp:x:update"><photo/></x></presence> 回答1: To change the status of your client you

MUC How-to with XMPPFramework

左心房为你撑大大i 提交于 2019-12-03 07:54:36
问题 I am developing an iOS XMPP chat app that utilizes Robbie Hanson's XMPPFramework. The most important functionalities have been implemented - sending and receiving messages. Basically, I've built a basic functional chat app already, with a little eye candy of course. Now, the problem I have is regarding MUC. The codes I saw from other websites show that there is a method initWithRoomName in XMPPRoom . However, this method is absent in the git repo I cloned. So, what is the alternative to this?

ejabberd: retrieve chat history from mysql db

妖精的绣舞 提交于 2019-12-03 03:29:34
I'm building a chat system based on ejabberd using an iOS client (and XMPPFramework ). My current chat system supports only one-on-one conversations between users saving a chat history on a MySQL database. In order to recreate the same chat system, i'd need ejabberd to retrieve chat history from my database so the users don't lose previous conversations when switching to the new chat system. I'd like not to save the conversation client-side since the iOS app can be deleted and reinstalled (or the user could switch device). Is it possible to make ejabberd read chat history from my MySQL db?

Send a message via XMPPFramework for iOS

ぃ、小莉子 提交于 2019-12-03 03:21:28
How do I send a message through the XMPPFramework for objc and ios? Its really bugging me now. I need to build a custom method with some custom XML and send it to a specific JID. Any ideas? Thank you. harshalb NSXMLElement *body = [NSXMLElement elementWithName:@"body"]; [body setStringValue:textvalue]; NSXMLElement *message = [NSXMLElement elementWithName:@"message"]; [message addAttributeWithName:@"type" stringValue:@"chat"]; [message addAttributeWithName:@"to" stringValue:[jid full]]; [message addChild:body]; [[self xmppStream] sendElement:message]; try this 来源: https://stackoverflow.com

Undefined symbols for architecture armv7 when adding CocoaAsyncSocket

只愿长相守 提交于 2019-12-03 01:49:04
I am trying to use XMPPFramework with an iOS5 project (ARC) under xcode 4.2.1 but I am facing this problem. Once I add CocoaAsyncSocket to my project as part of preparing my project to use XMPPFramework as in 1 I get the following error. I have seen some other people having the "Undefined symbols for architecture armv7" but I did not find yet an answer to this particular issue I have at the moment. I have linked to the CFNetwork and marked the GCDAsyncSocket.m as non-ARC (-fno-objc-arc) but i still get the error. Any help is appreciated. Undefined symbols for architecture armv7: "

MUC How-to with XMPPFramework

爷,独闯天下 提交于 2019-12-02 21:22:00
I am developing an iOS XMPP chat app that utilizes Robbie Hanson's XMPPFramework. The most important functionalities have been implemented - sending and receiving messages. Basically, I've built a basic functional chat app already, with a little eye candy of course. Now, the problem I have is regarding MUC. The codes I saw from other websites show that there is a method initWithRoomName in XMPPRoom . However, this method is absent in the git repo I cloned. So, what is the alternative to this? Or, if there is none, how do I go about creating rooms using XMPPFramework? Thanks. Below is how I got

How to get message delivered , seen , failed and unread message count in XMPP iOS? (Swift 3.0)

霸气de小男生 提交于 2019-12-02 13:28:39
问题 i am developing chat app in that i have stuck in two scenario. 1) How to get message status like delivered ,seen etc.. I have done following things : self.xmppMessageDeliveryRecipts = XMPPMessageDeliveryReceipts(dispatchQueue: DispatchQueue.main) self.xmppMessageDeliveryRecipts!.autoSendMessageDeliveryReceipts = true self.xmppMessageDeliveryRecipts!.autoSendMessageDeliveryRequests = true but i do't get further idea, how can i further process to check message status ? 2) How to get un-read

service unavailable error in openfire message archive management

杀马特。学长 韩版系。学妹 提交于 2019-12-02 11:16:27
I am using monitoring plugin 1.6.0 with openfire 4.2.0. Following is the screenshot of archive settings on openfire admin Console. also following is the screenshot of plugins I am using with this. My Issue as you can see the plugin is installed. but when I am trying to fetch chat history with following code : I am getting service unavailable response. func fetchChatHistoryFromServer(completionHandler completion: @escaping FetchChatHistoryCompletionHandler) { let iq = DDXMLElement(name: "iq") iq.addAttribute(withName: "type", stringValue: "set") iq.addAttribute(withName: "id", stringValue:

Disconnection of XMPP client while sending big size image, video and audio

那年仲夏 提交于 2019-12-02 09:16:08
I have implemented xmpp using robbiehanson xmpp example. I am able to chat and also able to send images. The images which i am sending are converted to nsdata and further converted to Base64String, and later sending the string with [self.xmppStream sendElement:message]; This way if the size of image is small i am able to send that instantly but if the size of images is bigger the two xmpp user gets disconnected and the file is not transferred. Same thing happens with video and audio. Though i am able to compress the images using UIImageJPEGRepresentation(image,0.005); But how to send the video

XMPP connection issue on IOS using Swift

蹲街弑〆低调 提交于 2019-12-02 07:52:27
问题 I am trying to use the XMPP framework(https://github.com/robbiehanson/XMPPFramework) using swift. I am new to swift class ViewController: UIViewController { var password: NSString? var isOpen: Bool = false var xstream: XMPPStream? var loginServer: String = "" override func viewDidLoad() { super.viewDidLoad() println(connect()) // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any