I have an iOS chat app like Whatsapp. The chat is running well with XMPP protocol. The app has other functionalities, and has an APNS service running well with them. For the client I'm working with XMPPFramework, and for the server with PHP and Tigase for the XMPP server.
The question is this:
How to make the server send a push notification to an user, when the XMPP server receives a message for him and his presence is false?
Thanks!
Good news: You can send web push notifications to your subscribers even if they're offline. They can still see your notifications when they come back online.
Pushed allows you to send real-time notifications without developing your own app to iOs, Android and Desktop devices. Want to send push notifications? You're in the right place. Send it with Pushed.
An iOS push notification is a message that pops up on an Apple device such as an iPhone. Before receiving push notifications from an app, iOS device users must explicitly give permission. Once a user opts-in, mobile app publishers can send push notifications to the users' mobile devices.
Setting up Push Notifications in iOS. Go back to the iOS project you created earlier and select the main target. Under the Signing & Capabilities tab, click on the + Capability button, then select Push Notifications. This will enable your app to receive push notifications from OneSignal.
The best example would be AMP implementation in the Tigase. It is based on a MessageAmp plugin and AMP component.
The MessageAmp plugin intercepts messages. If it detects that the user is not logged in, it forwards the message to AMP component to store it in an offline storage.
In your case, you could have your own Message plugin which, if it detects that the user is offline, could forward the message to your Push component (iOS push or Android push, SMS push or something else).
And all the logic responsible for actual pushing notification to the device should be implemented in that component.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With