Adding AdMob in iOS

Hello I am following this tutorial (https://plaincode.blogspot.com/2014/02/example-of-admob-integration-in-cocos2d.html?showComment=1544756045966#c1383276896825612963) and he implements this

- (void)dealloc {
    _bannerView.delegate = nil;
    [_bannerView release];
    [super dealloc];
}

I thought release and dealloc was only used when not using ARC and cocos2d-x projects use arc ? does anyone have an explanation for this ?

Why reinvent the wheel?
You can use sdkbox admob: http://docs.sdkbox.com/en/plugins/admob/v3-cpp/

:slight_smile:

2 Likes

I need it in objective-c because im using other networks that sdkbox doesnt support,
but do you know if cocos2d-x ios projects use ARC ? because I think that code is only needed if it uses ARC ?

Urgs, the closed source SDKBox. I can understand why somebody is reinventing the wheel. I wouldn’t recommend frameworks in top of ad providers, which can add more tracking without any knowledge of the users. The main problem is in the EU the GDPR, where you (as developer) hast to name all used data. The more complex it will be, the less it will be used.

But I know the wish to use SDKBox and other 3rd party libs, because it’s creating less headache while implementing - but also less knowledge of the underlaying system.

So everbody has to find the best solution for their needs. I’m just giving my two cents to this topic.

1 Like