Search code examples
iospush-notificationapple-push-notificationsapn

Tools/Solutions :Remote push notifications iOS for users


I've got a database who store the device Token, country Code and language of my users and I need to send remote notifications for all the user. What kind of tool can I used to send all notifications by country with a batch?

Thanks,


Solution

  • It's not quite clear what exactly you are trying to achieve but here are options based on my guess, ordered by relevance:


    In terms of notifications you can use:

    Apple Push Notification Service

    • your server controls when notification is happening
    • works for all app states (open/background/closed)
    • when app is closed user must accept notification to open app
    • will bother user with system notifications
    • does not guaranty delivery
    • requires extra work on server-side and generation of certificates by hand

    Local notifications (some relevant info)

    • your app controls when notification is happening
    • works for all app states (open/background/closed)
    • when app is closed user must accept notification to open app
    • will bother user with system notifications

    If you want updates to be invisible to user and just update app you should employ NSURLSession and NSURLConnection and work up from there. These might be of interest:

    Polling updates on behalf of app with background fetches

    • your app controls when update is happening (if iOS doesn't mind)
    • doesn't work when app is closed
    • invisible to user
    • should be optimized for battery life

    Keeping connection open (search "ios SocketRocket" for example implementation)

    • your app totally controls updates
    • won't work when app is closed
    • drains battary like crazy (so not recommended)

    And then there is oportunity to missuse Voice push API in a interesting way