2

I am creating a voip application for iPhone and iPad family in which I have done following things :

  1. Added the UIBackgroundModes key in the plist file with values 'audio' and 'voip'.
  2. Create NSInputStream and NSOutputStream with tag NSStreamNetworkServiceTypeVoIP and scheduled them in runloop of another thread(not main thread).
  3. Created a background task in applicationDidEnterBackground.
  4. Added setKeepAliveTimeout handler (timeout value 600 sec).

Application relaunches when code in handler of setKeepAliveTimeout is called.

Application relaunches if I dont put setKeepAliveTimeout handler ,but tries to send any signal to app after suspension(10 mins in background is completed).

I have tried almost everything that came in my mind, Need pointers towards the solution Thanks in advance,

4

1 回答 1

1

setKeepAliveTimeout 处理程序的职责是关心连接。因此,您应该使用比连接超时时间短的活动间隔。

于 2013-02-20T10:00:50.700 回答