In ViewController.h my code is
#import <UIKit/UIKit.h>
@class GADBannerView;
@interface ViewController : UIViewController
@property (strong, nonatomic) IBOutlet GADBannerView *addView;
@end
And ViewController.m File my code is
@import GoogleMobileAds;
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.addView.adUnitID = @"ca-app-pub-9210017787755331/6998637808";
self.addView.rootViewController = self;
GADRequest *request = [GADRequest request];
request.testDevices = @[
@"2077ef9a63d2b398840261c8221a0c9a" // Eric's iPod Touch
];
[self.addView loadRequest:request];
}
And Finally I have Disabled Bitcode. And Added ATS(Application Transport layer Security Settings ) into plist file Anybody Please tell me what the problem is happening and how can i overcome the problem. Error Log is here
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setAdUnitID:]: unrecognized selector sent to instance 0x7f88bb51e090'