2016-10-02 74 views
1

我有一個iOS應用,而不是我4年前開始編寫的代碼。每年在新的iOS版本發佈後,我都會使用新的iOS和新的AdMob SDK更新我的應用程序。將AdMob從v7.4.1更新到最新的v7.8.1後,iOS應用崩潰了

但今年我瘋了!當我將GoogleMobileAds.framework更改爲新版本時,應用程序會在任何GADRequest調用後崩潰。即使我試圖使用

NSLog(@「Google Mobile Ads SDK version:%@」,[GADRequest sdkVersion]);

我已經崩潰了。當然,我在編譯器標誌中使用了-ObjC。我試圖改變使用框架獨立使用豆莢,但我總是得到相同的錯誤。我附加你的堆棧:

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 Groups中嘗試所有類似的「解決方案」。

謝謝!

+0

0xa00656c646e696b6是什麼情況?你打印出來了嗎?它是一個帶標記的指針字符串嗎? [如果它試圖創建一個超過60個字節的標記指針字符串,它將失敗](https://www.mikeash.com/pyblog/friday-qa-2015-07-31-tagged-pointer-strings。 html) – Lefteris

回答

0

搜索您的代碼NSTaggedPointerString找出您在哪裏打電話[NSTaggedPointerString count]。現在谷歌NSTaggedPointerString並檢查方法是否存在count。如果沒有找到其他提供方法count方法

+0

除了[GADRequest sdkVersion]或[GADRequest請求]之外,我不會調用任何內容。堆棧調用由GoogleMobileAds.framework本身生成 – Diego

+0

然後在您使用的框架中發現其錯誤,您應該聯繫供應商並附上此崩潰報告。 另請閱讀供應商文檔,您可能會錯誤地使用它,可能需要在調用'request'方法之前初始化某些東西。閱讀他們的文檔 – PnotNP

+0

感謝您的回覆。問題是供應商是谷歌,沒有人知道有這個bug!我多次閱讀文檔。我已經嘗試過在發佈之前進行永久處理:-( – Diego

0

將LSApplicationQueriesSchemes添加爲.plist文件中的數組。 然後在其中添加所需的密鑰,如下所述!

<key>LSApplicationQueriesSchemes</key> 
<array> 
    <string>add required key here</string> 
    <string>fbauth2</string> 
</array> 
+0

謝謝大家。最後,我創建了一個新的空白項目,並重新編碼,它完美的工作......相同的代碼......好吧,我supouse有一些不同,但我看不到它;-) – Diego