简体   繁体   English

如何在后台运行iOS应用

[英]How to run iOS app in background

I found that iphone apps do not run in the background except for certain cases like voip, music player and GPS apps. 我发现,除了voip,音乐播放器和GPS应用程序之类的某些情况外,iphone应用程序不会在后台运行。 I found this app in the app store, it does not belong to any of these categories, runs in the background and provides sound alerts in the background. 我在应用商店中找到了该应用 ,它不属于任何类别,在后台运行,并在后台提供声音提示。

How is this possible? 这怎么可能?

Apps like this usually do workarounds based on things you mentioned: 此类应用通常会根据您提到的内容进行解决:

  1. playing "silence.wav" (= acting as music player) 播放“ silence.wav”(=充当音乐播放器)
  2. using GPS 使用GPS

UPDATE: From Info.plist of this aforementioned app: 更新:从上述应用程序的Info.plist中:

UIBackgroundModes
    audio

Using Xcode documentation : 使用Xcode 文档

audio | 音频| The app plays audible content in the background. 该应用程序在后台播放可听内容。

Therefore this app uses first approach (ie it mimics music player) to run in the background. 因此,此应用使用第一种方法(即它模仿音乐播放器)在后台运行。

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

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