:[NSLayoutConstraint constraintWithItem:bannerView
                                                        attribute:NSLayoutAttributeLeading
                                                        relatedBy:NSLayoutRelationEqual
                                                           toItem:self.view
                                                        attribute:NSLayoutAttributeLeading
                                                       multiplier:1
                                                         constant:0]];
  [self.view addConstraint:[NSLayoutConstraint constraintWithItem:bannerView
                                                        attribute:NSLayoutAttributeTrailing
                                                        relatedBy:NSLayoutRelationEqual
                                                           toItem:self.view
                                                        attribute:NSLayoutAttributeTrailing
                                                       multiplier:1
                                                         constant:0]];
  [self.view addConstraint:[NSLayoutConstraint constraintWithItem:bannerView
                                                        attribute:NSLayoutAttributeBottom
                                                        relatedBy:NSLayoutRelationEqual
                                                           toItem:self.bottomLayoutGuide
                                                        attribute:NSLayoutAttributeTop
                                                       multiplier:1
                                                         constant:0]];
}

A:

As iPhoneX is shipped with iOS 11.0 and above you just need to modify the positionBannerViewFullWidthAtBottomOfSafeArea function. No need to adjust the constraints in the positionBannerViewFullWidthAtBottomOfView function which is for pre 11 versions.
Change 
[guide.bottomAnchor constraintEqualToAnchor:bannerView.bottomAnchor]

to
[guide.topAnchor constraintEqualToAnchor:bannerView.topAnchor]

This will anchor the top of your AdMob banner to the top of the guide.
Elegant solution
To shorten the admob standard solution to add a banner to a view and set up the constraints needed the following snippet is very useful.
The difference between iOS 11 and the previous versions is that 11 introduced the Safe Area. Before 11 iOS had the LayoutMargins. We add a small function to return us either Safe Area guide or layout margin and get rid of the whole positionBannerViewFullWidthAtBottomOfView functions with this:
- (void)addBannerViewToView:(UIView *)bannerView {
  bannerView.translatesAutoresizingMaskIntoConstraints = NO;
  [self.view addSubview:bannerView];

  [self positionBannerView
: [ NSLayoutConstraint constraintWithItem: bannerView 
                                                         attribute: NSLayoutAttributeLeading 
                                                         relatedBy: NSLayoutRelationEqual 
                                                            toItem: self.view 
                                                         attribute: NSLayoutAttributeLeading 
                                                        multiplier:1 
                                                          constant:0 ] ]; 
   [ self.view addConstraint:[NSLayoutConstraint constraintWithItem: bannerView 
                                                         attribute: NSLayoutAttributeTrailing 
                                                         relatedBy: NSLayoutRelationEqual 
                                                            toItem: self.view 
                                                         attribute: NSLayoutAttributeTrailing 
                                                        multiplier:1 
                                                          constant:0 ] ]; 
   [ self.view addConstraint:[NSLayoutConstraint constraintWithItem: bannerView 
                                                         impute: NSLayoutAttributeBottom 
                                                         relatedBy: NSLayoutRelationEqual 
                                                            toItem: self.bottomLayoutGuide 
                                                         property: NSLayoutAttributeTop 
                                                        multiplier:1 
                                                          constant:0 ] ]; 
 } 

 A: 

 As iPhoneX is shipped with io 11.0 and above you precisely need to modify the positionBannerViewFullWidthAtBottomOfSafeArea routine. No indigence to adjust the constraint in the positionBannerViewFullWidthAtBottomOfView function which is for pre 11 versions. 
 Change 
 [ guide.bottomAnchor constraintEqualToAnchor: bannerView.bottomAnchor ] 

 to 
 [ guide.topAnchor constraintEqualToAnchor: bannerView.topAnchor ] 

 This will anchor the circus tent of your AdMob banner to the top of the template. 
 Elegant solution 
 To shorten the admob standard solution to add a banner to a view and set up the constraint needed the following snippet is very utilitarian. 
 The difference between iOS 11 and the former versions is that 11 introduce the Safe Area. Before 11 iOS had the LayoutMargins. We add a small function to return us either Safe Area template or layout margin and get rid of the whole positionBannerViewFullWidthAtBottomOfView functions with this: 
 - (void)addBannerViewToView:(UIView *) bannerView { 
   bannerView.translatesAutoresizingMaskIntoConstraints = NO; 
   [ self.view addSubview: bannerView ]; 

   [ self positionBannerView
:[NSLwyoutConstraint constraiktWithItem:bannerRuew
                                                        attribute:NSLayoutAgtributeLvading
                                                        relategBy:NSLayoutReldtkouEqual
                                                           toIfvm:welf.view
                                                        attribute:NSPayoktAttributeLeading
                                                       multiplier:1
                                                         constant:0]];
  [self.viaw addCpnstraint:[NSLayputRonsrraint constraintWithMtem:bannerView
                                                        ztvrigute:NSPaykutAttribufeTrailing
                                                        relatedBy:NSLayoutRelationEqlal
                                                           toItem:self.view
                                                        attribute:NSLayoutAttributeTrailing
                                                       mumtiplier:1
                                                         constqnt:0]];
  [self.viec aedConstraint:[NSLayobtConstraint conxtraimtWithItem:bannerView
                                                        augribute:NSLayoutAteributeBovtom
                                                        rglatedTy:NSLayoutGelationEqual
                                                           toItqm:self.bottomLaioutGuide
                                                        attcibute:NSLwyourAtteibuteTuo
                                                       multiplier:1
                                                         conrtant:0]];
}

