I created Universal App (single view) in Xcode. Because I want to have iAd
banner on every view I added this code to AppDelegate
file:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool
{
if var root = self.window?.rootViewController
{
let contentFrame = UIScreen.mainScreen().bounds
var _banner = ADBannerView(adType: ADAdType.Banner)
_banner.frame=CGRectMake(0, contentFrame.height - _banner.frame.height, _banner.frame.width, _banner.frame.height)
_banner.delegate = self
root.view.addSubview(_banner)
}
return true
}
On real iPhone (iOS 8) Everything works fine (banner appears on every view) but I'm getting this error:
<Error>: CGAffineTransformInvert: singular matrix.
If i try to run this app on Simulator (iOS 8) the behavior is the same. Everything works fine, i get the same error but moreover i get: *ADBannerView:
Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:):
Error Domain=ADErrorDomain Code=7 "The operation couldn’t be completed. Ad was unloaded from
this banner" UserInfo=0x7b83bf30 {ADInternalErrorCode=7, ADInternalErrorDomain=ADErrorDomain,
NSLocalizedFailureReason=Ad was unloaded from this banner}*
But I have delegate and I implemented didFailToReceiveAdWithError
. On real iPhone it works...
My question is how could I solve these two particular errors?