作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们已经升级到FBAudienceNetwork v.4.26,现在,每次尝试在Xcode中运行单元测试目标时,都会看到以下未处理的运行时异常:
2017-10-12 15:30:41.229388-0500 App[60509:1890366] *** Terminating app due to uncaught exception 'FBFinalClassViolationException', reason: 'FBAdTimer is a final class and cannot be subclassed. FBAdTimer'
*** First throw call stack:
(
0 CoreFoundation 0x000000011ca991cb __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000011c1bef41 objc_exception_throw + 48
2 AppTests 0x00000001399cc669 +[FBAdTimer scheduledTimerWithTimeInterval:repeats:block:] + 0
3 libobjc.A.dylib 0x000000011c1bfa14 CALLING_SOME_+initialize_METHOD + 19
4 libobjc.A.dylib 0x000000011c1bfdae _class_initialize + 276
5 libobjc.A.dylib 0x000000011c1c65e7 lookUpImpOrForward + 225
6 libobjc.A.dylib 0x000000011c1d63d4 _objc_msgSend_uncached + 68
7 AppTests 0x00000001399c8ec4 +[FBAdFingerprinter load] + 46
8 libobjc.A.dylib 0x000000011c1c069b call_load_methods + 695
9 libobjc.A.dylib 0x000000011c1c12f3 load_images + 70
10 ??? 0x000000010ff7adac 0x0 + 4562857388
11 ??? 0x000000010ff876c5 0x0 + 4562908869
12 ??? 0x000000010ff86898 0x0 + 4562905240
13 ??? 0x000000010ff8692c 0x0 + 4562905388
14 ??? 0x000000010ff7d956 0x0 + 4562868566
15 ??? 0x000000010ff83076 0x0 + 4562890870
16 libdyld.dylib 0x000000011ddeba47 dlopen + 86
17 CoreFoundation 0x000000011ca49808 _CFBundleDlfcnLoadBundle + 152
18 CoreFoundation 0x000000011ca49694 _CFBundleLoadExecutableAndReturnError + 324
19 Foundation 0x0000000114060ec1 -[NSBundle loadAndReturnError:] + 520
20 IDEBundleInjection 0x0000000110057860 __XCBundleInjection + 798
21 ??? 0x000000010ff8bc16 0x0 + 4562926614
22 ??? 0x000000010ff8be46 0x0 + 4562927174
23 ??? 0x000000010ff876da 0x0 + 4562908890
24 ??? 0x000000010ff86898 0x0 + 4562905240
25 ??? 0x000000010ff8692c 0x0 + 4562905388
26 ??? 0x000000010ff7b15d 0x0 + 4562858333
27 ??? 0x000000010ff7ec98 0x0 + 4562873496
28 ??? 0x000000010ff7a3d4 0x0 + 4562854868
29 ??? 0x0000000118742510 0x0 + 4705232144
30 ??? 0x0000000118740a39 0x0 + 4705225273
31 ??? 0x000000011873c249 0x0 + 4705206857
32 ??? 0x000000011873c036 0x0 + 4705206326
33 ??? 0x0000000000000007 0x0 + 7
)
libc++abi.dylib: terminating with uncaught exception of type NSException
λ ~/Projects/iOS/app/ IOS-6370* grep -iR "FBAdTimer" .
Binary file ./Pods/FBAudienceNetwork/FBAudienceNetwork.framework/FBAudienceNetwork matches
Binary file ./App.xcworkspace/xcuserdata/silver.xcuserdatad/UserInterfaceState.xcuserstate matches
最佳答案
根据https://developers.facebook.com/bugs/147221075773612/的说法,FBAudienceNetwork不能同时位于测试目标和与其一起加载的主捆绑包中。解决方案是从Podfile中的测试目标中删除依赖项:
target 'App' do
use_frameworks!
pod 'FBAudienceNetwork' # Only present in the main app target
end
target 'AppTests' do
end
关于ios - FBFinalClassViolationException:FBAdTimer是最终类,不能被子类化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46718482/
我们已经升级到FBAudienceNetwork v.4.26,现在,每次尝试在Xcode中运行单元测试目标时,都会看到以下未处理的运行时异常: 2017-10-12 15:30:41.229388-
我是一名优秀的程序员,十分优秀!