Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

HELP! Codea 2.0 - iOS 7 issue for iADs code (iOS 5 no longer supported)

edited April 2014 in General Posts: 318

Hi,

so I use @Reefwing 's excellent code for iADs. Since I've updated to Codea 2.0 iOS 5 is no longer supported and so there's two lines of code that are depricated and so I can't compile ads properly.

These are:

frame.size = [ADBannerView sizeFromBannerContentSizeIdentifier: ADBannerContentSizeIdentifierPortrait];

and

_bannerView.requiredContentSizeIdentifiers = [NSSet setWithObject: ADBannerContentSizeIdentifierPortrait];

Its the ADBannerContentSizeIdentifier that is no longer working. If I comment out the two lines of code then the adds don't scale up properly on an iPAD.

Can anyone help?

Thanks,
Major

Tagged:

Comments

  • Posts: 563

    Hi @Majormorgan - yes this was deprecated in iOS 6.0. Banner views no longer use content size identifiers. Sorry to all those who have hit this. I am working on updating the tutes for Codea 2.0 and iOS 7.

    Apple now recommends that you drop all references to the currentContentSizeIdentifier and make your bannerView auto resize so that it takes up the width of the screen.

    You can move an add banner view by adjusting its frame.origin x and y properties. As per the above don't change the width and height.

    Replace the deprecated code with:

    [_bannerView setAutoresizingMask: UIViewAutoresizingFlexibleWidth];
    
  • Posts: 318

    Hi @reefwing you did an awesome job with the original tutorial so apple making changes ain't your fault. I'll give that code a go thanks! I look at the apple documentation and it's usually gobble dee gook to me. Thanks for the reply!

Sign In or Register to comment.