Notifications and API

Discussion in 'iOS Programming' started by Mcdaniels111, Oct 15, 2016.

  1. Mcdaniels111 macrumors newbie

    Oct 15, 2016
    Is there a way to signal a notification on an app through an action in another if the API is open? eg. lets say I have an app that monitors your Instagram. I want a notification to pop up for my app whenever someone comments on my Instagram. Assuming an open API for commenting on Instagram.
  2. AxoNeuron macrumors 65816


    Apr 22, 2012
    The Left Coast
    You'd really want a backend server to be checking for this. I don't know anything about the instagram API though.

    Ideally, the service you would want to monitor would send your backend server an API call whenever this event occurs. Then your backend could do whatever it wanted with this information, such as sending a push notification.

    If the service you are monitoring won't send you a REST call though, then things get a bit more complicated. You would want to configure your backend to occasionally (probably every 10-30 minutes) do an API call to Instagram and check to see if there is anything new, and if there is, send it along to the user.

    I imagine you could come up with a background task in iOS to do this as well...but I don't think it's a good idea. It would be making continuous API calls in the background quite frequently, and due to Apple's battery restrictions, you cannot always predict when or even if you background tasks would ever actually execute.
  3. Mcdaniels111 thread starter macrumors newbie

    Oct 15, 2016

Share This Page