I am using a Firebase database for my iOS Swift app. After going through a volume of material online, I decided to try Batch+Firebase to provide remote push notifications to a logged-in, authenticated user within an app, whenever node values in his/her database changes. I save the logged-user UID like so:
override func viewDidLoad(){
super.viewDidLoad()
//...
editor = BatchUser.editor
editor.setIdentifier("uid" as String!)
editor.save()
}
Of course, I have done the necessary background work for enabling push notifications for my app. Also, have installed pods of both Firebase
and Batch
, and I get user to activate notification settings.
I am not certain how to write the changed database values into a push notification and deliver to a user. I searched a lot for relevant tutorials online, but to no avail.
Any direction on how to implement the Batch APIs in Swift for Firebase will be greatly appreciated.