How to use a downloadable package from a static library?

I created the static library MyLib.a with its downloadable package MyLibBundle.bundle ", which contains all the necessary resources, such as my xcdatamodel and xibs .

Now I want to use this library in another project.

So, I included " MyLib.xcodeproject " in a new one, linked the library and set the search path for the headers.

But in the end, the application cannot find my main data file ( SIGABRT ).

Does anyone have a solution?

+5
source share
1 answer

We had the same problem. Here is the best way we have found so far:

  • drag and drop the lib.xcodeproject file into your project
  • create lib from your project using the correct scheme
  • expand the tree structure until you see the product created by the assembly
  • right click, select "show in finder", it should be in .. / DerivedData / Projec -HASH / Build / Products / etc ...
  • drag and drop the .bundle file into the project source code
  • set it relative to build products (right panel)

Now, in your main circuit, add the package as the build target in front of your application. Also, uncheck the box to parallelize and make sure that the package is above the application. This ensures that your package is created first and then your application is created.

, !

+3

All Articles