Reputation: 188
I have a static library that depends on some of the Apple frameworks though when I include it as a target dependency I still need to add the frameworks it depends on to the application project. Is there some way to setup the project such that the dependencies only have to be specified in the static library target?
Upvotes: 4
Views: 510
Reputation: 8772
While I'm sure it is possible, you really don't want to do that. I'm not sure you'd be able to get accepted if you did that. The static library is linking against dynamic library, the symbols are not included in it like the .m files are. That is the whole point of dynamic libraries.
One solution is to use an xcconfig file.
In this scenario you create a sharable xcconfig file that accompanies the static library. Then in your application project you copy the xcconfig file and base your application configuration on it.
OTHER_LDFLAGS = $(SHARED_LDFLAGS) -framework AssetsLibrary -framework AudioToolbox ...
Upvotes: 2