MapKit (Swift 4) Xcode 9.2 - "无法从角落 4 插入法律归属"



我正在做一个与MAPKIT打交道的项目。我的问题是,当我运行该应用程序时,我会得到"无法从角落4插入法律归因"。错误。我可以采取什么解决方案来解决此问题?

错误:

我的应用程序屏幕:

我的错误与您完全相同 - 地图没有显示,我遇到了错误:

2018-08-25 09:59:17.324966-0400 PARSE Foursquare克隆[45537:42276733]无法从角落4

固定法律归因

2018-08-25 09:59:17.332612-0400 PARSE Foursquare Clone [45537:42276733]无法从Edge 9

插入尺度

原因是因为我没有设置代表,Mkmapviewdelegate和CllocationManagerDelegate。如果您感到困惑,这就是我要看的。设置这些设置后,地图开始出现。希望这会有所帮助!

import UIKit
import MapKit
import CoreLocation
class locationVC: UIViewController, MKMapViewDelegate, CLLocationManagerDelegate {

重新编辑info.plist文件。打开为 ->源代码以显示Info.plist的XML格式

您的Xcode错误消息可能会说" nslocationalwaysusagedescription"或" nslocationalwayswaysways and wheninusauseDescription"有问题。

将" nslocationalwaysusageSagedesscription"复制(或" nslocationalwayswaysways和wheninuseusagedescription"(中的错误控制台并粘贴到info.plist source文件。

保存info.plist并再次运行。

我这样做并解决了我的问题

最新更新