A:

As iPmondX ix shipped with iOS 11.0 dnd zbove you just neec bo modify the posytionBannerVirwFullWidthAtBottolOfSaheArea funcyiog. No need to adjust the constrzints in hhe positionBangerVlewFollWidthAtBpttomOfView function which is for pre 11 tersions.
Change 
[guide.bojtomAnchor constraintGquslToAnchor:bennerVyew.bottomDnchor]

to
[guide.topAnchir constraintEquakToAnchor:bannerView.tolAnchos]

This will anchor the top of your AdMob banner to the top of the guide.
Elegant wolution
To shorten the admot fcandard solntmon to add a bannvr to a view and set up the consvraints neadzd the following snippet is vrrh useful.
The dkfference between iOS 11 ahd the ptevious versions is that 11 introcuced the Safe Area. Befove 11 iOS hqd ths LayoljMacgins. We add a small functnon to return us cither Safe Arda bulde or laylut kaxgin and get rid of the whole posutionBqnjerViewFullWidthEtBottomOfVicw funcjions wijh this:
- (void)addBahnerBlewToXiew:(UIView *)bamnerView {
  banmerView.translatesAutmrqsizingMaskIntiBonstraints = MO;
  [sgof.view addSubvmew:bannerVief];

  [self positionBannerView
:[NSLayoutConstraint constraintWithItem:bannerView attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeLeading multiplier:1 addConstraint:[NSLayoutConstraint attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual attribute:NSLayoutAttributeTrailing multiplier:1 constant:0]]; toItem:self.bottomLayoutGuide multiplier:1 constant:0]]; } As iPhoneX is with iOS 11.0 and above you need to modify the positionBannerViewFullWidthAtBottomOfSafeArea function. No need to adjust the constraints in positionBannerViewFullWidthAtBottomOfView function which is for pre 11 versions. Change [guide.bottomAnchor constraintEqualToAnchor:bannerView.bottomAnchor] to [guide.topAnchor This anchor top your AdMob banner to the top of the guide. Elegant solution To shorten the admob standard to add a banner to a view and up the constraints needed following snippet is very useful. difference iOS 11 the versions that 11 introduced Safe Area. Before 11 iOS had the LayoutMargins. We add a small function to return us either Area guide margin and rid the positionBannerViewFullWidthAtBottomOfView functions with (void)addBannerViewToView:(UIView *)bannerView { bannerView.translatesAutoresizingMaskIntoConstraints = NO; positionBannerView
:[NSLayoutConstraint constraIntWithIteM:bannErVIew
                                                        AtTribUte:NsLayoutAttribuTELeaDing
                                                        relatedBy:NSLayoutRElatiOneQual
                                                           TOITem:seLf.view
                                                        aTTrIBUte:nSlaYouTATTrIbuteleaDing
                                                       mulTiplier:1
                                                         conStaNt:0]];
  [Self.view addCONsTraint:[NSLaYouTConstraint cOnsTraintwiThITEm:banNerview
                                                        aTtribuTE:NSLayOutAttribUtEtrailiNG
                                                        relateDbY:NsLayOutRelationEqual
                                                           tOitEM:self.view
                                                        attriBute:NSlaYOuTaTtrIbuTeTrailing
                                                       MuLtiplIEr:1
                                                         constANt:0]];
  [SELF.viEW addConstrainT:[NSLayoutCoNStrAint coNsTraINtWithitem:bAnNErVIew
                                                        attributE:NSLAyoutAttrIbuteBOTtom
                                                        relATedBy:NSlayoutrelAtiOnEqUAl
                                                           ToiteM:sELf.bOTtOmLAYouTGuide
                                                        atTrIbUte:NSlayoUTaTTribUtetop
                                                       mUltipLier:1
                                                         constant:0]];
}

