NimbleKit - fast iOS app development

Admob Integration

Forum for posting sample code and examples, new posts creation is not allowed, but everybody can comment

Re: Admob Integration

Postby sluggish » Fri Aug 06, 2010 2:46 am

sunny wrote:the sample code was updated :)


thanks sunny, it works but it returns me some warnings... :S
sluggish
NimbleKit Expert
 
Posts: 86
Joined: Fri Jan 08, 2010 4:18 am
Location: Madrid / Spain

Re: Admob Integration

Postby sunny » Fri Aug 06, 2010 10:06 am

those warnings are fine, it's just uses class interfaces which aren't defined in the project, but still they exist inside Nimblekit library
User avatar
sunny
Staff
 
Posts: 2666
Joined: Sat May 30, 2009 5:18 am
Location: Palo Alto, California

Re: Admob Integration

Postby bsoft » Mon Aug 09, 2010 9:23 pm

Thx for this update Sunny.
Could u just help (or somebody else ;) ) to explain how set the ads on bottom of screen?
bsoft
 
Posts: 107
Joined: Mon Jun 29, 2009 9:54 am

Re: Admob Integration

Postby raf69 » Wed Aug 11, 2010 3:36 pm

Hi,

Thx Sunny for this sample project ! So, I tried to include admob in my project, there are no errors but i've got this error in the console :

<AdMob> The AdMob SDK requires a valid view controller to be returned from currentViewController (AdMobDelegateProtocol). Cancelling ad request.

I included the folder admob and the two framework (admob.a and QuatezCore)... I put my publisher ID in the AdmobDelegateClass.m too... This is an iPhone/iPad project (is it this the problem ?)

I didn't edit nothing in those files. So, where is the mistake ?

Thx !
raf69
 
Posts: 17
Joined: Tue Jun 29, 2010 10:23 am

Re: Admob Integration

Postby sunny » Thu Aug 12, 2010 10:56 am

I'm not sure.. somewhere in obtaining current view controller, it's hard to say, can you send the sample project which keeps the actual navigation (all the view controllers, like navigation controllers, etc) must be same as in origin project.
It will be easy to fix if I have the example representing the problem.
User avatar
sunny
Staff
 
Posts: 2666
Joined: Sat May 30, 2009 5:18 am
Location: Palo Alto, California

Re: Admob Integration

Postby raf69 » Thu Aug 12, 2010 1:55 pm

Hi Sunny,

I sent you a sample project !

Thx
raf69
 
Posts: 17
Joined: Tue Jun 29, 2010 10:23 am

Re: Admob Integration

Postby sunny » Thu Aug 12, 2010 2:27 pm

you request ad too early, view controllers aren't created yet, try requesting ad in the end of your page, this has to help
User avatar
sunny
Staff
 
Posts: 2666
Joined: Sat May 30, 2009 5:18 am
Location: Palo Alto, California

Re: Admob Integration

Postby joanne » Fri Nov 12, 2010 9:18 am

dear sunny

i've got the same problem "<AdMob> The AdMob SDK requires a valid view controller to be returned from currentViewController (AdMobDelegateProtocol). Cancelling ad request."
I have put body onload="loadAD();" already, still got the above error. any hints?

thxxx

joanne
joanne
 
Posts: 27
Joined: Thu Nov 26, 2009 6:51 am

Re: Admob Integration

Postby joanne » Fri Nov 12, 2010 12:33 pm

hi sunny

i found out the problem is due to the NKNavigationController(). when i commented it out, the ad shows. Anything i can do to avoid the problem??

Cheers!

Joanne
joanne
 
Posts: 27
Joined: Thu Nov 26, 2009 6:51 am

Re: Admob Integration

Postby joanne » Mon Nov 15, 2010 5:30 am

for your reference, this is the code i used:

Code: Select all
<html>
<head>
<meta name = "viewport" content = "initial-scale = 1.0, user-scalable = no" />
<script type="text/javascript" src="NKit.js"></script>
<script>
var settings = new NKSettings();
var navController = new NKNavigationController();
navController.setTitle("testing");
navController.setStyle("default");
navController.setTintColor(0xFF, 0, 100);

NKRegisterClass("AdMobAdsController");
CallNKitAction("placeAdd?className=AdMobAdsController");
</script>
</head>
<body>
Testing


</body>
</html>
joanne
 
Posts: 27
Joined: Thu Nov 26, 2009 6:51 am

PreviousNext

Return to Sample Code

Who is online

Users browsing this forum: No registered users and 1 guest