i'm trying to put iAd into my unity 1.7 basic game
all my forum searches yeild that there's a plug in for unity 3, but i want to get iad running on my game in the curent stable release of 1.7.
i'm trying to follow the instructions in the iAd programming guide by apple and i don't really understand objc and whats' goign on enough to do it.
there's something about attaching it to a view
when i try to put the code in the AppController :
ADBannerView *adView = [[ADBannerView alloc] initWithFrame:CGRectZero];
adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
i get a compile error:
2.6.1/Classes/../../Assets/Editor/OpenFeint/Xcode/AppController+OpenFeint.mm:658: error: request for member 'view' in 'self', which is of non-class type 'AppController*'
can anyone help? does anyone have a running code for 1.7 basic that they can share?
Condition is getting no error message after installation (buid->append) and patching!
In my case OF was installed before and was running good.
If you are working with OF and the iAd Plugin in Unity... a easy solution to run OF and iAd you can do following steps:
-Uncomment in AppController.mm the header file like this:
-Uncomment in AppController.mm Function applicationDidFinishLaunching:(UIApplication*)application like this:
printf_console("-> applicationDidFinishLaunching() AppController.mm
//adViewController = [[InGameAdViewController alloc] init];
//adViewController.appController = self;
//UIWindow *keyWindow = [[UIApplication sharedApplication] keyWindow];
-Copy the uncommented 5 lines above
-Go to AppController+OpenFeint.mm and import the header file like this:
-Go to Function didFinishLaunchingWithOptions (in AppController+OpenFeint.mm)
-Paste the copied lines before and it should run
In my case it works now
My Software: OF2.6 | Unity iPhone Prof 1.7 | iAd Plugin 1.6.1 | Base SDK 4.1 | Targeting 3.2
Attention, i think it don`t work on iPad, there come a error, so if you design for both devices you must weak against the framework iAd.framework
Hope it helps anybody!!!