GUI 被 uibackgroundmodes= voip, audio 困住
我有基于选项卡栏的应用程序。当我放入 plist UIBackgroundModes 时(我的应用程序应该支持 voip),GUI 不会加载。它在启动屏幕上很糟糕,并且不会加载第一个选项卡视图。当我从 info.plist 中删除 UIBackgroundModes 属性时,它工作正常。更重要的是,当它卡住时按主页按钮没有任何作用。有人遇到过类似的问题吗? (模拟器上存在问题)
谢谢,
Nava
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
看起来,问题只发生在模拟器上,它可以在设备上运行......所以解决方案(临时的)不是将 UIBackgroundModes 放入模拟器版本的 info.plist 中。
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.
您负责在进入和退出后台模式时加载/卸载界面。当退出后台时,您还需要相应地更新界面。
iOS 通过在将应用程序置于后台之前截取屏幕截图并在将应用程序置于前台时显示它(有点像启动应用程序时的 Default.png)以及一些 UIImage 缓存来提供一些帮助。
可能值得分享一些代码。
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.
iOS 应用程序编程指南< /a>
iOS Application Programming Guide
我也看到这个错误。这很烦人。就好像应用程序卡在模拟器中并且无法继续运行。当这种情况发生时,我知道如何“解开”它。
在模拟器中,我只需进入菜单“硬件”>“锁定手机,然后再次解锁。现在我停止调试器并再次启动应用程序。这似乎让它复活了。
幸运的是,这个错误不会发生在真机上,只会发生在模拟器中。
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.