什么是FNFPlayer?它从后台线程访问UIApplication applicationState

时间:2017-11-28 21:46:05

标签: ios uiapplicationdelegate

我经常在iOS 11(xcode 9)上收到这些警告:

=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 988, TID: 338692, Thread name: fnf player thread, Queue name: com.apple.root.default-qos.overcommit, QoS: 21
Backtrace:
4   hairzapp                            0x0000000103a35634 -[FNFPlayerLayer _preventPlayback] + 60
5   hairzapp                            0x0000000103a33f30 -[FNFPlayerLayer _resetGLContext] + 36
6   hairzapp                            0x0000000103a129cc __35-[FNFRenderingThread dispatchSync:]_block_invoke + 28
7   hairzapp                            0x0000000103a128a8 __35-[FNFRenderingThread performBlock:]_block_invoke + 36
8   CoreFoundation                      0x00000001848fa0fc <redacted> + 20
9   CoreFoundation                      0x00000001848f99cc <redacted> + 288
10  CoreFoundation                      0x00000001848f7c34 <redacted> + 2436
11  CoreFoundation                      0x0000000184817fb8 CFRunLoopRunSpecific + 436
12  CoreFoundation                      0x0000000184867098 CFRunLoopRun + 116
13  hairzapp                            0x0000000103a12ba4 -[FNFRenderingThread main] + 204
14  Foundation                          0x0000000185342860 <redacted> + 996
15  libsystem_pthread.dylib             0x000000018457c31c <redacted> + 308
16  libsystem_pthread.dylib             0x000000018457c1e8 <redacted> + 0
17  libsystem_pthread.dylib             0x000000018457ac28 thread_start + 4
2017-11-28 22:33:33.895582+0100 hairzapp[988:338692] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 988, TID: 338692, Thread name: fnf player thread, Queue name: com.apple.root.default-qos.overcommit, QoS: 21
Backtrace:
4   hairzapp                            0x0000000103a35634 -[FNFPlayerLayer _preventPlayback] + 60
5   hairzapp                            0x0000000103a33f30 -[FNFPlayerLayer _resetGLContext] + 36
6   hairzapp                            0x0000000103a129cc __35-[FNFRenderingThread dispatchSync:]_block_invoke + 28
7   hairzapp                            0x0000000103a128a8 __35-[FNFRenderingThread performBlock:]_block_invoke + 36
8   CoreFoundation                      0x00000001848fa0fc <redacted> + 20
9   CoreFoundation                      0x00000001848f99cc <redacted> + 288
10  CoreFoundation                      0x00000001848f7c34 <redacted> + 2436
11  CoreFoundation                      0x0000000184817fb8 CFRunLoopRunSpecific + 436
12  CoreFoundation                      0x0000000184867098 CFRunLoopRun + 116
13  hairzapp                            0x0000000103a12ba4 -[FNFRenderingThread main] + 204
14  Foundation                          0x0000000185342860 <redacted> + 996
15  libsystem_pthread.dylib             0x000000018457c31c <redacted> + 308
16  libsystem_pthread.dylib             0x000000018457c1e8 <redacted> + 0
17  libsystem_pthread.dylib             0x000000018457ac28 thread_start + 4
你可以帮我找到消息来源吗?我想它一定是我使用的库之一,因为我的代码中只有很少的[UIApplication applicationState]调用:

pod 'objective-zip', '1.0.3'
pod 'Google-Mobile-Ads-SDK'
pod 'AppLovinSDK'
pod 'AdColony'
pod 'GoogleMobileAdsMediationAppLovin'
pod 'GoogleMobileAdsMediationAdColony'
pod 'GoogleAnalytics'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'FBAudienceNetwork', '4.25.0'
pod 'GoogleConversionTracking'
pod 'Fabric'
pod 'Crashlytics'
pod 'AFNetworking'
pod 'AFNetworkActivityLogger', :git => 'https://github.com/AFNetworking/AFNetworkActivityLogger.git', :branch => '3_0_0'
pod 'iRate'
pod 'Firebase/Core'
pod 'Firebase/Messaging' 
pod 'MBProgressHUD'
pod 'Realm'
pod 'UICollectionViewLeftAlignedLayout'
pod 'OpenCV'
pod 'SCLAlertView-Objective-C'
pod 'CMPopTipView'

如果有人能给我提示如何找到坏lib,我会很高兴。

1 个答案:

答案 0 :(得分:2)

我猜它有Facebook SDK根。
Instagramm上找到GitHub类转储,看起来像一些私有类。 https://github.com/RishabSwift/InstagramHeaders/blob/master/FNFPlayerLayer.h

- (_Bool)_preventPlayback;    

还找到FNFPlayerLayer&#34;面包屑&#34;在这里:
https://github.com/facebook/infer/blob/master/infer/tests/codetoanalyze/objc/ioslints/unavailable_property_ios.m

可能来自FBAudienceNetwork框架,您可以尝试将其从Podfile中移除,然后再生成pod install并再次分析控制台日志。