Admob released new SDK v6.2.1, and for the past few days i've been trying to implement it without success. There is something wrong with google analytics addon main.m in the SDK:
Error 1: Stray '@' in program
Error 2: 'autoreleasepool' undeclared (first use in this function)
Error 3: Expected ';' before '{' token
main.m file:
//
// main.m
// CuteAnimals
//
// Copyright 2012 Google, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil,
NSStringFromClass([AppDelegate class]));
}
}
I have linked all the required librarys:
AudioToolbox.framework
MessageUI.framework
AVFoundation.framework
StoreKit.framework
iAd.framework
SystemConfiguration.framework
QuartzCore.framework
OpenGLES.framework
OpenAL.framework
UIKit.framework
Foundation.framework
CoreGraphics.framework
libGoogleAdMobAds.a
libGoogleAnalytics.a
libGoogleAnalytics_debug.a
I am not even Including or implementing the GAdbannerView yet. The project wont even compile with the SDK included. Whenever i remove the Add-ons folder, which includes (DoubleClick, GoogleAnalyticsiOS_2.0beta3, Mediation, Search), the project compiles.. But if i try implementing GADBannerView, (without addons folder), Mach-O linker error comes up for missing analytics addon file.
cocos2d v1.X
Xcode v4.5.2
Is there something I'm missing here?
* EDIT *
Seems I was including everything provided in the SDK download, which includes a sample project. After including only the GAD Classes, libGoogleAdMobAds.a, README.txt, and an additional library (AdSupport.framework), It compiles just fine. Hope that helps.