Apple Push Notification with XMPP Openfire - ios

I have developed a ios chat application in Objective C, which communicates to Openfire as XMPP server. I would like to implement push notification in my app so that if the user closed/killed my application, still he could get the messages from other users (like whatsapp). By analyzing several tutorials from google, I have managed to implement push notification codes in my app and using some application like smart push, I could able to send the push notification. But still, this functionality should be implemented in the Openfire server. I have installed the below plugins in the Openfire server. But I have no idea how to access those plugins. Can someone guide me with this?
Plugin 1
Plugin 2

I was facing this problem too. But with callBackOnOffline plugin I solved this problem.
You can use this or this to solve this problem.
good luck.

Related

ionic app - APNS & GCM to multiple apps from one server

we have an app built in ionic that sends out push notifications.
We are now making branded versions of the same app for different companies that share the same user & code base.
The way we are currently sending out notifications is a cron job that runs a PHP script every minute which connects to a MySQL Database to find new notifications that need to be push out, however we are willing to change this if anyone has a better suggestion.
Having one server needing to send out notifications to multiple apps is the problem we are facing. If we open and close connections to APNS for each app every time we run our push cron job, we fear Apple will see it as a DDOS attack and block it.
The only other solution we can think of is making a new server on AWS for each branded app and having them send notifications out for only one app each. That way they would each have their own IP Address and Apple wouldn't pick it up as a DDOS attack.
We looked into AWS SNS but the only tutorials are for Swift, Obj-C & Android. Our app is fully made on ionic meaning its written in Angular so none of these tutorials are helpful for us.
I've been searching Google for awhile with no valuable information.
Please answer with a way to accomplish sending notifications to multiple apps. Thanks in advance for reading!

How to integrate xmpp with Openfire server in iOS app ?

I want to make an chat app for iOS using xmpp and Openfire server. I have set up the server and currently running well, but I am not getting how to integrate the xmpp using Openfire?
I have also gone through some tutorial but in that tutorials they used a jabbered client.
Appreciate any help..
I found some thing like what that I need here https://github.com/processone/xmpp-messenger-ios

Best way to implement push notifications with Firebase

