详细问题描述
IOS 13 离线打包使用背景音频闪退(更新最新版SDK才出现的,在IOS13以下版本也没问题),我用最新版的HbuilderX直接运行没问题,但是离线打包方式就会崩溃。已知IOS 13 MPRemoteCommandCenter API有所调整,不知是我配置的问题还是SDK的问题。
另外我发现我也不是个例,在此帖子讨论区 https://ask.dcloud.net.cn/docs/#//ask.dcloud.net.cn/article/103 也发现有小伙伴遇到同样问题。
还望官方小伙伴尽快抽空排查回复,谢谢!
相关扩展:
IOS 13 MPRemoteCommandCenter 必须返回MPRemoteCommandHandlerStatus 不然会崩溃的问题,相关问题讨论帖地址: https://forums.developer.apple.com/thread/121540
[报错日志]
2019-10-10 19:01:40.502858+0800 Bobbyen[85278:2824163]  Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unsupported action method signature. Must return MPRemoteCommandHandlerStatus or take a completion handler as the second argument.'
 First throw call stack:
(
0   CoreFoundation                      0x00000001187301ee exceptionPreprocess + 350
1   libobjc.A.dylib                     0x00000001183b3b20 objc_exception_throw + 48
2   CoreFoundation                      0x000000011872ff68 +[NSException raise:format:arguments:] + 88
3   Foundation                          0x00000001118dcde9 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
4   MediaPlayer                         0x00000001150ac230 -[MPRemoteCommand addTarget:action:] + 1154
5   Bobbyen                             0x000000010ee10f97 54-[PGAudio configRemoteCommandCenterWithPlayerContext:]_block_invoke + 128
6   libdispatch.dylib                   0x000000011a0ccdf8 _dispatch_call_block_and_release + 12
7   libdispatch.dylib                   0x000000011a0cdd6c _dispatch_client_callout + 8
8   libdispatch.dylib                   0x000000011a0dbe24 _dispatch_main_queue_callback_4CF + 1500
9   CoreFoundation                      0x0000000118692e49 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9
10  CoreFoundation                      0x000000011868daa9 __CFRunLoopRun + 2329
11  CoreFoundation                      0x000000011868ce66 CFRunLoopRunSpecific + 438
12  GraphicsServices                    0x000000011af41bb0 GSEventRunModal + 65
13  UIKitCore                           0x000000012197bdd0 UIApplicationMain + 1621
14  Bobbyen                             0x000000010e3e02b0 main + 112
15  libdyld.dylib                       0x000000011a155d29 start + 1
16  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException  
IDE运行环境说明
[IDE版本号] HBuilderX 2.3.3
uni-app运行环境说明
[项目是cli创建的还是HBuilderX创建的?如果是cli创建的,请更新到最新版cli再试] HBuilderX
[编译模式是老模板模式还是新的自定义组件模式?] 自定义组件模式
App运行环境说明
[Android版本号]
[iOS版本号] IOS 13.1.2
 
             
             
             
			 
                                        
                                     
            
1 个回复
DCloud_iOS_XHY
感谢反馈 bug已确认,HBuilderX2.3.4+版本已修复此问题