捕捉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.