Note that there are some explanatory texts on larger screens.

plurals
  1. POStatic Library added as sub-project vs static library added as target
    text
    copied!<p>First of all I'd like to say that I'm pretty new to this topic so I'm a bit confused on some general aspects of how it works. Basically I'm working on an iOS project which has two targets, one is the app itself which I'm developing and it is a front-end iOS client, one is a static library which the former developer used to define classes belonging to a back-end framework.</p> <p>Both the files of the app itself (the client I'm working on) and the static library (the back-end framework) are in the same xcode project bundle. Even If I've never done the "setup procedure" of the static library anything seems to be working just fine on compilation.</p> <p>Now the question is: I'm setting up unit tests because I'd like to start developing new features adopting a Test Driven Development approach, so one of the things I was struggling on was if I had to generate or not two separate test targets, one for the iOS app and one for the static library (since they're two separate targets), ore use one single test target for both the static library and the iOS App. So, reading on the internet to find a solution I discovered that, as even Apple suggests <a href="https://developer.apple.com/library/ios/technotes/iOSStaticLibraries/Articles/creating.html" rel="nofollow">here</a> , a common approach is to add the static library as a "sub-project" of the app project.</p> <p>I'm just asking myself why and what is the difference with my current situation (one project, to targets, one of it is the static library). Are there any drawbacks? Should I reorganize the whole project?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload