Can I use Push Notification for this

My app needs to send a message to Twitter at the end of each day at a time when X. The app cannot be launched at that time X, but it must still post that message. I don't want to bother the user every day asking them to complete this task.

Can I use Push Notification to silently (no alert popup, sound or whatever) perform some tasks in my application for some constant time even if it doesn't work?

THH

+2


source to share


6 answers


There are three notification mechanisms that you can send via push: alerts, sounds, and icons. The way push notifications work is that on the phone it launches an application and sends it a "push payload" with these values. Even if you disable all three mechanisms, the OS still has to launch the application every time, which means the user will be interrupted.



In short, you cannot make a push soundlessly. I doubt, from the users' point of view, that Apple will allow things to happen on the phone without notifying the user in some way.

+4


source


Not.

You cannot schedule what your app will do on a non-jailbroken iPhone.



The only solution is to have a separately hosted service somewhere where you push the details out of your application and that performs scheduled updates on your behalf.

+1


source


Doing it quietly is beyond your control. The iPhone is configured where each Push app has options that can be used to specify whether they want to receive alerts or not. If set to yes, warning text is also displayed.

0


source


sounds like you are trying to "wake up" in your application at a specific time every day to complete some task. from what I understand about the iPhone, this is not possible. you cannot create a cron job or anything that will fire at the time you specify. you can run this on the server side and then push a notification to the user informing them that a post has been sent to twitter.

If you're on a jailbroken phone, I'm sure there is a way to do it.

0


source


Given that push notification requires your server to send a notification, why not skip the step and the server will just send the update directly to Twitter on behalf of the user? You cannot use push notification to trigger an automatic task on iPhone, as you ask - the user must decide on the notification of the incident.

0


source


if you really want to do it from your phone, you can just declare the background task "long term" to be covered here (iphone app programming guide) some where ... so you will never sleep and you can do what what do you like...:)

0


source







All Articles