GUI is stuck with uibackgroundmodes= voip, audio
Asked Answered
N

4

3

I have tabbar-based application. When I put in my plist UIBackgroundModes (my application is supposed to support voip), the GUI doesn't load. It sucks on Splash screen and doesn't load the first tab view. When i remove the UIBackgroundModes property from info.plist, it works fine. More than that, pressing the home button when it stuck does nothing. Did somebody encountered a similar problem? (The problem exists on simulator)

Thanks,

Nava

Noman answered 3/11, 2010 at 9:36 Comment(0)
N
3

It appears, that the problem happens on Simulator only, it works on the device... So the solution (temporary one) is not to put UIBackgroundModes into info.plist for simulator version.

Noman answered 28/11, 2010 at 8:21 Comment(0)
F
0

You are responsible for loading/unloading the interface when going in and out of the background mode. You'll also need to update the interface accordingly when coming out of background.

iOS helps a bit by taking a screenshot before putting the app in background and displaying it when getting the app to foreground (a bit like Default.png when starting the app) and also some UIImage caching.

It might be worth sharing some code.

Froh answered 3/11, 2010 at 10:38 Comment(1)
It stuck on the very beginning, right after the application launches. When I remove the UIBackgroundModes line from the .plist it just works and loads the first view.Noman
M
0

Supporting Background State Transitions
Supporting the background state transition is part of the fundamental architecture for applications in iOS 4 and later. Although technically the only thing you have to do to support this capability is link against iOS 4 and later, properly supporting it requires some additional work. Specifically, your application delegate should implement the following methods and implement appropriate behaviors in each of them:

  • application:didFinishLaunchingWithOptions:
  • applicationDidBecomeActive:
  • applicationWillResignActive:
  • applicationDidEnterBackground:
  • applicationWillEnterForeground:
  • applicationWillTerminate:

Being a Responsible, Multitasking-Aware Application
Applications that run in the background are more limited in what they can do than a foreground application. And even if your application does not run in the background, there are are certain guidelines you should follow when implementing your application.

  • Do not make any OpenGL ES calls from your code. You must not create an EAGLContext object or issue any OpenGL ES drawing commands of any kind. Using these calls will cause your application to be terminated immediately.
  • [...]

iOS Application Programming Guide

Morton answered 3/11, 2010 at 12:9 Comment(1)
The problem starts in the VERY beginning - it doesn't show a view with a text field and a button! So after application:didFinishLaunchingWithOptions I still see the Default.png. Pressing Home button does nothing.Noman
W
0

I see this bug as well. It's very annoying. It's as if the app is stuck in the simulator and won't keep going. When this happens, I know how to "unstick" it.

In the simulator I just go to menu Hardware > Lock and then unlock the phone again. Now I stop the debugger and start the app again. This seems to kick it back to life.

Fortunately this bug doesn't happen on a real phone, only in the simulator.

Wenn answered 9/2, 2012 at 16:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.