XCode 8:基本MKMapView导致警告。

时间:2021-04-06 19:15:02

In an XCode 8 Swift 3 project, I have a ViewController that contains nothing but a MKMapView. Whenever I segue to this ViewController, I get the following warning printout...

在XCode 8 Swift 3项目中,我有一个ViewController,它只包含一个MKMapView。每当我segue到这个ViewController时,我得到下面的警告打印输出…

MyProject[2141:497518] [LogMessageLogging] 6.1 <private>
Painter Z index: 1023 is too large (max 255)
Painter Z index: 1023 is too large (max 255)
Painter Z index: 1023 is too large (max 255)
Painter Z index: 1023 is too large (max 255)
Painter Z index: 1023 is too large (max 255)
Painter Z index: 1023 is too large (max 255)
ERROR /BuildRoot/Library/Caches/com.apple.xbs/Sources/VectorKit/VectorKit-1228.30.7.17.9/GeoGL/GeoGL/GLCoreContext.cpp 1763: InfoLog SolidRibbonShader:
ERROR /BuildRoot/Library/Caches/com.apple.xbs/Sources/VectorKit/VectorKit-1228.30.7.17.9/GeoGL/GeoGL/GLCoreContext.cpp 1764: WARNING: Output of vertex shader 'v_gradient' not read by fragment shader


Painter Z index: 1023 is too large (max 255)
Painter Z index: 1023 is too large (max 255)
Painter Z index: 1023 is too large (max 255)
Painter Z index: 1023 is too large (max 255)
Painter Z index: 1023 is too large (max 255)

I don't know why this happening nor how to resolve it. This is simply a ViewController with a map, nothing more, so I don't see why there are these problems.

我不知道为什么会发生这种事,也不知道如何解决。这只是一个带有地图的视图控制器,仅此而已,所以我不明白为什么会有这些问题。

3 个解决方案

#1


0  

I'm also facing the same issue in my app. But I noticed that this issue is related to MKMapType and Zooming the map i.e. Standard and Hybrid MKMapType shows this error when you set region of map view or zoom map view. I solved this by changing the MKMapType Standard to Satellite and this is happing only when app test on simulator but in real device there is no such kind of warning. Hope this will help you.

我在app中也遇到了同样的问题,但是我注意到这个问题与MKMapType和缩放地图有关,当你设置地图视图或缩放地图视图区域时,标准和混合MKMapType显示这个错误。我通过将MKMapType标准改为卫星来解决这个问题,只有在模拟器上的应用程序测试时才会发生这种情况,但在实际设备中并没有这样的警告。希望这对你有帮助。

Thanks

谢谢

#2


0  

Maybe you forget to write the "[self.manager requestAlwaysAuthorization];" this method is a method of CLLocationManager;

也许你忘了写“自我”。该方法是CLLocationManager的一种方法;

#3


0  

          let locManager = CLLocationManager()

Was getting the exact same warning/breakpoint which made my app stop. I am not 100 percent sure why but adding this after the creation of my locManager did the trick.

得到的警告/断点,使我的应用程序停止。我不是百分之百确定为什么,但是在我的locManager的创建完成之后添加这个。

         locationManager.requestAlwaysAuthorization()

Reason could be

原因可能是

  1. The locManager access to your location might have being denied at some point in time and you need to always ask so that another user has the chance of accepting.

    位置管理器访问您的位置可能在某个时间点被拒绝,您需要经常询问,以便另一个用户有机会接受。

  2. You never asked for it. If you ask once and the user accepts your map will always work fine.

    你从来没有要求过。如果你问一次,用户接受你的地图,将会一直很好。

You might have to restart your app. That's what I had to do.

你可能需要重新启动你的应用程序,这是我必须做的。

The other thing I noticed is that this message is related to your Phone Carrier being Private (In my case was none as I don't have a chip on my iphone). In the other hand when my carrier had a carrier(Sprint,etc) it worked. Still not sure why but hopefully this give you an starting point. But I believe the carrier has nothing to do with the location manager though.

我注意到的另一件事是,这条信息与你的手机运营商是私有的(在我的例子中,没有一个是我在iphone上没有芯片的)。另一方面,当我的运营商有一个运营商(Sprint等)时,它起作用了。还不知道为什么,希望这能给你们一个起点。但我相信这艘航母与位置经理无关。

#1


0  

I'm also facing the same issue in my app. But I noticed that this issue is related to MKMapType and Zooming the map i.e. Standard and Hybrid MKMapType shows this error when you set region of map view or zoom map view. I solved this by changing the MKMapType Standard to Satellite and this is happing only when app test on simulator but in real device there is no such kind of warning. Hope this will help you.

我在app中也遇到了同样的问题,但是我注意到这个问题与MKMapType和缩放地图有关,当你设置地图视图或缩放地图视图区域时,标准和混合MKMapType显示这个错误。我通过将MKMapType标准改为卫星来解决这个问题,只有在模拟器上的应用程序测试时才会发生这种情况,但在实际设备中并没有这样的警告。希望这对你有帮助。

Thanks

谢谢

#2


0  

Maybe you forget to write the "[self.manager requestAlwaysAuthorization];" this method is a method of CLLocationManager;

也许你忘了写“自我”。该方法是CLLocationManager的一种方法;

#3


0  

          let locManager = CLLocationManager()

Was getting the exact same warning/breakpoint which made my app stop. I am not 100 percent sure why but adding this after the creation of my locManager did the trick.

得到的警告/断点,使我的应用程序停止。我不是百分之百确定为什么,但是在我的locManager的创建完成之后添加这个。

         locationManager.requestAlwaysAuthorization()

Reason could be

原因可能是

  1. The locManager access to your location might have being denied at some point in time and you need to always ask so that another user has the chance of accepting.

    位置管理器访问您的位置可能在某个时间点被拒绝,您需要经常询问,以便另一个用户有机会接受。

  2. You never asked for it. If you ask once and the user accepts your map will always work fine.

    你从来没有要求过。如果你问一次,用户接受你的地图,将会一直很好。

You might have to restart your app. That's what I had to do.

你可能需要重新启动你的应用程序,这是我必须做的。

The other thing I noticed is that this message is related to your Phone Carrier being Private (In my case was none as I don't have a chip on my iphone). In the other hand when my carrier had a carrier(Sprint,etc) it worked. Still not sure why but hopefully this give you an starting point. But I believe the carrier has nothing to do with the location manager though.

我注意到的另一件事是,这条信息与你的手机运营商是私有的(在我的例子中,没有一个是我在iphone上没有芯片的)。另一方面,当我的运营商有一个运营商(Sprint等)时,它起作用了。还不知道为什么,希望这能给你们一个起点。但我相信这艘航母与位置经理无关。