Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Facebook Audience Network SDK Crash - +[FBSDKTypeUtility dictionary:objectForKey:ofType:]:

I've integrated Facebook Audience Network iOS SDK via Cocoapods. pod FBAudienceNetwork

Cocoapods version: 1.9.3, FBAudienceNetwork version: 5.10.0

Then, I got many production iOS crashes due to +[FBSDKTypeUtility dictionary:objectForKey:ofType:]: unrecognized selector sent to class FBSDKTypeUtility. Looking at Crashlytics, FAN's -[FBAdsManagerImpl cacheAdController:] calls this unrecognized method.

Even though I have the latest Facebook SDKs installed via the latest Cocoapods, I'm getting a lot of crashes.

like image 529
David Liu Avatar asked Nov 29 '25 08:11

David Liu


1 Answers

If you look at the FBAudienceNetwork 5.10.0 Podspec, it only requires:

"FBSDKCoreKit/Basics": [
      ">= 5.6.0"
    ]

In FacebookSDK 5.6.0, +[FBSDKTypeUtility dictionary:objectForKey:ofType:]: is not implemented. This method is only implemented later in FacebookSDK 7.0.1.

Therefore, the fix is to update FBAudienceNetwork 5.10.0 Podspec to require:

"FBSDKCoreKit/Basics": [
      ">= 7.0.1"
    ]
like image 68
David Liu Avatar answered Dec 02 '25 00:12

David Liu