QuickBlox save Dialogs in CoreData for offline viewing - ios

Is there a way to save Quickblox dialogs and messages for viewing offline? I am trying to save messages, queue messages when there is no network to call the Quickblox service. Once the network is availabel the messages will be send?
I understand this can be achieved by using Core data, but I am not sure how. can anyone help me in achieving this? Any pointers to the solutions will be helpful.

You can save quickblox messages in any format & storage you want. It can be NSUserDefaults, CoreData, .txt file in Documents directory etc.
QuickBlox SDK doesn't contain this function, but it is realized in iOS Chat Sample and Swift demo. Please have a look at the links below:
http://quickblox.com/developers/SimpleSample-chat_users-ios
http://quickblox.com/developers/Demo-swift-ios

Related

Telegram API swift (or objective-c) client, to read channel messages

I'm wondering if it's possible the read messages from telegram channel from the iOS app.
I want to parse public channel to implement an application which will show a map with latest Air-Raid sirens in Ukraine. There's official channel here - https://t.me/air_alert_ua, which I'd like to parse, and then draw an overlay on the map in an iOS app, like on the following web-site.
I know that there's telethon client for python, but running python inside iOS app isn't a very good idea and perhaps there's a better way. Any help is greatly appreciated.

How to delete chat messages from XMPP server in android or ios?

Now i am doing chat application. I am using XMPP for chat.
I am able to do chat. Now I want to delete chat message in my chat message list like a whats app.
That message will delete also in server.How can I delete the particluar chat message from server.
Can anybody help me?
Thanks in advance.
Mobile libraries for iOS: XMPPFramework,
Mobile libraries for Android: Smack,
Server: ejabberd OR Openfire
The problem is, that messages are not stored separately on your server.
Only complete conversations are stored.
That being said, you would have to delete the whole conversation for one message.
The only way to achieve what you want, is to create separate conversations for each message.
There is an experimental XMPP-Extension, but it is not yet implemented http://legastero.github.io/customxeps/extensions/message-delete.html

How to send image/Video,Voice Chat using xmpp IOS

I am creating a chatting app using XMPP. The text chat functionality is working fine. Now I want to send audio, video and images. Can anyone tell me how to do that? I am using core data. It will be better if you guys can suggest me about UI also.
Any samples like WhatsApp are welcome.

How to send image (image url),video chat App Messages using XMPPFramework iOS

I'm sending only text, but I don't know how to send image/url, videos and
integrate that in the chat application in iOS using XMPP.
Please help me.
Please note that you should
Provide what you have done so far.
Search for answers first.
Please check existing answers
question 1
question 2
question 3
question 4
There are two basic approaches to send media data
inband (message with attachment - refer to existing answers)
out-of-band (upload media file to server and send URL in message)
Sending inband data should only be used for small media data. I recommend to use the out-of-band approach.
Out-of-band solutions supported by XMPPFramework
XEP-0065
XEP-0096
Your own XMPP extension
You are the most flexible when you use your own extension, but a standard XMPP client will not understand this. If you implement your own clients the I recommend this approach as follows.
Send media message
Upload media file to server.
Send message with content attribute and out
Receive media message
Parse message received and detect content type and out-of-band file name
Download media file from server.
Delete media file from server.
Example for your own XMPP message extension
<message from=... to=... id=... type=chat>
<body></body>
<myapp xmlns=mycompany:myapp content=image>
<out_of_band_file>myuniquefilename.jpg</out_of_band_file>
</myapp>
</message>
This way you may define your own content types like image, video, audio.

Using Parse and QuickBlox together

Im very new to the backend. Im making a plan to build an iOS Social App that uses Parse for the backend. But since Parse hasn't supported real-time chat feature so I have an idea that uses the Quickblox chat API to build my real-time chat feature. Im not sure whether it is possible or not so I ask here.
Honestly I haven't try anything because I just make my plan. It must be clear before I start so I will build my app faster.
Yes, It's possible.
QuickBlox user model has external_user_id field, you can connect Parse user and QB through this parameter. Or vise-a-versa.
Next, for example, you use Parse user. And you would like to start chat with other Parse user.
You should:
Get QuickBlox user by Parse user.
Login to QuickBlox chat
Send message.
http://quickblox.com/developers/SimpleSample-users-ios#Integrate_QuickBlox_with_your_existing_User_Base
Also, QuickBlox has the same features wich has Parse. I recommend you to review your requirements and maybe you no need to use Parse because in any cases use 2 platforms it will be a bit complicated to support.

Resources