user to user push notifications - ios

I have seen many questions on here and online that address this topic, but they all are from a long time ago, and are possibly outdated. I wanted to get a more recent answer if Firebase has implemented anything recently that is capable of a user to user push notification system, essentially what is used in all chat applications, or if the best option is still currently using Onesignal.

Yes! These days, you can use Cloud Functions for Firebase to do things like send a notification when something interesting happens on the Database side of things.
Here's an example where a user gets notified via notifications when they gain a new follower. Obviously, your part of the database portion will probably change depending on what exactly you want to trigger a notification, but the general theory is the same.

Related

How to set up push notifications based on location in iOS?

I'm writing an app in which users create postings which are geotagged and are stored on Firebase database. I want other users to be notified of these postings if they are in a nearby vicinity.
EDIT
How should I go about making such a function?
NOTE: I have managed to setup my app with push notifications and I have hooked it up to Firebase to receive "Message" from Firebase
Aditionally
I want users to tailor the notifications they receive to their prefrences based on features in the postings
This sounds like a job for geofencing!
Basically, you can set up a geofence which you can think of as an area that, if the user's device enters that area, triggers an action like sending a local iOS notification. It's nice in that it works even if your app is in the background. That said, it's probably a bit too much of a weighty topic to get into here, but there's a pretty good geofencing tutorial over on RayWenderlich.com that you should probably check out.
What you can do is have your app read in relevant locations from the database and then create a bunch of geofences to trigger these notifications when the user enters these locations. One important note, however, is that iOS limits you to 20 active geofences at a time, so you may need to do some work to determine what geofences are most relevant to your user whenever they use your app.

How can I send Parse push notifications to users after specific user action?

I have read a lot of tutorials and doc but I cannot quite wrap my head around it: I am trying to send users of my app a notification when somebody posts something new or if someone likes one of their posts (think Facebook-style table view displaying notifications as they happen). The certificates are set up and the app is able to receive remote notifications that I send through the Parse push console.
Obviously I want to send a notification as the actions happen, but I am unsure how to do that. Parse suggests using cloud code, but it seems to be in Javascript. Is there a way to do it in Swift? My first idea was to send the push from the users' devices as they interact (when the user likes a pic from you, he sends the push and you receive it) but apparently, it is discouraged as it is unsafe.
I understand my question is general, but I am lost as to how I can tackle this issue: can anybody give me an outline of how this should be dealt with? Not necessarily precise code, but a general idea of what I should do?

iBeacon notification database

I have a question which I have not been able to figure out so I decided to see if I can get some help on here.
I am working on an iBeacons project and I have been able to understand the basic function of iBeacons, setting up UUID'S and major and minor id's to specify exact notifications, but my question is how do I dynamically update information I send out to the users without having to go into the code each time to do this. Do I need to create a database to store all my information I want to push out to users? if so how will this database constantly refresh messages pushed out to users? An example would be lets say if you walk into a store and you get a notification in the shoe section saying there is a 10 percent off, you look at the notification but not too impressed and start to walk out, then you get another notification saying for today only you can get a 25 percent off... The app has to dynamically refresh for this to be possible.
Please help me clarify this
Thank you very much for the help
What you probably want is to store this deal information in a web service so you can update it without changing the app. Your app would need to download the updated deal information from the web service either when it starts up or when it sees an iBeacon.
My company, Radius Networks, offers a tool called Proximity Kit that makes this easy. You can assign arbitrary key/value pairs to iBeacons using a web interface. Then your app downloads them automatically an has access to them whenever you see iBeacons.
In your scenario, they key/values could be something like:
primary_offer_text=10% off all shoes
secondary_offer_text=20% off all shoes

Best way to show the recent post - Objective C

I have an iOS app which is installed in two different device but logged in with same account. If I do a new post from a device it should be shown instantly in the other devices. Currently I am refreshing the posts feed for every 10 seconds interval. Is this is a optimal way or is there any other better solution for this.
As #wattson12 was saying push notification are designed for that.
I would recommend using an API for that : Urban Air Ship
What you do is called polling. It’s the simplest solution, but it’s not optimal, because it requires you to query the server constantly and still there’s delay before you know about the new posts.
One way to know about new posts is to keep an HTTP connection open, waiting for the server to notify you about new posts (see Wikipedia for details, also related question here). Other option is push notifications: the server can post a notification when new content arrives. I’m not sure which one is technically more simple.

In Newsstand app how do I find a list of devices that are subscribed?

I can't afford UrbanAirship so I'm trying to program the server side of a Newsstand app myself.
I plan on using the JavaPNS API.
The one thing I can't seem to figure out is how to find a list of users who have a subscription in my app.
Can I query this information from Apple some how?
If I can't then I guess that means that each time a user subscribes they send their device token directly to my server. I hope this is not the case because I was hopping to run the server on my laptop and send out pushes myself without having to keep the laptop running all day listening for new subscribers.
Thanks!
Looks like I do need to register each device with my server: http://www.ibm.com/developerworks/web/library/mo-ios-push/index.html#resources
You kind of found your answer but just in case you really need a server for not only handling the push notification (for telling your app in Newsstand to check the new issue and download it in the background) but also for subscription and in-app purchasing.
Every time you launch the app you should check few things before you refresh the UI. You should check if the user is a subscriber or has user already bought the issue so you can show view/download button instead of Buy button.
Check out these tutorials if they help to understand these communications better but believe me you will end up with one of those services like Urban Airship (Which I think UA is the best option because it handles all in one not just push notification):
http://ios-blog.co.uk/tutorials/how-to-make-a-magazine-app-in-ios-part-i/
this one is more focus on server part:
http://ios-blog.co.uk/tutorials/how-to-make-a-magazine-app-in-ios-part-ii/
http://www.viggiosoft.com/blog/blog/2011/10/17/ios-newsstand-tutorial
http://www.raywenderlich.com/2797/introduction-to-in-app-purchases
And as always this is the best place for start (it has everything you need):
https://developer.apple.com/devcenter/ios/newsstand/
These are some resources to help you in developing app for Newsstand but still there are not enough people out there to share their experience.
Best of luck.
Edit: Add these two links two this list:
http://www.marco.org/2012/10/11/the-magazine
http://www.marco.org/2012/12/12/the-magazine-future-of-publishing

Resources