Bastl
Bastl

Reputation: 893

Admob Reward Video GADRewardBasedVideoAdDelegate Undefined symbols

I recently implemented the admob (ver 7.9.1) reward video based on this tutorial: https://firebase.google.com/docs/admob/ios/rewarded-video

But I can not compile my app with this feature. I'm getting this error:

Undefined symbols for architecture x86_64:
  "l_OBJC_PROTOCOL_$_GADRewardBasedVideoAdDelegate", referenced from:
      l_OBJC_CLASS_PROTOCOLS_$_ViewController in libFramework.a(ViewController.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see     invocation)

I previously implemented the banner and interstitial ads and this worked fine.

any suggestions?

Upvotes: 1

Views: 1143

Answers (2)

Daniel Storm
Daniel Storm

Reputation: 18898

That error is telling you that you're not importing the required headers. Did you import the GADRewardBasedVideoAd header?

#import "GADRewardBasedVideoAd.h"

Alternatively, you could just import the entire AdMob framework. For example:

@import GoogleMobileAds;

Google also provides a complete GADRewardBasedVideoAd example on GitHub: RewardedVideoExample/ViewController.m

Upvotes: 1

Bastl
Bastl

Reputation: 893

Importing GoogleMobileAds/GADRewardBasedVideoAdDelegate.h and everything is working.

#import <GoogleMobileAds/GADRewardBasedVideoAdDelegate.h>

Upvotes: 1

Related Questions