Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.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版谷歌地图的异常_Ios_Google Maps_Google Maps Sdk Ios - Fatal编程技术网

捕捉ios版谷歌地图的异常

捕捉ios版谷歌地图的异常,ios,google-maps,google-maps-sdk-ios,Ios,Google Maps,Google Maps Sdk Ios,我正在使用谷歌地图进行反向地理编码 当我手动关闭应用程序时,会出现“崩溃”: 谷歌的解决方案是: You can catch this exception, and attempt re-initialize GMSServices once you have come to the foreground. 我做这件事没问题,反正代码也快死了。问题是我在框架中的任何地方都找不到GMSBackgroundAppException(我需要一个它驻留的h文件来捕获它) GMSBackgroundA

我正在使用谷歌地图进行反向地理编码

当我手动关闭应用程序时,会出现“崩溃”:

谷歌的解决方案是:

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

我做这件事没问题,反正代码也快死了。问题是我在框架中的任何地方都找不到
GMSBackgroundAppException
(我需要一个它驻留的h文件来捕获它)


GMSBackgroundAppException
不是公共的,您已经发现,它不能被捕获。我建议遵循该帖子中给出的关于在地图视图进入后台时对其进行快照的建议,这可能会从一开始就避免这个问题。

是的。。。但问题是我没有地图视图。我在
appdelegate
上运行
[GMSServices provideAPIKey:XXX]
,然后只需使用
[[GMSGeocoder geocoder]reversegeocodecoration:self.location completionHandler:^(GMSReverseGeocodeResponse*response,NSError*error){
没有要快照的对象…哈!在这种情况下,听起来他们的后台检查太激进了,你应该将其报告为bug。
You can catch this exception, and attempt re-initialize GMSServices once you have come to the foreground.