iphone: Parsing while the app is closed.
I am developing an iphone app that needs to parse data received from server. When the app开发者_如何转开发 is open the parsing is fine. However, I have to show the status change with a badge when the app is closed. I am not able to parse when the app is closed and hence the badge doesn't show-up. How to do parsing when the app is closed?
You can't, you will be able to start a background progress for the parsing, but I don't think you will be able to update the application badge.
Have a look at the documentation on background code execution: http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html#//apple_ref/doc/uid/TP40007072-CH5-SW4
Check this - Implementing Long-Running Background Tasks
You can't do it with background process.. Instead go for push-notification.
精彩评论