DCloud_iOS_XHY
DCloud_iOS_XHY
  • 发布:2019-09-27 12:19
  • 更新:2022-04-26 15:27
  • 阅读:7204

iOS 云打包后台权限配置教程

分类:uni-app

iOS App 在使用一些功能时需要申请后台权限,比如后台音频播放、后台定位等,在提交云打包时,需要在 manifest.json 的 "app-plus" -> "distribute" -> "ios" -> "UIBackgroundModes" 节点添加对应权限的 描述key 即可;

注意:后台权限用不到千万不要填写,以免审核被拒

{  
"app-plus" : {  
        /* 应用发布信息 */  
        "distribute" : {  
            /* ios打包配置 */  
            "ios" : {  
                "UIBackgroundModes" : [ "audio"] // 数组,支持多个  
            },  
         ...  
        }  
    }  
}

权限描述key获取方式

在 xcode 中勾选权限

然后查看 info.plist 右键勾选 Raw Keys & Values UIBackgroundModes 对应的就是需要填写在 manifest.json 中的 值

所有 key

audio  // Audio, AirPlay, and Picture in Picture  
bluetooth-central // Uses Bluetooth LE accessories  
bluetooth-peripheral // Acts as a Bluetooth LE accessory  
external-accessory // External accessory communication  
fetch // Background fetch  
location // Location updates  
processing // Background processing  
remote-notification // Remote notifications  
voip   // Voice over IP
0 关注 分享

要回复文章请先登录注册

1***@qq.com

1***@qq.com

回复 DCloud_iOS_XHY :
APP后台运行时,上传文件不中断,这个怎么配置啊
2022-04-26 15:27
Tool007

Tool007

回复 Tool007 :
IOS 云打包 这个问题卡了 好久了 求解决办法
2022-01-05 03:04
Tool007

Tool007

没有配置后台持续定位类权限, 云打包后自动添加无关权限,如何解决
2022-01-05 03:03
DCloud_iOS_XHY

DCloud_iOS_XHY (作者)

回复 sunway :
注意:后台权限用不到千万不要填写,以免审核被拒,如果你的应用不符合使用后台运行的规范,也会被拒,具体可以查查苹果审核标准
2021-04-13 12:19
sunway

sunway

这项配置了被拒,如何处理?还要用xcode?
2021-04-10 00:27
gwlxxx1

gwlxxx1

回复 1***@qq.com :
这个问题怎么解决
2020-12-14 21:53
DCloud_iOS_XHY

DCloud_iOS_XHY (作者)

回复 1***@qq.com :
api文档有写
2019-11-05 17:27
1***@qq.com

1***@qq.com

IOS音频播放,锁屏后,如何显示音频的播放与控制
2019-10-16 11:02