1

We are using CocoaLumberjack library for logging. In our project we have written various static libraries. Now problem is we want to use logging in almost every library, including main application.

In each library we need to add Lumberjack library (we have added files and make it .a). I am not able to understand how to avoid to import lib in every project.

If I use .a in one of the library, shouldn't it already resolved dependancy for main application and other libs as well?

oguz ismail
  • 1
  • 16
  • 47
  • 69
Pranit Kothari
  • 9,721
  • 10
  • 61
  • 137

1 Answers1

1

If I understand you correctly, you have to grab Lumberjack library to the project just once and then add it to targets in inspector. enter image description here

dvor
  • 86
  • 1
  • 4
  • +1. Sounds good. I think I need to change way I build my projects. I create different projects for library. – Pranit Kothari Jun 27 '14 at 09:14
  • I might be misunderstanding but don't your libraries depend on Lumberjack? ie: if you were to use a library outside your main project it would this approach would not work unless you link lumberjack to the OTHER project you are using your static library in? – cream-corn Jun 30 '14 at 06:38
  • sorry for spam, but cocoapods solves this problem rather elegantly. [private pods](http://guides.cocoapods.org/making/private-cocoapods.html) and [creating a podspec](http://guides.cocoapods.org/making/making-a-cocoapod.html) – cream-corn Jun 30 '14 at 06:43