Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/99.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Admob advance本地广告在后台获取?_Ios_Admob_Native Ads_Googlemobileads - Fatal编程技术网

Ios Admob advance本地广告在后台获取?

Ios Admob advance本地广告在后台获取?,ios,admob,native-ads,googlemobileads,Ios,Admob,Native Ads,Googlemobileads,加载admob广告会使应用程序启动非常缓慢,看起来admob使用的是运行在UI线程上的WKWebview 如果我在后台提取(提取数据而不显示它们)广告,并将它们保存在内存中,以便应用程序启动或进入前台时不会延迟,这样可以吗?有没有针对这一点的指导方针 我的用户通常每2-3小时访问一次该应用程序,因此该应用程序很有可能不会被终止,广告会保留在内存中以备将来使用 请参阅此声明注意:在主线程上对移动Ads SDK进行所有调用。 另请参阅此链接 请参阅此声明注意:在主线程上对移动Ads SDK进行所有

加载admob广告会使应用程序启动非常缓慢,看起来admob使用的是运行在UI线程上的WKWebview

如果我在后台提取(提取数据而不显示它们)广告,并将它们保存在内存中,以便应用程序启动或进入前台时不会延迟,这样可以吗?有没有针对这一点的指导方针

我的用户通常每2-3小时访问一次该应用程序,因此该应用程序很有可能不会被终止,广告会保留在内存中以备将来使用

请参阅此声明注意:在主线程上对移动Ads SDK进行所有调用。

另请参阅此链接

请参阅此声明注意:在主线程上对移动Ads SDK进行所有调用。

另请参阅此链接

Hi everyone,

Below are my responses to your concerns:

    I am having the same issue with my app, this MobileAds.initialize() method, when used as prescribed, is responsible for a huge part of my app startup time.  A median of 405ms and a p95 of 1.5 seconds.


It is important to note that initializing the SDK using the MobileAds.initialize() method is optional. Also, if you decided not to call this method, the SDK will be initialized automatically on your very first Ad request which might increase the Ads load time to a few milliseconds more, similar to what Minas have observed. That said, you should be able to load Ads with or without implementing the MobileAds.initialize() as it is mainly for the purpose of initializing the SDK ahead to decrease load time on the first Ad request.

     Is it safe to run the MobileAds.initialize() method on a background thread instead of running it on the main UI thread?


Please note that according to this guide, all calls to the Mobile Ads SDK such as the MobileAds.initialize() should be executed on the main thread and not in the background thread.

Regards,
Steven Balan
Mobile Ads SDK Team