我有一个iOS应用程序,而不是我4年前开始编写的代码。每年新版iOS发布后,我都会使用新的iOS和新的AdMob SDK更新我的应用程序。
但今年我疯了!当我将GoogleMobileAds.framework更改为新版本时,在调用GADRequest后应用程序崩溃。即使我尝试使用
获取版本NSLog(@" Google移动广告SDK版:%@",[GADRequest sdkVersion]);
我发生了撞车事故。当然,我在编译器标志中有-ObjC。我试图改变独立框架的使用来使用Pods,但我总是得到同样的错误。我把堆栈附在你身上:
016-10-02 19:18:55.062 TheNameOfMayApp[13162:7700615] -[NSTaggedPointerString count]: unrecognized selector sent to instance 0xa00656c646e696b6
2016-10-02 19:18:55.073 TheNameOfMayApp[13162:7700615] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString count]: unrecognized selector sent to instance 0xa00656c646e696b6'
*** First throw call stack:
(
0 CoreFoundation 0x0000000104dfe34b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010478021e objc_exception_throw + 48
2 CoreFoundation 0x0000000104e6df34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x0000000104d83c15 ___forwarding___ + 1013
4 CoreFoundation 0x0000000104d83798 _CF_forwarding_prep_0 + 120
5 CoreFoundation 0x0000000104d7b044 -[NSSet initWithArray:] + 36
6 TheNameOfMayApp 0x0000000100fe3c70 GADIsAtLeastVersion + 11841
7 TheNameOfMayApp 0x0000000100fe177d GADIsAtLeastVersion + 2382
8 TheNameOfMayApp 0x0000000100fe15d9 GADIsAtLeastVersion + 1962
9 TheNameOfMayApp 0x0000000100fe142b GADIsAtLeastVersion + 1532
10 TheNameOfMayApp 0x0000000100f6b5e8 GADiTunesMetadataForFileAtPath + 2401
11 TheNameOfMayApp 0x0000000100f76ba8 GADGIDSignInInstance + 3464
12 TheNameOfMayApp 0x0000000100fafe77 GADDispatchAsyncSafeMainQueue + 45
13 libobjc.A.dylib 0x0000000104780efa CALLING_SOME_+initialize_METHOD + 19
14 libobjc.A.dylib 0x0000000104781126 _class_initialize + 554
15 libobjc.A.dylib 0x0000000104787c1d lookUpImpOrForward + 176
16 libobjc.A.dylib 0x0000000104797554 _objc_msgSend_uncached + 68
17 TheNameOfMayApp 0x0000000100ea421b -[MainViewController PonPublicidadAdMob] + 59
18 TheNameOfMayApp 0x0000000100ea393a -[MainViewController MuestraPublicidad] + 122
19 TheNameOfMayApp 0x0000000100ea4a69 -[MainViewController viewDidLoad] + 73
20 UIKit 0x000000010248b06d -[UIViewController loadViewIfRequired] + 1258
21 UIKit 0x000000010248b4a0 -[UIViewController view] + 27
22 TheNameOfMayApp 0x0000000100e96346 -[TheNameOfMayAppAppDelegate preparaPantallaInicialConiOS6] + 886
23 TheNameOfMayApp 0x0000000100e95ddd -[TheNameOfMayAppAppDelegate application:didFinishLaunchingWithOptions:] + 285
24 UIKit 0x00000001022e068e -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 290
25 UIKit 0x00000001022e2013 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4236
26 UIKit 0x00000001022e83b9 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731
27 UIKit 0x00000001022e5539 -[UIApplication workspaceDidEndTransaction:] + 188
28 FrontBoardServices 0x000000010a6c276b __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
29 FrontBoardServices 0x000000010a6c25e4 -[FBSSerialQueue _performNext] + 189
30 FrontBoardServices 0x000000010a6c296d -[FBSSerialQueue _performNextFromRunLoopSource] + 45
31 CoreFoundation 0x0000000104da3311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
32 CoreFoundation 0x0000000104d8859c __CFRunLoopDoSources0 + 556
33 CoreFoundation 0x0000000104d87a86 __CFRunLoopRun + 918
34 CoreFoundation 0x0000000104d87494 CFRunLoopRunSpecific + 420
35 UIKit 0x00000001022e3db6 -[UIApplication _run] + 434
36 UIKit 0x00000001022e9f34 UIApplicationMain + 159
37 TheNameOfMayApp 0x0000000100e93d1e main + 62
38 libdyld.dylib 0x00000001065c168d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
你能帮帮我吗?我花了两个星期没有财富尝试所有类似的"解决方案"在StackOverflow和Google网上论坛中。
感谢!!!
答案 0 :(得分:0)
在代码中搜索NSTaggedPointerString
,找出您要拨打的电话[NSTaggedPointerString count]
。现在谷歌NSTaggedPointerString
并检查是否存在count
方法。如果没有,那么找出提供count
方法的其他方式
答案 1 :(得分:0)
在.plist文件中将LSApplicationQueriesSchemes添加为数组。 然后在其中添加所需的键,如下所定义!
<key>LSApplicationQueriesSchemes</key>
<array>
<string>add required key here</string>
<string>fbauth2</string>
</array>