I am have an app with push notification implemented in APNs, ie, Firebase has not been used. I need to implement a topic subscription like feature(one present in firebase). Is there a way to implement a topic subscription(One in FCM) or similar option with APNs service? Any heads up is appreciated
I think you will need to manage topic related things on your backend, i-e mobile devices will subscribe to certain topics which are already made at backend, your backend needs to handle all the related things like creating a new topic, assigning respective device token to those topics etc.
I am also looking to work on this
Related
I am using sever to server notifications of ios https://developer.apple.com/documentation/storekit/in-app_purchase/enabling_server-to-server_notifications.
It is giving me the notifications but there are no information that to which user this transaction belongs or who paid for it, so am I missing something or there are other ways to know?
You can only rely on original_transaction_id. It's unique identifier of subscription. In case you have one subscription group it also identifies your user. However you have to implement your own logic by matching your users with original_transaction_ids.
You can also use ready-to-use solution to handle Apple notifications, like Apphud.
I want to be able to send push notifications in my app. But i would like to be able to send them to certain categories like country
any way to do this if there is 25-30 different categories
also a way for somebody to pick a category and then get push notifications for that category
I handle sending push notifications myself, the backend receives push keys from the mobile apps after login, this way I can decide which user I want to send push notifications... This way you can decide how to implement subscription and push mechanism yourself, and check if a user has a topic enabled and is in the specified country.
Anyway: more info will get you better responses: ios? android? external push notification service? used frameworks?
Have you considered using Firebase Topics?
Based on the publish/subscribe model, FCM topic messaging allows you to send a message to multiple devices that have opted in to a particular topic. You compose topic messages as needed, and FCM handles routing and delivering the message reliably to the right devices.
For example, users of a local tide forecasting app could opt in to a
"tidal currents alerts" topic and receive notifications of optimal
saltwater fishing conditions in specified areas. Users of a sports app
could subscribe to automatic updates in live game scores for their
favorite teams.
You could simply subscribe/unsubscribe users from the relevant country topic.
I want to build an in-app inbox (a.k.a. message center) as a central place to store messages to my app's users. Think one-way email notifications rather than user-user chat. This is the sort of thing I have in mind (taken from the Victoria Secret app):
Urban Airship have a product which does what I'm after and Intercom.io comes close (although it's focussed more on chat rather than asyncronous email style messages). However, I'm using Firebase elsewhere in my app so I thought it makes sense to use the same SDK for the in-app inbox too rather than introduce another 3rd party.
My question is: does anyone know whether the following logic makes sense (I'm developing on iOS with Swift first)?
Create a tableView as the "inbox"
Use Firebase Cloud Messaging (FCM) to send a payload to the app including message title, body etc
Add a method to the app to receive the payload and update the tableView's data source
Ideally, I'd like to trigger a notification (+ badge update) if the app's in the background when the message is received and an in-app notification when the app's in the foreground. I'm assuming I can do this with FCM/Notifications.
Has anyone created this sort of thing in the past or have any suggested pitfalls I should be aware of?
I've got an iOS app backed with ejabberd, with a small extension based on offline_message_hook that uses APNS (Apple Push Notification Service) to deliver push notifications of messages that are sent to offline users. This doesn't work out so well for group chats though, so I'm looking for a strategy that would do the same for offline users that are part of a group chat. Do MUCs even keep track of users that are part of the room but offline? Would I need to extend them in some way to keep track of this? Could I subtract the set of invited users from the set of online users to get the offline users? What hook should I be using to do this?
Any suggestions on this or advice on a better strategy are much appreciated!
The XMPP specification for Multi User Chat define MUC rooms as presence based. Per definition, a user is only in a chat room when it is connected. When he gets offline, users gets out of the chatroom. It means he does not receive message at all. This explains why they are not stored offline.
This is for now a feature of XEP-0045. Some future XMPP specifications (aka MUC 2) may address this issue in the future. Currently, MUC + offline storage of message is not possible in XMPP.
Is it possible to find information about Apple Push Notification Service usage?
How many people are using, and how many people are declining them?
Or maybe, somebody already has this sort of information?
Apple does not provide a lot of information about how many users actually accept/decline push notifications but you can get a good idea of what's going on by comparing the number of total installs and the number of valid push notification tokens you have ( I'm assuming that since you are interested in analytics you already have a Push server set up ) Push notification tokens are only generated if a user accepts.
If you need more information about the actual push notifications, you'll need to get your hands dirty and actually add tracking code in the application. If you're looking for something free try Google Analytics for iOS with Custom Event Tracking: https://developers.google.com/analytics/devguides/collection/ios/v2/events
Urban Airship also provides a pretty good analytics service, but you have to be using their push notification server: http://urbanairship.com/products/push-messaging#analyze