MapKit (Swift 4) Xcode 9.2 - 'Could not inset legal attribution from corner 4'

帅比萌擦擦* 提交于 2019-12-10 20:22:46

问题


I'm doing a project that deals with a MapKit. My issue is when I run the app, I get the 'Could not inset legal attribution from corner 4.' error. What solution can I take to resolve this issue?

error:

My app screen:


回答1:


I had the exact same error as you - the map was not showing up and I was getting the error:

2018-08-25 09:59:17.324966-0400 Parse Foursquare Clone[45537:42276733] Could not inset legal attribution from corner 4

2018-08-25 09:59:17.332612-0400 Parse Foursquare Clone[45537:42276733] Could not inset scale from edge 9

The reason is because I did not setup the delegates, MKMapViewDelegate and CLLocationManagerDelegate. Here is what I'm looking at in case you're confused. Once I set these up, the map started appearing. Hope this helps!

import UIKit
import MapKit
import CoreLocation

class locationVC: UIViewController, MKMapViewDelegate, CLLocationManagerDelegate {



回答2:


Re-edit the info.plist file. Open As -> Source Code To show the XML format of info.plist

Your xCode error message may say the the "NSLocationAlwaysUsageDescription" or "NSLocationAlwaysAndWhenInUseUsageDescription" has problem.

COPY the "NSLocationAlwaysUsageDescription" (or "NSLocationAlwaysAndWhenInUseUsageDescription") in error console and PASTE to the info.plist source file.

Save the info.plist and run it again.

I do it this way and resolved my problem



来源:https://stackoverflow.com/questions/48734831/mapkit-swift-4-xcode-9-2-could-not-inset-legal-attribution-from-corner-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!