Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FBAudience Network as a Framework Integration

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.

like image 334
Kalpesh Thakare Avatar asked Oct 20 '25 14:10

Kalpesh Thakare


2 Answers

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.

like image 168
sukedon Avatar answered Oct 22 '25 04:10

sukedon


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.

like image 28
barisferah Avatar answered Oct 22 '25 04:10

barisferah



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!