iOS后台运行程序

来源:互联网 发布:西游降魔篇 知乎 编辑:程序博客网 时间:2024/04/29 19:32

1、检查设备是否支持多任务

2、applicationDidEnterBackground和applicationWillEnterForeground(UIApplicationDidEnterBackgroundNotification和UIApplicationWillEnterForegroundNotification)

3、声明你需要的后台任务(在Info.plist中添加UIBackgroundModes键值:audio、location、voip)

0 0
原创粉丝点击