GUI stuck in uibackgroundmodes = voip, audio

I have a tab based application. When I insert my plist UIBackgroundModes (my application must support voip), the GUI does not load. It sucks the Splash screen and does not load the first tab view. When I remove the UIBackgroundModes property from info.plist, it works fine. Moreover, pressing the home button when it gets stuck does nothing. Has anyone encountered a similar problem? (The problem exists in the simulator)

Thanks,

Nava

+3
iphone ios4 uitabbarcontroller multitasking
source share
4 answers

It seems that the problem only occurs on Simulator, it works on the device ... Therefore, the solution (temporary) should not put UIBackgroundModes in info.plist for the version of the simulator.

+3
source share

You are responsible for loading / unloading the interface when entering and exiting the background mode. You will also need to update the interface when it leaves the background.

iOS helps a bit by taking a screenshot before placing the application in the background and displaying it when the application is received in the foreground (a bit like Default.png when the application starts), as well as some UIImage caching.

It might be worth sharing some code.

0
source share

Supporting background state transitions
Background state transition support is part of the fundamental architecture for applications in iOS 4 and later. Although technically the only thing you need to do to support this feature is a link to iOS 4 and later, so supporting it requires additional work. In particular, your application delegate should implement the following methods and implement the appropriate behavior in each of them:

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

Being a responsible, multi-tasking software 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 work in the background, there are some recommendations that should be followed when implementing your application.

  • Do not make any OpenGL ES calls from your code. You must not create an EAGLContext object or invoke any OpenGL ES drawing command of any type. Using these calls will immediately terminate your application.
  • [...]

IOS Application Programming Guide

0
source share

I also see this error. This is very annoying. As if the application was stuck in the simulator and would not keep going. When this happens, I know how to "peel" it.

In the simulator, I simply go to the menu "Hardware"> "Block", and then unlock the phone again. Now I stop the debugger and run the application again. This seems to bring him back to life.

Fortunately, this error does not occur on a real phone, only in a simulator.

0
source share

All Articles