views:

167

answers:

2

Hey,

how is it possible to push a notification to a device, every x minutes?

Thanks in advance

+1  A: 

There is no "built in" way to do this just using APNS. You would have to have your push provider code do this for you.

In my case my push provider pulls rows from a DB table and sends them at the time specified. I would just insert another row back into the DB after I sent a message.

As for limit, everyone I have talked to says that there is in effect no limit.

chris.

PyjamaSam
Okay thanks. Could you please help me out with a snippet of Code to Start with?
rdesign
There's a very detailed explanation on how to do it in Apple's official doc, try it first and then come back and ask question as needed - http://developer.apple.com/IPhone/library/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008194-CH1-SW1
bpapa
i've wrote a php script. Push does work. Now i need to implement the "every minute" feature. Any idea on how to achieve that?
rdesign
+2  A: 

[Tapping this out on my phone - hopefully the formatting is all right - I'll fix it later if necessary. Apologies in advance if it's messy...]

As others have pointed out, you'll want to look at Apple's docs for how to do this (it's not the most straightforward process in the world)..

What I wanted to contribute is the suggestion that you check this out: http://urbanairship.com/push/

Urban Airship takes care of a ton of the hassle you'd otherwise have to deal with yourself. You still need to be registered with Apple for sending push-notifications, but if you use Urban Airship's bits, they'll provide you hosting for your notification service, reporting, a management console, and a REST API for interacting with the system. They even have a scheduling component, and I'd bet that it would solve your problem here with just a few simple calls.

These guys are local to me (I live in Portland, Oregon), and I've seen a few of their demos - it's slick.

There are other features, but I think the ones listed are compelling enough to at least give it a look :)

It's obviously not required - you could do all this on your own, but the service they're offering is insanely good and affordable.

At the time of this writing, they have an "indie" account that will let you send 100,000 notifications through them a month for free. After that it's $.001 per notification (again, this appears to be per month - so, if I understand the terms right, you get 100,000 notifications for free each month, which is just awesome).

You can see the different pricing options here: http://urbanairship.com/plans-and-pricing/

I'm not affiliated with these guys in any way beyond having chatted with them at local geek events and having been offered, along with other attendees, free alcoholic beverages. But, as I don't drink, I'd like to think my judgment hasn't been affected by the psychology of gifting (fascinating subject).

So... it's worth it to at least take a look at what they're offering. And if anybody else has links to similar services, post 'em in the comments. Apple has given devs an amazing platform to play with, but they haven't made it very easy in places - it's cool to see shops like this making it more accessible.

In my opinion, of course :)

Rory Blyth