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

11,553

Solution 1

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!

Solution 2

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

Solution 3

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

Share:
11,553

Related videos on Youtube

abellina
Author by

abellina

Software Engineer in Urbana-Champaign. Interested in mobile, unit testing, multi threaded development, web, and arduino.

Updated on November 19, 2020

Comments

  • abellina
    abellina over 3 years

    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.

    • João Nunes
      João Nunes over 11 years
      i also have this: Couldn't find hybrid.styleproto in framework It might be related to the visual style of the map. But why?
    • huggie
      huggie over 11 years
      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.
  • abellina
    abellina over 11 years
    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.
  • matsoftware
    matsoftware over 11 years
    I set the mapview with flexible with, height and margin in interface builder, the classic UINavigationController + MKMapView
  • abellina
    abellina over 11 years
    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
    abellina over 11 years
    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.
  • Stanley
    Stanley about 11 years
    But where can we find the .styleproto files ?
  • abellina
    abellina about 11 years
    In the folder I specified above. Can you find iPhone Simulator in your ~/Library/Application Support folder?
  • Stanley
    Stanley about 11 years
    Now I can find the Caches/GeoServices/Resources folder of the simulator. But there isn't any .styleproto files ... Please help.
  • abellina
    abellina about 11 years
    Hmm... why do you need these files? Anyway... I ran the build in Maps app and they showed up there.
  • Stanley
    Stanley about 11 years
    The only file in my ~/GeoServices/Resources is attributionBadge-1.cn.png
  • Stanley
    Stanley about 11 years
    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.
  • Apple
    Apple almost 11 years
    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...