Adding a subproject makes it easier to make changes to your subproject, and then see those changes instantly reflected in the parent project. To add a subproject, you subproject must first be a static library (unless it’s an app extension).
But once you’ve got a static library subproject, here’s how you add it.
Drag the subproject in via finder
Then select the Main project -> MainApp Target -> Build Phases -> Target Dependency
Then add the Link Binary with Libraries
If you have setup your staticlibrary like I explained here you now need to tell the main project where it can find the public header.
Under Build Settings search for User Header Search Paths and add $(CONFIGURATION_BUILD_DIR) (non-recursive)
With that done, you should now be able to import the static library header and use it in your main app.
Links that help