27

Running my app with the iOS6 simulator I am getting the following printed in the XCode console prior to viewDidLoad getting called:

Couldn't find default.styleproto in framework

Has anyone else encountered this, and if so have you found a reason why? My guess is that it has to do with the iOS6 Apple Maps, but who knows!

EDIT

I should add that I don't get this warning in the iOS 5.1 simulator.

abellina
  • 989
  • 1
  • 10
  • 27
  • 2
    i also have this: Couldn't find hybrid.styleproto in framework It might be related to the visual style of the map. But why? – João Nunes Sep 28 '12 at 15:49
  • Somehow when I added a button on top of the map I had this problem. I remove it and add it again the problem was gone. – huggie Feb 03 '13 at 13:55

7 Answers7

11

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!

abellina
  • 989
  • 1
  • 10
  • 27
  • But where can we find the .styleproto files ? – Stanley May 02 '13 at 03:01
  • In the folder I specified above. Can you find `iPhone Simulator` in your `~/Library/Application Support` folder? – abellina May 02 '13 at 14:47
  • Now I can find the Caches/GeoServices/Resources folder of the simulator. But there isn't any .styleproto files ... Please help. – Stanley May 02 '13 at 18:12
  • Hmm... why do you need these files? Anyway... I ran the build in Maps app and they showed up there. – abellina May 02 '13 at 18:23
  • The only file in my ~/GeoServices/Resources is attributionBadge-1.cn.png – Stanley May 02 '13 at 19:00
  • I just wish to get ride of the "Couldn't find default.styleproto in framework" warning. Otherwise the map seems to be behaving ok although I haven't added any coding to the map yet. – Stanley May 02 '13 at 19:02
  • hello abellina, i also faced the same error, and i am able to find those files also but my question is why we need to keep those files before run the project. Is there any other way to solve it ? because first i reset my simulator and then run my project... and it generate error but for the 2nd time ,, it runs... – Apple Aug 09 '13 at 10:26
2

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

matsoftware
  • 766
  • 6
  • 12
  • So you used to have prior to this a set width and height? My map isn't full screen. I also can't seem to replicate this anymore. – abellina Oct 08 '12 at 21:21
  • I set the mapview with flexible with, height and margin in interface builder, the classic UINavigationController + MKMapView – matsoftware Oct 09 '12 at 08:20
2

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...

fede256
  • 21
  • 3
  • I can't replicate this. I set the deployment target to 6.0 and run it in the 6.0 simulator, with autolayout, but that didn't cause the log message. – abellina Dec 10 '12 at 16:08
0

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

0

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

casillas
  • 14,727
  • 15
  • 94
  • 183
0

Shows User Location 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.

Harvester316
  • 371
  • 1
  • 6
  • 17
-1

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.

smoothdvd
  • 2,329
  • 4
  • 19
  • 25
  • Hmmm... I can't replicate this. I set it to none, and the only error I get is when the map can't find the user, not the styleproto error. I haven't seen this in a while. – abellina Oct 19 '12 at 15:45