Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
srikanth chadalavada
747 PointsIOS Push Notification
In my health care application, I want to display an alert view upon something critical happens to the patient.
I am thinking about implementing the push notification to do this since apple does not allow the background services like android.
But push notifications are not reliable, there is no guaranteed and immediate delivery, which makes the whole situation risky.
Is there a work around to do this? Thanks in advance for your inputs.
1 Answer
Matthew Mascioni
20,444 PointsWith iOS 7, Apple actually did something called Background App Refresh. Provided your end-user has it enabled on their iPhone, apps can fetch data in the background.
Here's some further reading on using it from the Apple documentation:
- App States and Multitasking (updated for the iOS 7 SDK)
- UIApplication Class Reference -- updated with new methods to manage background app refresh
- UIApplicationDelegate Protocol Reference (you make use of UIApplicationDelegate protocol methods already in your AppDelegate.m file, such as didFinishLaunchingWithOptions)
I've found push notifications to be fairly reliable from the times I've experimented with them. I don't know any other solutions, but I'm interested in other solutions people might know of!