swift – 使用Xcode 9在iOS 11上发布Google maps API

swift – 使用Xcode 9在iOS 11上发布Google maps API,第1张

概述我正在尝试在我的应用程序中的视图中设置地图,我遇到了这个问题: CoreData:注释:无法在路径’/var/containers/Bundle/Application/35C61A40-48B9-40E0-A6F9-AB7492A15009/simply-convertor.app/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.omo’中加载优化模 我正在尝试在我的应用程序中的视图中设置地图,我遇到了这个问题:

CoreData:注释:无法在路径’/var/containers/Bundle/Application/35C61A40-48B9-40E0-A6F9-AB7492A15009/simply-convertor.app/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.omo’中加载优化模型
CoreData:注释:无法在路径’/var/containers/Bundle/Application/35C61A40-48B9-40E0-A6F9-AB7492A15009/simply-convertor.app/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.omo’中加载优化模型
CoreData:注释:无法在路径’/var/containers/Bundle/Application/35C61A40-48B9-40E0-A6F9-AB7492A15009/simply-convertor.app/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.omo’中加载优化模型

我向VIEwContoroller添加一个空视图,并将其类型更改为GMSMapVIEw.
在vIEwDIDLoad方法中,我从location创建一个新的map并初始化我的主mapVIEw:

overrIDe func vIEwDIDLoad() {        super.vIEwDIDLoad()        placesClIEnt = GMSPlacesClIEnt.shared()        locationManager.delegate = self        locationManager.desiredAccuracy = kCLLocationAccuracyBest        locationManager.requestWhenInUseAuthorization()        locationManager.startMonitoringSignificantLocationChanges()        locationAuthStatus()        print(location.coordinate.latitude,location.coordinate.longitude)        let camera = GMSCamera@R_404_4612@.camera(withLatitude: 31.9650070083707,longitude: 34.7899029677496,zoom: 6.0)        let map = GMSMapVIEw.map(withFrame: CGRect.zero,camera: camera)        self.mapVIEw = map        // Creates a marker in the center of the map.        let marker = GMSMarker()        marker.@R_404_4612@ = CLLocationCoordinate2D(latitude: 31.9650070083707,longitude: 34.7899029677496)        marker.Title = "Home"        marker.snippet = "Home"        marker.map = mapVIEw    }

问题是什么?

解决方法 我发现我的问题..似乎我误解了GMSMapVIEw的初始化并且没有正确初始化它.

从其他帖子我提到的CoreData错误是Google的API问题,它不会影响应用程序.

总结

以上是内存溢出为你收集整理的swift – 使用Xcode 9在iOS 11上发布Google maps API全部内容,希望文章能够帮你解决swift – 使用Xcode 9在iOS 11上发布Google maps API所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1055658.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-25
下一篇2022-05-25

发表评论

登录后才能评论

评论列表(0条)

    保存