Definitive answer to iAds integration?

I have a simple game that I want to use to practice submitting apps to the ios app store, the games I will be submitting with be free with iAds. I cant seem to find a definitive answer to how to implement iAds in xcode.

I have found these tutorials:

But then I am hearing that they are outdated and have errors.

Can anyone point me to an up to date solution for implementing iAds to a game made in Codea? I am using Xcode 5.1.1

Would be greatly appreciated!


PS. I have 2 apps on the app store with iAds implemented that I made with Gamesald, so I know how to do the provisioning profile, etc. for submitting. Its the xcode part for implementing iAds from a Codea project that I am confused about.

This is really helpful and I added some code in there that fixes landscape orientation as my app needed to be in portrait and landscape.

Thanks, still kind of confused about how it all works. I’ll try to wrap my head around this.