4

I'm trying to integrate CocoaLumberjack into my iOS project by dragging-and-dropping the Lumberjack.Xcode file into my project. That works fine, but now my project has 9 new targets. I don't need all of that overhead. So my question is, how do I cut down on the number of targets to just the needed stuff for iOS?

It seems every time I drag over only the mobile project that it is missing needed files. Upon my research, it seems that there are no up-to-date tutorials related to integrating Lumberjack specifically to iOS, which seems like a tool that would be commonly used so that is odd. Being new to all of this, it is troublesome and I would love some help.

Other information: I'm doing a manual installation since Cocoapods is not an option for me. I am following their Installation Guide: Installation Guide

The very first line in the manual installation guide is

git submodule add git@github.com:CocoaLumberjack/CocoaLumberjack.git

I do not want to add yet another submodule to my project, so I'm dragging and dropping Lumberjack.Xcode into my project.

oguz ismail
  • 1
  • 16
  • 47
  • 69
Henry F
  • 4,960
  • 11
  • 55
  • 98
  • Before I learned how to use cocoapods, I'd just copy all of the .h and .m files into my project, ensuring they're added to the correct target. The only issue you have to make sure to avoid is missing one or more files. Not 100% sure with CocoaLumberjack, but I'd look at just adding everything from here: https://github.com/CocoaLumberjack/CocoaLumberjack/tree/master/Classes – Mike Jun 04 '15 at 02:07
  • Just curious why Cocoapods is not an option for you. – Juan Catalan Jun 05 '15 at 15:06
  • 1
    @Mike If you add that as an answer I'll award the bounty to you. – Henry F Jun 15 '15 at 02:47
  • My final solution was using Mike's answer: To drag and drop specifically the "Classes" folder found in the CocoaLumberjack-master folder into my project. From there, I was able to fully utilize the Cocoa Lumberjack library by importing the headers. This is the way to do it with no new targets, no submodules and no needless overhead. Thank you to everyone for your input. – Henry F Jun 15 '15 at 15:12

3 Answers3

2

Instead of adding it as a submodule, you can simply clone the repo and add it to your project. The rest of the instructions remain the same. So replace the line you quoted above with:

git clone git@github.com:CocoaLumberjack/CocoaLumberjack.git
rm -r CocoaLumberjack/.git/

Then follow the rest of the instructions in the install guide.

Jasper
  • 7,031
  • 3
  • 35
  • 43
Brad The App Guy
  • 16,255
  • 2
  • 41
  • 60
2

Before I learned how to use CocoaPods, I used to just clone the repo and copy all of the .h and .m files into my project, ensuring they're added to the correct target.

The only issue you have to make sure to avoid is missing one or more files. Not 100% sure with CocoaLumberjack, but I'd look at just adding everything from here:

https://github.com/CocoaLumberjack/CocoaLumberjack/tree/master/Classes

Mike
  • 9,765
  • 5
  • 34
  • 59
0

Instructions from CocoaLumberJack

https://github.com/CocoaLumberjack/CocoaLumberjack/blob/master/Documentation/GettingStarted.md

k-thorat
  • 4,873
  • 1
  • 27
  • 36