Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrating CocoaLumberjack into iOS Project via Drag-and-Drop

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 [email protected]: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.

like image 481
Henry F Avatar asked Sep 27 '22 17:09

Henry F


2 Answers

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

like image 97
Mike Avatar answered Oct 13 '22 00:10

Mike


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 [email protected]:CocoaLumberjack/CocoaLumberjack.git
rm -r CocoaLumberjack/.git/

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

like image 30
Brad The App Guy Avatar answered Oct 12 '22 23:10

Brad The App Guy