I have a VOIP application. It runs in the background as per the Apple docs.
On thing is interesting. In the handler for my input and output streams I have this code:
if ([ UIApplication sharedApplication ].applicationState == UIApplicationStateActive)
{
NSLog(@"APPSTATE: UIApplicationStateActive");
}
else if ([ UIApplication sharedApplication ].applicationState == UIApplicationStateInactive)
{
NSLog(@"APPSTATE: UIApplicationStateInactive");
}
else if ([ UIApplication sharedApplication ].applicationState == UIApplicationStateInactive)
{
NSLog(@"APPSTATE: UIApplicationStateInactive");
}
else
{
NSLog(@"APPSTATE: Unknown: %d", [ UIApplication sharedApplication ].applicationState);
}
According to the headers the only allowable values for "applicationState" are UIApplicationStateActive, UIApplicationStateInactive, and UIApplicationStateBackground.
So when my app is in background with TCP/IP running it prints out
APPSTATE: Unknown: 2
So it seems like the background VOIP state is 2. An undocumented state at that!
No comments:
Post a Comment