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,

Amit
  • 13,134
  • 17
  • 77
  • 148
Saraswati
  • 1,516
  • 1
  • 14
  • 21
  • I am going with the same problem since 4 weeks, No solution found till now. How did you solve it? can you help me please. I have posted many question about this http://stackoverflow.com/q/19273039/2459296 http://stackoverflow.com/q/19288356/2459296 http://stackoverflow.com/q/19762071/2459296 http://stackoverflow.com/q/19807074/2459296 – MD SHAHIDUL ISLAM Nov 07 '13 at 05:14

1 Answers1

1

It is the duty of the setKeepAliveTimeout handler to care about the connection. Thus, you should use an alive interval that is shorter than the timeout time of your connection.

Matthias
  • 8,018
  • 2
  • 27
  • 53