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

Mcdaniels111

macrumors newbie
Original poster
Oct 15, 2016
3
0
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.
 

AxoNeuron

macrumors 65816
Apr 22, 2012
1,251
855
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.