如何使用Admob的PhoneGap的插件与iOS [英] How to use Admob Phonegap plugin with iOS

查看:224
本文介绍了如何使用Admob的PhoneGap的插件与iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用这Admob的插件PhoneGap的运行在这样的iOS:

I'm using this Admob plugin for Phonegap running on iOS like this:

window.plugins.AdMob.createBanner({"siteId":"my-site-id"});
window.plugins.AdMob.loadBanner();
// move banner to make it appear
window.plugins.AdMob.moveBanner({"positionX":0,"positionY":410});

和它的实际工作。问题是,这是导致我的应用程序,以消耗大量的内存,并且该应用时,设备上根据苹果的崩溃报告,我从iTunesConnect得到粉碎。

And it's actually working. The problem is that this is causing my app to consume a lot memory, and the app to crush when on a device according to the Apple crash report I got from iTunesConnect.

你能帮助我了解如何使用这个插件?

Can you help me in understanding how to use this plugin?

谢谢!

推荐答案

您使用deletBanner:法哪儿了吗?我觉得有可能是内存泄漏有可能。该插件看起来像它会从它的父和为零的这出adBanner财产,但我认为这可能还需要:

Are you using the deletBanner: method anywhere? I think there may be a memory leak there possibly. The plugin looks like it removes the adBanner property from its superview and nil's it out, but I think it may need to also:

  • 代理 adBanner
  • 解除 adBanner (你可以看到什么保留的 adBanner 是数仔细检查这一点) 。我想的UIViewController的的dealloc 自动调用 removeFromSuperView :但 deleteBanner :可能会那样做?
  • Set the delegate for adBanner to nil
  • Release the adBanner (you can double-check this by seeing what the retain count of the adBanner is). I think UIViewController's dealloc automatically calls removeFromSuperView: but deleteBanner: probably wouldn't do that?

这篇关于如何使用Admob的PhoneGap的插件与iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