Help!!!! - Push Notifications activated by Location Services?

Discussion in 'iOS Programming' started by Mav3rick40, Mar 6, 2013.

  1. macrumors newbie

    Joined:
    Feb 26, 2013
    #1
    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
     
  2. macrumors 68000

    waterskier2007

    Joined:
    Jun 19, 2007
    Location:
    White Lake, MI
    #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
     
  3. thread starter macrumors newbie

    Joined:
    Feb 26, 2013
    #3
    Awesome, thanks for the quick response and information. I'll look into it. Thanks again.
     
  4. macrumors 68000

    waterskier2007

    Joined:
    Jun 19, 2007
    Location:
    White Lake, MI
    #4
    No problem. The huge advantage to using local notifications is that they are created on the device, so no web server is necessary to send them out
     
  5. macrumors demi-god

    KoolStar

    Joined:
    Oct 16, 2006
    Location:
    Kentucky
    #5
    Your going to want to use the region tracking of core location and significant location change as to not impact the battery as much.
     
  6. macrumors 65816

    Joined:
    Mar 27, 2009
    #6
    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.
     
  7. thread starter macrumors newbie

    Joined:
    Feb 26, 2013
    #7
    Ok, but a push notification, doesn't it send it to everyone with that app?
     
  8. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #8
    It's gonna be kinda hard to get the user's location without the GPS receiver turned on.
     
  9. thread starter macrumors newbie

    Joined:
    Feb 26, 2013
    #9
    That is true.
     
  10. macrumors 6502a

    MacMan988

    Joined:
    Jul 7, 2012
    #10
    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.
     
  11. thread starter macrumors newbie

    Joined:
    Feb 26, 2013
    #11
    Thanks for all the help I appreciation all the information.
     
  12. macrumors 68000

    waterskier2007

    Joined:
    Jun 19, 2007
    Location:
    White Lake, MI
    #12
    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.
     

Share This Page