Skip to content

Commit

Permalink
Fix depricated values kGADAdSizeBanner and bottomLayoutGuide
Browse files Browse the repository at this point in the history
  • Loading branch information
souzamari committed Oct 23, 2024
1 parent 54414b7 commit 92944e9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ios-sdk-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
build-demo-swift:
name: "Build Demo Swift"
runs-on: macos-14
env:
FL_OUTPUT_DIR: output
needs: [setup, sdk-tests]
steps:
- name: Checkout Code
Expand All @@ -48,11 +50,13 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: demo-swift
path: output/**
path: ./${{ env.FL_OUTPUT_DIR }}/**

build-demo-objc:
name: "Build Demo Objective-C"
runs-on: macos-14
env:
FL_OUTPUT_DIR: output
needs: [setup, sdk-tests]
steps:
- name: Checkout Code
Expand All @@ -64,5 +68,5 @@ jobs:
- name: Store Artifacts
uses: actions/upload-artifact@v4
with:
name: demo-objct
path: output/**
name: demo-objc
path: ./${{ env.FL_OUTPUT_DIR }}/**
4 changes: 2 additions & 2 deletions demo-ios-objc/demo-ios-objc/GAMBannerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ @implementation GAMBannerViewController
- (void)viewDidLoad {
[super viewDidLoad];

self.bannerView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
self.bannerView = [[GADBannerView alloc] initWithAdSize:GADAdSizeBanner];
self.bannerView.adUnitID = @"/22081946781/ios-sdk-demo/mobile-leaderboard";
[self addBannerViewToView:self.bannerView];
self.bannerView.rootViewController = self;
Expand Down Expand Up @@ -76,7 +76,7 @@ - (void)addBannerViewToView:(UIView *)bannerView {
[NSLayoutConstraint constraintWithItem:bannerView
attribute:NSLayoutAttributeBottom
relatedBy:NSLayoutRelationEqual
toItem:self.bottomLayoutGuide
toItem:self.view.safeAreaLayoutGuide.bottomAnchor
attribute:NSLayoutAttributeTop
multiplier:1
constant:0],
Expand Down
4 changes: 2 additions & 2 deletions demo-ios-swift/demo-ios-swift/GAMBannerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class GAMBannerViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()

bannerView = GADBannerView(adSize: kGADAdSizeBanner)
bannerView = GADBannerView(adSize: GADAdSizeBanner)
addBannerViewToView(bannerView)
bannerView.rootViewController = self
}
Expand Down Expand Up @@ -144,7 +144,7 @@ class GAMBannerViewController: UIViewController {
NSLayoutConstraint(item: bannerView,
attribute: .bottom,
relatedBy: .equal,
toItem: bottomLayoutGuide,
toItem: view.safeAreaLayoutGuide.bottomAnchor,
attribute: .top,
multiplier: 1,
constant: 0),
Expand Down

0 comments on commit 92944e9

Please sign in to comment.