I was wondering if there is a good way to send silent push notifications to users using the parse.com services.
By "silent", i mean no actual notification if the user is in the app (I would send normal one if the user was out of the app), no "alert" message, no nothing. Just a discrete function call.
I need this to perform some code while the user is in the app.
I've read in the doc that I can use cloudcode but
- Is it best?
- How can i do it? there is no other explanation about it.
- Is there another way that is more efficient/mobile friendly to call a function remotely without the user noticing.
Should I use obj-C code? cloud code? Can you provide a small example ? (I really just need to call a "refresh" function in my code silently, nothing fancy)
Thanks a lot :)
I do this on for me and it works .
First : In your project capabilities go to "background" and check "remote notification"
Second : In your appdelegate be sure to have this method which handle the background (silent) push.
and finally : When you set the data in your push you have to add "content-available" = 1 and remove the sound
or