-
Notifications
You must be signed in to change notification settings - Fork 1.3k
iOS error: "Setup: loading style failed: no such file or directory" #852
Conversation
Here is the relative path for default style.json file. mapbox-gl-native/styles/styles/bright-v6.json If you do not have the styles submodule, do the following in your mapbox-gl-native directory. git submodule init |
Yes, I have all submodules and The library fails when calling |
I also have the same problem on android. |
Ok, will take a look at this. Lots of recent shuffling and using the bundled styles needs some attention, it seems. |
iOS error: "Setup: loading style failed: no such file or directory"
Please make sure your Git submodule are initialized @robipresotto. |
MacBook-Pro:mapbox-gl-native robipresotto$ git submodule status |
This issue still exists. It seems the commit only dealt with making sure the Git styles submodule was included. That wasn't the original issue: the |
@DavidChouinard Even if you incorporate #1012? I’m seeing Let’s continue the discussion in #1011, since this PR was for a very different issue. |
@DavidChouinard even with #1012, it’s going to be black unless you pass either a JSON stylesheet or a Mapbox access token. You need a token to get the default Bright style. |
@1ec5 Sorry for the delayed response. I rebuilt the latest version and things now work as expected. Thank you. |
I cloned the latest version of the repository (including submodules), ran
package_ios.sh
without errors, and addedHeaders/
,MapboxGL.bundle
andlibMapboxGL.a
to the appropriate build phases.The build compiles, but complains on startup that "loading style failed".
This issue has been discussed before for Android (#585, #719). Looking through the source, it seems that the library is looking for styles in "asset://styles/styles/". From the previous discussion, I'm not sure where
asset://
is on iOS (maybe MapboxGL.bundle? I confirm MapboxGL.bundle contains thestyles/
directory).How can this be fixed?