How to use the comment update service in iOS? - ios

I have created an app in objective C, In this app i have one page there User can comment live and for the updating comments i am hitting every 5 min the web-service. I have no idea about the server data change .
I want to hit the service while the data has been change to the server.
Is it possible . Or we can use some other way for the web services.
Thanks, Please answer if you have an correct way to solve it.

Go to this web site PubNub, download SDK's for both Server and Objective-C. PubNub is a common Stream Service with Subscribe/Publish services. After implementing SDK's, make your Client as Subscriber, and make your Server as Publisher. Simply; Subscribers are listening channels for data. When you have a new comment, Publish that comment from Server to channel which your client has already subscribed. Do not forget, free accounts are for demo purposes and have limitations.

Related

Creating a push notification system with a React Native front end and a Java Spring back end?

Currently building a mobile application that ideally would have functionality that allows one user to "nudge" another user, pretty much the equivalent to a Facebook "poke." For the sake of building quickly, we'd like to use as many third-party libraries/services as possible. So far we were looking into using pusher and expo, but to be totally honest, we are a bit confused as to how to architecture this.
From what I understand, the front-end (ios app) would subscribe (open a socket) to a specific channel/server and the server would then send messages to the client(s) that subscribed whenever necessary. How this works with users being subscribed to every other user they are friends with, I don't understand. What's the proper way to architecture this?
I also read that on the front end, when a user doesn't have the ios application open you can't have any websockets open to the server, so how does that work?
Additionally, how does one bundle notifications??
Really confused with this, any help would be greatly appreciated.
Chris
Well, push notifications now mostly are implemented with Firebase. This is a service inside most of mobiles, so you only need use these libraries to implement your client application.
From the server, you only need to consume a rest api of Firebase.
Now there are permissions to allow mobile applications receive push notifications in background. You do not need to implement a socket or websocket, that is a feature of Firebase.
Read more about this.
https://medium.com/google-cloud/push-notification-for-react-native-bef05ea4d1d0
https://dzone.com/articles/how-to-add-push-notifications-on-firebase-cloud-me

How to get notification when data change in firebase storage?

I am working in photo vault app. So i need to detect changes of firebase database from my app when someone insert new photo or delete photo.I can log in from different device using same user id. I need to reload my collection view in that time. I saw cloud message notification. But i need a notification for data entry. Please help me.
Firebase now have a new tool called Cloud Functions.
With this you can execute code without a server, listen to Firebase Database and send notifications.
Take a look to the documentation, it's easy:
https://firebase.google.com/docs/functions/use-cases
Jaime reply about the cloud function suites well if you are inclined to use google offerings. If not, here's how one would approach the problem... Any database is not exposed to client applications directly. Normally there's a web server that writes to the database. So from the web server when you write to database, you can integrate with a unified push notification provider (Amazon SNS, Bluemix Push, etc) to send a notification to the client application on mobile or web.

How to get live scores through a plugin for openfire?

I want to create a new plugin which will send live scores to the xmpp iOS client.
I have already created a new plugin and a service for it, but not getting any idea how to send live scores from openfire server to the xmpp iOS client.
Pls, suggest me something.
Thanks
One way would be to use multi chat. You can create a room for each match. Anyone who wishes to receive live score (or anything for that matter) joins the room. You have a bot that sends the score into the room and everybody who is in the room gets it. You can also configure the room so that it is visitors only and anonymous. See XEP-0045
Another way is the use pubsub. Again every match is a node. Users subscribe to the node. See XEP-0060
I'm not sure about others XMPP servers but IFAIK MUC and pubsub are supported by openfire.

Asterisk registration programmatically

I am trying to implement Asterisk server for VOIP in an iPhone application.
I am able to register the user through manually, but I wanted to do the same thing programmatically. I am not sure but there might be some idea like sending through an HTTP request.
If you have any idea or pointer please share with me.
Thanks
I think the thing that you are looking for is called SIP client. You install the client on the iPhone and it will register to your SIP server (let it be Asterix or anything else). Then you can make VoIP calls between the clients registered contemporary, send instant messages, exchange files or even implement some custom protocol over SIP to exchange other type of data.
There are a lot of SIP client applications for iPhone, and even a couple of SIP stacks that is a framework that allows you to build your own SIP client application through its API calls, so you will have full control on everything. One of the most mature of these with iPhone support is pjsip. Check out their web site to see whether this is what you are looking for.
it is hard because is necessary modify the dial plan in order to add a sip account. but you can program a web service that read a text file with the extensions from your mobile.
it is nto fully clear from your desription what exactly you want, but probably this one will help
http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out

How can my iPad app subscribe to a RESTful web service so it would update automatically?

I am looking for ways where my RESTful web service can let my iPad app know to update its cached data when the server's data has been updated. The server is running on Tomcat & Apache Jersey.
Is this doable? And not using Apple Push Notification (APN)?
There are essentially two options: heartbeat check from the app to the server (on a timer) or something that keeps the line of communication open, such as web sockets. Here is an open source web socket for iOS, but I have not personally experimented with it:
http://code.google.com/p/unitt/wiki/UnittWebSocketClient
I'm not sure why you want to avoid APN, but this really sounds like what it's made for.
If you want to update only when your app is running, there are other options (straight forward polling comes to mind), but if you want the user to be notified even when the application isn't running, there isn't really any other Apple approved way to do it.
Can reverse the design around and make your device a client and pull data from a REST service at a regular interval?? With all the support one gets from REST, it might be helpful to know you will have complete control of when data is being pulled by the device from server and exactly the data that might goto device.
I'm curious to know your thoughts, Thanks.
I'll be building a web-syncing iOS application soon, and we're going to use RestKit. Take a look, it might be a big help.

Resources