Crash when loading iAds
I've got the following code running to create and iAds AdView:
if (parseFloat(Ti.Platform.version) >= 4.0) {
var adView = Ti.UI.iOS.createAdView({
width: 'auto',
height: 'auto',
top: -100,
borderColor: '#000000',
backgroundColor: '#000000'
});
win.add(adView);
}
I'm getting the following error:
Result of expression 'Ti.UI.iOS.createAdView' [undefined] is not a function'...
It doesn't happen all the time though, sometimes I see the test ad as expected.
Any ideas on why this is happening? I'm checking for the right iOS version. (In fact, isn't iAds supported in 3.2?)
3 Answers
-
Delete the build folder and it should work! Solved the problem for me!
-
iOS/Ti SDK?
-
Deleting the BUILD folder and then rebuilding worked for me as well.