pili-engineering / PLPlayerKit

PLPlayerKit 是七牛推出的一款免费的适用于 iOS 平台的播放器 SDK,采用全自研的跨平台播放内核,拥有丰富的功能和优异的性能,可高度定制化和二次开发。
https://developer.qiniu.com/pili/sdk/1211/ios-playback-end-the-sdk
2.01k stars 408 forks source link

模拟器跑iPhone X 播放视频时崩溃报错 其他模拟器正常 #280

Closed sunzhe closed 6 years ago

sunzhe commented 7 years ago

如题:

1 0x000000010c0a17b4 in CAnalPili::GetSignalStrength() at /Users/junlin/myCode/qplayer/code/anl/CAnalPili.cpp:847

2 0x000000010c0a1510 in CAnalPili::EncNetworkInfoBase(char*) at /Users/junlin/myCode/qplayer/code/anl/CAnalPili.cpp:446

3 0x000000010c0a0567 in CAnalPili::EncConnectChangedEvent() at /Users/junlin/myCode/qplayer/code/anl/CAnalPili.cpp:542

4 0x000000010c0a0241 in CAnalPili::ReportEvent(tagQCANA_EVENT_INFO*) at /Users/junlin/myCode/qplayer/code/anl/CAnalPili.cpp:139

5 0x000000010c0ac02f in CAnalysisMng::SendAnalData(tagQCANA_EVT_BASE*) at /Users/junlin/myCode/qplayer/code/anl/CAnalysisMng.cpp:167

6 0x000000010c0ac587 in CAnalysisMng::ReceiveMsg(CMsgItem*) at /Users/junlin/myCode/qplayer/code/anl/CAnalysisMng.cpp:344

7 0x000000010c070078 in CMsgMng::NotifyItem(CMsgItem*) at /Users/junlin/myCode/qplayer/code/base/CMsgMng.cpp:162

8 0x000000010c0701ed in CMsgMng::OnWorkItem() at /Users/junlin/myCode/qplayer/code/base/CMsgMng.cpp:211

9 0x000000010c07024f in non-virtual thunk to CMsgMng::OnWorkItem() ()

10 0x000000010c092c09 in CThreadWork::WorkLoop() at /Users/junlin/myCode/qplayer/code/base/CThreadWork.cpp:184

11 0x000000010c092808 in CThreadWork::WorkProc(void*) at /Users/junlin/myCode/qplayer/code/base/CThreadWork.cpp:158

sunzhe commented 7 years ago

大佬来给看看 sdk适配iPheoneX 如果真机播放视频挂了 要悲催了 @lawder

sunzhe commented 7 years ago

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIStatusBar_Modern 0x7fd9aae0a740> valueForUndefinedKey:]: this class is not key value coding-compliant for the key foregroundView.'

sunzhe commented 7 years ago

iPhone X的状态栏是多嵌套了一层 如果按照之前的方式获取就会报错 Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIStatusBar_Modern 0x7fd9aae0a740> valueForUndefinedKey:]: this class is not key value coding-compliant for the key foregroundView.'

解决方案如下. UIApplication *application = [UIApplication sharedApplication]; id children = nil; if ([[application valueForKeyPath:@"_statusBar"] isKindOfClass:NSClassFromString(@"UIStatusBar_Modern")]) { children = [[[[application valueForKeyPath:@"_statusBar"] valueForKeyPath:@"_statusBar"] valueForKeyPath:@"foregroundView"] subviews]; } else { children = [[[application valueForKeyPath:@"_statusBar"] valueForKeyPath:@"foregroundView"] subviews]; }

尽快修复 适配 iPhone X 吧.

lawder commented 7 years ago

@sunzhe 已收到,我们会尽快修复。

suqinglin113x commented 7 years ago

@sunzhe 但是foregroundView下面并没有data属性,求解

g761007 commented 7 years ago

https://github.com/pili-engineering/PLPlayerKit/pull/291

HeraShowFeng commented 6 years ago

已修复,更新至最新版即可解决