Closed sunzhe closed 6 years ago
大佬来给看看 sdk适配iPheoneX 如果真机播放视频挂了 要悲催了 @lawder
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIStatusBar_Modern 0x7fd9aae0a740> valueForUndefinedKey:]: this class is not key value coding-compliant for the key foregroundView.'
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 吧.
@sunzhe 已收到,我们会尽快修复。
@sunzhe 但是foregroundView下面并没有data属性,求解
已修复,更新至最新版即可解决
如题:
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