I am an iPhone app coder, and I'm using Firebase as my backend server. Firebase doesn't support Push Notifications, so I've been trying to figure out how to include them in my app. I've read this question: How to send an alert message to a special online user with firebase but it seems like more of a work-around than an actual solution.
Is there an answer on how to do this? Are there third parties or APIs that might seemlessly implement this functionality?
One solution I have tried is to use Zapier to connect Firebase to Pushover.
At this point, I've been able to observe events in the app that I'm coding and then get notifications in a pushover app on my iphone. However, ideally, I'd like to receive the notifications in my app, not in the pushover app, because I don't want users to need to have pushover in order to use my app and because I want users to receive their own distinct notifications, not notifications for everyone.
Does anyone have suggestions on how I should handle this issue?
Thanks for the help!
EDIT
This isn't a duplicate of this question: Does firebase handle push notifications? because I know Firebase doesn't directly handle push notifications. I'm looking for the best indirect way of handling push notifications with Firebase.
Now Google rebranded GCM to Firebase Cloud Messaging and it now offers this cross platform service. Firebase also offers notifications.
These are the differences between these two services:
Firebase Cloud Messaging provides a complete set of messaging
capabilities through its client SDKs and HTTP and XMPP server
protocols. For deployments with more complex messaging requirements,
FCM is the right choice.
Firebase Notifications is a lightweight, serverless messaging solution
built on Firebase Cloud Messaging. With a user-friendly graphical
console and reduced coding requirements, Firebase Notifications lets
users easily send messages to reengage and retain users, foster app
growth, and support marketing campaigns.
If you want a more detailed comparison. Read this.
If you want device to device push messages and not just server to device, the only solution I found was OneSignal. I was able to add basic device to device push message support for my app in about an hour and it is currently free.
Both Batch and Firebase only support server to device push messages, not what you want for a chat app
There are a couple of options: (well, more than a couple but here's two)
Parse handles push notifications very very well - they have that down pat and it's super simple. However, you may have issues with users and accounts - depending on what your app does.
You mentioned Pushover. We worked their API a while back but not through Zapier. If I remember correctly, I believe you can simply register your app, send an HTTPS: request to their server and then the notifications are sent from/to your app.
Also, you may want to evaluate how you are using push as it's possible you can roll a notification-like event just into the app itself.
Here's the answer I got from the Firebase team:
Firebase currently does not have push notification feature. You can use Firebase Queue and GCM to implement push notification in your app. Queues can be used in your Firebase app to organize workers or perform background work like generating thumbnails of images, filtering message contents and censoring data, or fanning data out to multiple locations in your Firebase database. Google Cloud Messaging (GCM) is a free service that enables developers to send messages between servers and client apps and it is available in both iOS and Android.
You can push an object with some data to the /queue/tasks location in your Firebase using any Firebase client or the REST API. Workers listening at that location will automatically pick up and process the job. From that, your workers can make a GCM push notification.
(end of message from Firebase team)
~~~~~~~~~
Here's my analysis:
It seems like there are a few solutions, but the two best ones are:
1) Use FirebaseQueue with Google Cloud Messaging.
2) Leverage the Push Notification functionality in Parse within the Firebase app.
I'm not sure which is better. Parse seems more proven, but Firebase Queue is more-easily integrated into the app (ie. it's nice have everything on Firebase and not having to set up a Parse app)
Anyways, I hope this thread helps out other people!
Just realized that they've come out this:
Batch
Firebase now has Notifications inbuilt.
https://firebase.google.com/docs/notifications/
I had the same problem and managed to figure out a solution a while back. I have detailed my solution in the following posts https://stackoverflow.com/a/44192515/7048719 and https://stackoverflow.com/a/42240984/7048719
You have to create a firebase data service class and use a shared instance to hold the observers in memory when the app goes into background. From there it is just a matter doing what you wish.

iOS communication with backend using APNs

How do I send push notifications to my iOS app? I need to send small messages even when the application is in the background or not running.Is there a simple tutorial. I searched a lot and only found third party solutions. Is there a direct way to access APNs, and if not which third party should I go for.
To send remote notifications, you need your own server that is authorized (you can grab a remote notification certificate from your developer account from developer.apple.com). Then you just follow Apple's API to send a notification to a specific device.
I followed a Ray Wenderlich guide a while back and found it useful.
However, you might not want to set up your own server and stuff. This is where third-party solutions come in. I've worked with Parse's push notification system and found that it is pretty easy to set up.

iOS Push Notification not sent from server (Jetpack)

I'm implementing an iOS application to manage my self-hosted website. My app make use of the many features already built for WordPress-iOS app, but it has differences and extra features.
One of the problem I'm currently having is that push notification was not sent from Jetpack (WordPress.com server) to Apple's APNs, because I'm not getting any notification on my device. I have already registered successfully my device token with Jetpack during app launch.
My problem could be the certificate key (.pem) file not getting uploaded to Wordpress.com (which I do not have access). Is this the reason why I'm not receiving any push notification to my iphone?
Additionally, I'm not getting any result on the NotificationsViewController. I do not have Simperium account setup yet. Could that be my problem for getting no results in NotificationsViewController?
Many thanks.
Sorry about the delay!. For the time being, i'm afraid that WordPress iOS doesn't support 3rd party apps integrations with its Notifications stack.
Meaning that if you'd like to handle Push Notifications support, you'd need to implement a WordPress.org plugin to handle the APN message delivery.
As per the Simperium side, there is no 3rd party app support -at least for now!- due to security restrictions.
If there's anything we could help you with, you may find us on the WordPress Slack (#mobile channel!).
Best,
Jorge

Resources