title: Android has Services, but is there an equivalent or way to implement similar functionality in iOS?
body: <p>In my Android app I can easily create a Service object that can run in the background to perform arbitrary routines. In my case I have a Service which maintains a connection with a server and upon receiving messages it notifies the user. This service is only turned on when a particular activity enters its onPause or onStop cycle and is turned off when the activity is resumed</p>
  
  <p>Is there some way to do this with iOS? I've poked around and only have come across this page on the Apple developer site:</p>
  
  <p><a href="http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html" rel="nofollow">http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html</a></p>
  
  <p>Everything described there doesn't seem to satisfy my needs so I wanted to check with the SO community to see if anyone has some sort of solution.</p>