-
-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add the MapBox iOS framework with source code as an Xcode target to my project instead of a precompiled binary #578
Comments
Huff the documentation is really something we would like to improve. @Ernest0-Production if you find out any good steps, please share them here and if possible, open a pull request to update the readmes. Thanks! |
@wipfli In theory everything should have worked, but for some reason the dynamic target build crashes with an error:
I don't understand much about it, but I decided for the sake of interest to compare what parameters Ld is called with in
And noticed that when building from my workspace, the xcode tries link MapBox.framework which is in DerivedData, while in demo workspac MapBox.framework is in
I can't figure out what I'm missing |
I think, If that doesn't work, try the following:
|
@ankb9x Hi! Thanks for the tip. Haven't tried your solution yet, but managed to look at the current
While all the
After which I realized that it turns out that the default Derived Data path in
In other words, when compiling static project libraries from 🤔 However, all this research has not given me an explanation as to why the
😬 I'm not good at manual targeting and linking processes, but from what I've been able to find, I can't put the puzzle together yet. |
I think,
|
I try to add But when I replace on But I still do not understand why it worked, since the resulting path is the same for them 🙂
I checked several times. These are indeed the same values, but for some reason |
I don't know why you got the error. |
No, I must have misled you. I was adding ios and MapLibre xcproj to MY workspace, which was located in a directory other than ios workspace |
This isn't much different, it's just different config. |
I can't agree with that. A similar problem was reproduced in ios workspace when I tried to archive the dynamic target. (build is ok) From what I understand, when building the target, all the compilation products in the ios workspace are transferred to the build/ios directory, including the 'dynamic' Framework and its dependencies static libraries. This makes the project build sensitive and implicit! And I just added this field to the build settings of the dynamic target . And it fixed both:
Just adding this line in build settings of dynamic target will fix all problems:
|
But I found another problem that could not be solved. The make xcframework command crashes with the error that the directory with the dSYMs file is empty - and it really is 🤔 I tried manually archiving the dynamic target from ios workspace and the resulting xcarchive has a really empty dsyms folder. At the same time, with a simple build in build/ios/ dsyms is created. I have not been able to find the cause of the problem yet, but this prevents me from building xcframework with debug symbols I also decided to try to build xcframework with SYMBOLS=NO and he also swore at the lack of a debug symbols, which was strange -_- I will try to do PR with this fix, but it makes sense to do this only after the reason is found why the assembly with debugging symbols does not work. Library integration has never taken so much time and effort from me before 😅 |
Thanks a lot for sharing your insights @Ernest0-Production. I think this will help others in the future... |
We have completely overhauled the iOS build setup. Please see the note at the bottom of this comment. Feel free to create a new issue if you run into any problems. |
Hi! 👋
I'm trying to figure out how to connect the library manually to my project.
I was planning to make a fork of MapLibre and connect it as a sub-module to my application and then add it as a target in the Xcode project.
But after reading INSTALL.md and DEVELOPING.md I still don't understand how to do it.:
According to the instructions
make iframework
creates an already compiled product MapBox.framework.The command
make iproj
created a separate Xcode ProjectMapLibre GL Narive
and then in the case of the application creates a Frameworkdynamic
, which apparently I need. But how to properly export or generate it in your project - I found no instructions.The text was updated successfully, but these errors were encountered: