Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

iphone Admob onclick problem

$
0
0

Hi all, Am working on RSS reader app for iphone where am using admob module. Am able to see the banner in all the pages.When i click on the banner in itemList page its working fine but in the description page/Inner pages its not linking to the ad url and am getting a warning like...

"Warning: Attempt to present <GADBrowserController: 0x12354ab0> on <TiRootViewController: 0xac61b00> whose view is not in the window hierarchy!"
Please help me to resolve this issue.Thanks in advance.

Below is the admob code

var Admob = require('ti.admob');
 
function admob_ban() {
 
    var ad = Admob.createView({
        top : 0,
        left : 0,
        width : 320,
        height : 50,
        publisherId : 'DFP Publisher ID ', 
        adBackgroundColor : 'black',
        testing : false,
        dateOfBirth : new Date(1985, 10, 1, 12, 1, 1),
        gender : 'male',
        keywords : ''
    });
    // ad.addEventListener('didReceiveAd', function() {
    // alert('Did receive ad!');
    // });
 
    return ad;
}
This is the place where am adding module to Description page
var window = Ti.UI.createWindow({
                            barColor : '#F5F5F5',
                            backgroundColor : "#fff"
                        });
                        var admobView = admob_ban();
                        window.add(admobView);
 
                        var scroll = Ti.UI.createScrollView({
                            backgroundColor : '#fff',
                            top : 60,
                            width : Ti.UI.FILL,
                            height : Ti.UI.FILL,
                            layout : 'vertical'
                        });
                        window.add(scroll);

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>