Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal change #392

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ - (IBAction)loadTargetedAd:(id)sender {
GADRequest *request = [GADRequest request];
if ([self.childDirectedLabel.text isEqual:@"Yes"] ||
[self.childDirectedLabel.text isEqual:@"No"]) {
[GADMobileAds.sharedInstance.requestConfiguration
tagForChildDirectedTreatment:self.childDirectedLabel.text.boolValue];
GADMobileAds.sharedInstance.requestConfiguration.tagForChildDirectedTreatment =
[NSNumber numberWithBool:self.childDirectedLabel.text.boolValue];
}

[self.bannerView loadRequest:request];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ @implementation AdMobNativeCustomMuteThisAdViewController

- (void)viewDidLoad {
[super viewDidLoad];
self.versionLabel.text = GADMobileAds.sharedInstance.sdkVersion;
self.versionLabel.text = GADGetStringFromVersionNumber(GADMobileAds.sharedInstance.versionNumber);

NSArray<GADNativeAdView *> *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"NativeAdView"
owner:nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ @implementation GAMCustomVideoControlsController
- (void)viewDidLoad {
[super viewDidLoad];

self.versionLabel.text = GADMobileAds.sharedInstance.sdkVersion;
self.versionLabel.text = GADGetStringFromVersionNumber(GADMobileAds.sharedInstance.versionNumber);
[self refreshAd:nil];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ class AppOpenAdManager: NSObject {
print("Start loading app open ad.")
GADAppOpenAd.load(
withAdUnitID: "/6499/example/app-open",
request: GADRequest(),
orientation: UIInterfaceOrientation.portrait
request: GADRequest()
) { ad, error in
self.isLoadingAd = false
if let error = error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ class AppOpenAdManager: NSObject {
print("Start loading app open ad.")
GADAppOpenAd.load(
withAdUnitID: "ca-app-pub-3940256099942544/5575463023",
request: GADRequest(),
orientation: UIInterfaceOrientation.portrait
request: GADRequest()
) { ad, error in
self.isLoadingAd = false
if let error = error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class AdManagerMultipleAdSizesViewController: UIViewController, GADAdSizeDelegat
view.addConstraint(
NSLayoutConstraint(
item: bannerView!, attribute: .bottom, relatedBy: .equal,
toItem: bottomLayoutGuide, attribute: .top, multiplier: 1, constant: 0))
toItem: view.safeAreaLayoutGuide.bottomAnchor, attribute: .top, multiplier: 1, constant: 0))
view.addConstraint(
NSLayoutConstraint(
item: bannerView!, attribute: .centerX, relatedBy: .equal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ class AdMobAdTargetingTableViewController: UITableViewController, UIPickerViewDa
@IBAction func loadTargetedAd(_ sender: AnyObject) {
let request = GADRequest()
if childDirectedLabel.text == "Yes" {
GADMobileAds.sharedInstance().requestConfiguration.tag(forChildDirectedTreatment: true)
GADMobileAds.sharedInstance().requestConfiguration.tagForChildDirectedTreatment = true
} else if childDirectedLabel.text == "No" {
GADMobileAds.sharedInstance().requestConfiguration.tag(forChildDirectedTreatment: false)
GADMobileAds.sharedInstance().requestConfiguration.tagForChildDirectedTreatment = false
}
bannerView.load(request)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ class AdMobBannerSizesViewController: UIViewController, UIPickerViewDataSource,
view.addConstraint(
NSLayoutConstraint(
item: bannerView!, attribute: .bottom, relatedBy: .equal,
toItem: bottomLayoutGuide, attribute: .top, multiplier: 1, constant: 0))
toItem: view.safeAreaLayoutGuide.bottomAnchor, attribute: .top, multiplier: 1, constant: 0
))
view.addConstraint(
NSLayoutConstraint(
item: bannerView!, attribute: .centerX, relatedBy: .equal,
Expand Down
Loading