7

I want to create with xCode a static library project that will be used by IOS and OSX applications. My wish is to have a single porject/target and 2 different build configurations, so when I want to build for IOS I'll pick one, and when I want to do it for OSX I'll pick the other.

My first guess was creating a macOS static library target and then add a build configuration for IOS (here you can find an explanation how), but I'm a bit afraid I'll miss some configuration options in the future.

Another option is to create a new target for IOS (Cocoa touch static library), which will use the same source files

I've also found an old article suggesting a different solution: "Static Libraries and Cross-Project References", but I'm not sure if it's still relevant because it's from 2009.

Do you have any suggestions/tips/experiences which are relevant for such an issue?

benams
  • 4,308
  • 9
  • 32
  • 74

0 Answers0