iOS6 Simulator MKMapKit “Couldn't find default.styleproto in framework”

荒凉一梦 提交于 2019-11-28 06:48:32

I found a way to consistently reproduce this.

First, the culprit is a set of files in the Cache folder for your simulator. Go to your Application Support folder for the iPhone Simulator:

~/Library/Application Support/iPhone Simulator/[6.0 and above]/Library

Then look inside of your Caches/GeoServices/Resources

You'll see some .styleproto files in there. These files are only created when MapKit is first used in a simulator. It may also happen on the device, but I haven't confirmed it.

If you want to test this, make sure you have the .styleproto files, then re-launch your app, and you won't see the warning again when accessing the maps.

Remove the GeoServices cache folder, quit and restart the simulator (and your app), and there is the warning!

I solved by adjusting the MKMapView in my view controller to iPhone 5 new size, now I got no warning message.

mmm...I had de same problem...I think the problem could be the 6.0 Simulator; if I set the Deployment Target to 5.1 and run the app using the 5.1 Simulator and uncheck the Autolayout check-box, I didn't have any problem, but if I use the 6.0 Simulator when I run the app, the map doesn't appear, and the message "Couldn't find default.styleproto in framework" is printed in Xcode console...

Please set your GPS settings active otherwise this error may occur again. Also,it is advisable to set the frame for the iPhone 5 .

I just turned on my wireless on device and this warning disappear and my map comes visible.

This is old, but for anyone who comes across this thread like I did, it may also be that the option "Shows User Location" on the map view object was not checked. This was my issue and not about cache above, although I got the exact same error in console. I didn't even try the cache fix from the answer above, all I did was check that option and voila.

If your iOS simulator's GPS setting is none, you will get this waring. Just change iOS simulator's GPS setting to "Apple Stores" or other, it will gone.

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