Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mav3rick40

macrumors newbie
Original poster
Feb 26, 2013
5
0
Hello, my name is Marc and I'm new to the forums, and I'm a first year student trying to make an iPhone/ipad app. It's a radio app the customer wants push notifications, where when you drive by like Walmart and if they have a special on soda it will push it to the app. I've tried Google to find out how to implement it but can't find anything so I don't know if it's even possible to do that. Thought I would ask here see if anyone can help.

Thanks in advance.

Sent from my ADR6400L using Tapatalk 2
 

waterskier2007

macrumors 68000
Jun 19, 2007
1,872
230
Novi, MI
Hello, my name is Marc and I'm new to the forums, and I'm a first year student trying to make an iPhone/ipad app. It's a radio app the customer wants push notifications, where when you drive by like Walmart and if they have a special on soda it will push it to the app. I've tried Google to find out how to implement it but can't find anything so I don't know if it's even possible to do that. Thought I would ask here see if anyone can help.

Thanks in advance.

Sent from my ADR6400L using Tapatalk 2

It actually may not even be a push notification. If you figure out some way to determine when you need to send a notification you can just send a local notification scheduled for one second in the future (or some small duration of time so that it gets fired right away).

There is a google places API that can find the location of things around the user, you could use that to find local stuff. After that, figuring out things like "Does XXXX have a special right now," I would leave up to you

Visit the page here to learn about local notifications
 

Mav3rick40

macrumors newbie
Original poster
Feb 26, 2013
5
0
It actually may not even be a push notification. If you figure out some way to determine when you need to send a notification you can just send a local notification scheduled for one second in the future (or some small duration of time so that it gets fired right away).

There is a google places API that can find the location of things around the user, you could use that to find local stuff. After that, figuring out things like "Does XXXX have a special right now," I would leave up to you

Visit the page here to learn about local notifications

Awesome, thanks for the quick response and information. I'll look into it. Thanks again.
 

KoolStar

macrumors demi-god
Oct 16, 2006
825
9
Kentucky
Your going to want to use the region tracking of core location and significant location change as to not impact the battery as much.
 

moonman239

Cancelled
Mar 27, 2009
1,541
32
Your going to want to use the region tracking of core location and significant location change as to not impact the battery as much.

This may not be sufficient in some cases. If I remember correctly, I read a blog post where a guy did a test run. The testers drove a few miles before their devices triggered the "significant change" event. Maybe Apple changed the definition of "significant location change" so that it would actually be useful in this context. I say a better idea would be to get the user's location at least once every few seconds. Don't turn the GPS receiver on.
 

Mav3rick40

macrumors newbie
Original poster
Feb 26, 2013
5
0
This may not be sufficient in some cases. If I remember correctly, I read a blog post where a guy did a test run. The testers drove a few miles before their devices triggered the "significant change" event. Maybe Apple changed the definition of "significant location change" so that it would actually be useful in this context. I say a better idea would be to get the user's location at least once every few seconds. Don't turn the GPS receiver on.

Ok, but a push notification, doesn't it send it to everyone with that app?
 

MacMan988

macrumors 6502a
Jul 7, 2012
833
116
Hello, my name is Marc and I'm new to the forums, and I'm a first year student trying to make an iPhone/ipad app. It's a radio app the customer wants push notifications, where when you drive by like Walmart and if they have a special on soda it will push it to the app. I've tried Google to find out how to implement it but can't find anything so I don't know if it's even possible to do that. Thought I would ask here see if anyone can help.

Thanks in advance.

Sent from my ADR6400L using Tapatalk 2

I have used pushwoosh push notifications in an app and they provide location based push notification service although I havent used that specific feature from pushwoosh.
 

waterskier2007

macrumors 68000
Jun 19, 2007
1,872
230
Novi, MI
Ok, but a push notification, doesn't it send it to everyone with that app?

No, when a user agrees to get push notifications, you should handle that in the App Delegate. You are given a unique "token" for each user (a unique identifier string) that you would then store on your server somewhere, tying it to that specific user. When you wanted to send a push notification to that user, you provide that token as part of the bundle you send to apples push notification service, and it gets sent to that specific user.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.