iOS SDK 6.15.0 Updates for Banners

ironSource iOS SDK 6.15.0 was recently launched, containing improvements to Xcode build requirements. Following these changes, existing integrations for Banners of earlier SDK versions are outdated. Follow the steps below, to make sure your applications are ready to go with our new SDK versions. 

What has changed? 

As part of ironSource efforts to remove Xcode build restrictions, and allow publishers to build their iOS projects both on Xcode 11 and older Xcode versions, Safe Area management is no longer provided as part of ironSource SDK.

Safe area refers to the layout guides, that defines the allowed position views in iOS applications. It makes sure that your application will not cover any ancestor views, including navigation and tab bars. 

Who is affected? 

The change is relevant if you are using the iOS Native SDK version earlier than 6.15.0, and banners are  implemented. 

What should be done? 

Add Safe Area code to your bannerDidLoad method

- (void)bannerDidLoad:(ISBannerView *)bannerView {
   NSLog(@"%s",__PRETTY_FUNCTION__);
   dispatch_async(dispatch_get_main_queue(), ^{
       self.bannerView = bannerView;
       if (@available(iOS 11.0, *)) {
           [self.bannerView setCenter:CGPointMake(self.view.center.x,self.view.frame.size.height - (self.bannerView.frame.size.height/2.0) - self.view.safeAreaInsets.bottom)]; // safeAreaInsets is available from iOS 11.0
       } else {
           [self.bannerView setCenter:CGPointMake(self.view.center.x,self.view.frame.size.height - (self.bannerView.frame.size.height/2.0))];
       }
       [self.view addSubview:self.bannerView];
   });
}