fpillet / NSLogger

A modern, flexible logging tool
Other
5k stars 573 forks source link

Support Swift Package Manager for Xcode 11 #283

Open MattGuerrette opened 5 years ago

MattGuerrette commented 5 years ago

Is it possible to implement support for installing using Swift Package Manager?

This could be quite useful now that starting with Xcode 11 there is first class support for spm in the IDE.

mRs- commented 4 years ago

That would be awesome!

mdyson commented 4 years ago

I started working on support for this here: https://github.com/mdyson/NSLogger/blob/spm-support/Package.swift

There are still some issues building though. One that I've run into so far is that there doesn't seem to be an easy way to properly disable ARC support (which is currently needed for this lib on the obj-c side) without adding the unsafe flag, which causes xcode to reject the package when imported. I'll play around with this a bit more on my free time and see if I can get it to work, the easy solution might be to migrate the project to use ARC and then tackle any other existing issues afterwards.

The big issue is getting the obj-c code to compile with swift pm, it is possible but makes this much more complex.

mRs- commented 4 years ago

maybe in the future we could simple add this as a pre-compiled binary?