I'm Integrating Facebook Audience Network for Interstitial and Rewarded types of Ads.
I'm trying to integrate it as a framework and not in the project.
When I'm trying to test it through the Test Cases It failing after this line:
self.fbInterstitialAd = [[FBInterstitialAd alloc] initWithPlacementID:self.placementID];
and giving me this error:
*** Terminating app due to uncaught exception 'FBFinalClassViolationException', reason: 'FBAdConfigManager is a final class and cannot be subclassed. FBAdConfigManager' ***
I really do not understand why it is crashing. I am really not able to find what is the issue. I also integrated this Audience network SDK in separate single view Application, there I'm able to see the ADs and working fine.
I had the same issue and found solution in case of using cocoapods.
change this line in Podfile
use_frameworks!
to
use_frameworks! :linkage => :static
I think this crash is caused by framework bug with dynamic linkage.
Thanks to @sudekon I was also able to fix the problem. This is the only solution which has worked for me.
In addition to what sudekon says, for Unity developers, you can click Assets -> Play Services Resolver (or External Dependency Manager) -> iOS Resolver -> Settings and check the checkbox that says "Link frameworks statically" and then build Xcode project. This will prepare the Podfile with the suggested instructions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With