简体   繁体   English

背景在真正的 iPhone 上不起作用

[英]Background doesn't work on real iPhone

I discovered, that an app can perform background tasks perfectly on the simulator (iOS 9.1) but doesn't do anything in the background on a real iPhone (iOS 9.0.2).我发现,应用程序可以在模拟器(iOS 9.1)上完美地执行后台任务,但在真正的 iPhone(iOS 9.0.2)上不会在后台执行任何操作。 Can someone explain to me what I'm missing?有人可以向我解释我缺少什么吗?

EDIT: My new Question is: Can an iPhone run processes in the Background without using Background Modes?编辑:我的新问题是:iPhone 可以在不使用后台模式的情况下在后台运行进程吗?

If you didn't enable background mode for your application by adding key in plist, then it will not work on real device but will work on simulator.如果您没有通过在 plist 中添加密钥来为您的应用程序启用后台模式,那么它将无法在真实设备上运行,但可以在模拟器上运行。

For answer of your new question : iPhone can not perform any process in background without using Background Modes.为了回答您的新问题:如果不使用后台模式,iPhone 将无法在后台执行任何进程。 Also you have to handle background mode properly.您还必须正确处理后台模式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM