OGeek|极客世界-中国程序员成长平台

标题: ios - 捕获 googlemaps for ios 的异常 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 06:57
标题: ios - 捕获 googlemaps for ios 的异常

我正在使用 Google map 进行反向 GEO 编码。

当我手动终止应用程序时,我得到了“崩溃”:

-[GMSAsyncInitServices sharedInitWithSync:]
Background execution would crash in this scenario

google的解决方法是:

You can catch this exception, and attempt re-initialize GMSServices once you have come to the foreground.

https://code.google.com/p/gmaps-api-issues/issues/detail?id=7716

我没问题,反正代码快要死了。问题是我在框架中的任何地方都找不到 GMSBackgroundAppException (我需要它所在的 h 文件才能捕获它)



Best Answer-推荐答案


Here's the bug report for this on Google's forums.

GMSBackgroundAppException 不是公开的,也无法被捕获,正如您所发现的。我建议遵循该线程中给出的关于在进入后台时对 map View 进行快照的建议,这可能会首先避免这个问题。

关于ios - 捕获 googlemaps for ios 的异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30014281/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4