Problem creating a project link for Xcode 4

I am trying to find the best code organization methods. Over time, I developed a set of utility-type files that I import into all of my iOS projects. Instead of continuing to copy them, I want to set up a separate β€œLibrary” project that creates these files in a static library. Then I reference the static library in my application project.

In Xcode 4.2, I created a new "JTLibrary" project with a static library as the target, added some files, and built as expected.

Now I have created a new project, "LibraryTest", which should behave like any other application project that I could work on. I realized that I would need to drag the JTLibrary project into this project in order to create a link to the cross project. Once this is done, I will link the LibraryTest binary to the static library from JTLibrary.

However, when I drag the JTLibary project into the LibraryTest project, it cannot expand. I expected that I could see the files in it, etc. See screenshot below:

enter image description here

Can someone make it clear why the project looks like this rather than expanding? Once it expands, I should see a static library in the application project.

Thanks!

EDIT 11/7

It is worth noting that now I am working with a VERY main project. In the new project window, select β€œFrame and Library β†’ Cocoa. Touch the static library.” Add one function to the default class and build.

I can copy the header and .a files to another project and use them successfully, but if I try to drag the project itself, it will appear as the image above.

+6
source share
1 answer

To create a subproject, simply drag and drop the node project from the Finder into Xcode.

DO NOT open two instances of Xcode and drag the node project from one to the other (why this subproject is not expanding).

+7
source

Source: https://habr.com/ru/post/900971/


All Articles