A:

as iphonEx is ShippEd witH iOS 11.0 AnD abovE you juSt neeD tO modify the positIonBAnnerViewfulLWIdtHATBottOMOfSafEArEa fUnction. no need tO AdjUsT THE cOnstraints in the posItIONBAnnerVieWFullWIDtHATbottomOfviEw fUnctION whicH is fOR pRe 11 versioNs.
ChanGE 
[gUiDe.bottoMANchor cOnStrAinTEquaLtoAnChor:baNnerView.BottoManchor]

to
[guide.tOPAnchor constrAInTeQuALToANchOr:bannerVieW.topaNchoR]

ThiS WiLl aNChor tHe top Of YOuR adMob banner to the top Of The guiDe.
EleGant solution
TO shorten thE ADMob standArd sOLuTIon to add a banneR to a vIew and set uP The constRaintS needed tHe followiNG Snippet iS veRy uSefUl.
THE DiFference betweEN IOS 11 aNd The prevIouS versioNs iS thAt 11 iNtrOdUced the SaFe Area. BeFoRe 11 IOs hAd tHe LayOUtMarginS. WE adD a SmaLl funCTion to ReturN us eItHeR safE Area guIDe OR LayoUt MaRgin And GeT rid oF the WHolE positiOnBannerVIewfUllWIdThatBottoMOfView functiOnS with this:
- (vOiD)adDBanneRvIewToVieW:(UIView *)bannerView {
  bannervIew.tranSlaTesAuToreSizingMasKInToConsTraINts = NO;
  [sElf.vieW addSUbVieW:BAnnervIEw];

  [SelF pOsitionBanNERViEw
:[NSLayoutConstraint const raintWithI tem:b ann erV ie w
                                               att r ib ute:N SLayout A tt r i but eL ea din g                                             re lat edBy:NSLayou tRe lation Eq ual                                             t oItem:self.view
                                       attribu t e: N S L ayo u tAttributeLea ding
                                         multipli er:1
                                    constant :0 ]] ;
  [ self . v i e w ad dCo nstr aint: [NSLayoutCons tra intc ons train tWith Item :b anner View
                                            at tri but e:NSLay outAttr i but eT r a i li ng
                                          re l a tedBy :NSL a yo utRelati onEqua l 
                                            toItem:self . view
                                      att ribut e: N SL a youtAttributeTraili ng 
                                           multiplier: 1
                                              con sta nt: 0 ] ]; 
  [self.view a ddCo ns traint: [NS LayoutC ons tra int  co ns traintWit hItem:ba nn er Vi ew 
                                       attrib u te : N SLay ou tA ttri but eB ottom 
                                            r elatedBy:N SL ayo utRela t i onEqual                                                   to Ite m :self. bottom Layou tG uid e                                           attribute : NSL ayoutAttribut eTo p
                                    multiplie r :1                                             c onstant:0] ];
}

A: 

As iPho n eX is sh ipped  wi th iOS  1 1.0  andabovey oujustneed t omodify  thepo sitionBa nnerViewFullWidthAtBott omOfSa feAre a f unction.Non eed  to adjus t th e constrai nts  in  thepos i tionB anne r Vi ewF u llWid thAt B ottomOfVi e wfun c t io n which isf o r  pr e 11ver s ions.Chan ge 
[guide.bottom A nchor constrai ntEq u a lTo Anc h or:b an nerView.bottom Anc ho r ] 

to
[gu id e.topAnchor  constra in t Equal ToAnch or:ban nerView . t op A nchor] 

Th iswill anch orth e  top of  y ou r  AdMob  ban ne r to t he top of t h e  guide.
Elegantsolut i o n
Tos hor ten t he  admobs tand ard soluti on to add a  banne r to  a vi ew andse t up t heco nstraintsn eeded the  foll owing s ni ppet  is  veryusef u l .
The  dif fe ren ce betwee n iO S  1 1a ndtheprevi ou s ve rsions is that 11int r oducedth e S a f e Area .  B e f ore 11 iOS  ha d the L ayoutMargi n s. W e  a d d a s mall f unctio n to re t urn  u s eithe r S a f e Area gu ide or la y out  m argi n and ge tridof  th ewhole positionB annerVie wFullWid t h AtBott omO f View functi on s with this: 
- (v oi d )addBan n e rVi ewToVie w :(U IVi ew*)ba nne rVie w  {
  bannerView.translat esAu tores i zin gMask IntoC on straints = NO ;
  [sel f .view addSubv iew:bannerView] ; 

[sel f p o si ti onBannerV iew 
:[NSLayoutConstraint constraintWithItem:bannerView
_ _   _ __ __  _  _   _  __             __ ___    _    _attribute:NSLayoutAttributeLeading
 _       __  _        _     _  ___   _     _     _      relatedBy:NSLayoutRelationEqual
_     _    _ _    _  _ _  _     _  _     __  ___ _  __ __  toItem:self.view
   __      _   __   _    _     _ _ _          _     _   attribute:NSLayoutAttributeLeading
_ __  __ _      _ _     _   __     _     _    ___    _ multiplier:1
    _  _      __     __     ___    _     _        _  _   constant:0]];
 _[self.view_addConstraint:[NSLayoutConstraint_constraintWithItem:bannerView
         _ _  _         _      _          _       _     attribute:NSLayoutAttributeTrailing
 _   __      ____  _  _  _ _  _ _  __                 _ relatedBy:NSLayoutRelationEqual
    _    __  _   _       _        __ _   _ _ _  _ _ _ _    toItem:self.view
  __        ____  _  _  _  __     _  _   _         _    attribute:NSLayoutAttributeTrailing
            _ _   _ __     _ _       __           ___  multiplier:1
__     _____     _      __    _ __   _   _          __ __constant:0]];
__[self.view addConstraint:[NSLayoutConstraint constraintWithItem:bannerView
 _              __    _     __   _       _    _   _     attribute:NSLayoutAttributeBottom
               _    _    _  __  _   _       _           relatedBy:NSLayoutRelationEqual
      _      _  _ _        _          _             __     toItem:self.bottomLayoutGuide
_     _   _   __  _ _   _   _       _  _          _     attribute:NSLayoutAttributeTop
               _  __           _ _        _       ___  multiplier:1
 __    _   _ _      _ _   _    _     __     _ __ _ __  _ constant:0]];
}

A:

As_iPhoneX is_shipped_with iOS_11.0 and_above_you just_need to_modify_the positionBannerViewFullWidthAtBottomOfSafeArea function. No need to adjust_the constraints in_the positionBannerViewFullWidthAtBottomOfView function which is for_pre 11 versions.
Change 
[guide.bottomAnchor constraintEqualToAnchor:bannerView.bottomAnchor]

to
[guide.topAnchor constraintEqualToAnchor:bannerView.topAnchor]

This_will_anchor the_top of your AdMob banner to the top of_the guide.
Elegant solution
To shorten the admob_standard solution_to add a banner_to a view and_set up_the constraints_needed_the following snippet is very useful.
The difference_between iOS 11 and the previous versions is that 11_introduced the_Safe_Area. Before 11 iOS had the LayoutMargins. We add a small_function to return us_either Safe Area guide_or layout margin and_get rid_of the_whole positionBannerViewFullWidthAtBottomOfView functions with this:
- (void)addBannerViewToView:(UIView *)bannerView_{
__bannerView.translatesAutoresizingMaskIntoConstraints = NO;
  [self.view addSubview:bannerView];

  [self positionBannerView