Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift Package Manager support? #125

Closed
edenman opened this issue Jul 28, 2021 · 4 comments · Fixed by #161
Closed

Swift Package Manager support? #125

edenman opened this issue Jul 28, 2021 · 4 comments · Fixed by #161
Labels
enhancement Request for a new feature or improvement to an existing feature installer Issues related to the installation of the framework

Comments

@edenman
Copy link

edenman commented Jul 28, 2021

I want my iOS guys to start using this but all our dependencies are SPM. It would be rad if this was also available via Swift Package Manager. 🙏

@dfed
Copy link
Collaborator

dfed commented Jul 28, 2021

You're right! It would be great to support SPM. Kinda surprised we haven't gotten this ask before to be honest.

The tough bit is we'd need to fully separate our Swift and Objective-C code into separate packages, and we're somewhat mixed right now. All that to say that this is likely a couple days and we'd likely need a volunteer.

@NickEntin
Copy link
Collaborator

Agreed, it would be great to add SPM support!

I've been thinking about the mixed language problem, and I think there are a couple potential paths forward. Right now the split looks like this:

  • CoreAardvark: Almost entirely Objective-C, except for a couple of convenience methods.
  • Aardvark: Mixed Swift and Objective-C.
  • AardvarkLoggingUI: Entirely Objective-C.
  • AardvarkMailUI: Almost entirely Objective-C, except for one convenience method.

The most mixed module is Aardvark. If we land #126, we'll end up in a spot where we can split it into two frameworks (either only in SPM or for all package managers):

  • AardvarkScreenshotLogging: Methods for creating log messages with screenshots. Entirely Objective-C.
  • Aardvark: The core bug reporting primitives and basic attachment generators. Entirely Swift.

The tricky ones are CoreAardvark and AardvarkMailUI. They're both effectively Objective-C modules with a very small Swift layer (1-2 methods) to improve the API, primarily by adding default values to some parameters. The easy approach here is to omit the Swift methods, which would be a bit unfortunate since SPM is a Swift-focused package manager. We could also publish these methods as separate packages, but that feels kind of hacky to me. The much more involved approach is to rewrite the frameworks in Swift, but that's a pretty large body of work.

@dfed
Copy link
Collaborator

dfed commented Aug 4, 2021

We could also publish these methods as separate packages

This feels like a reasonable approach. If the Swift module depends on the Objective-C module (which it would), then Swift consumers could easily declare a dependency on the Swift module and then also get the Objective-C code for free.

@NickEntin NickEntin added enhancement Request for a new feature or improvement to an existing feature installer Issues related to the installation of the framework labels Nov 22, 2023
@luispadron
Copy link
Contributor

I'm adding SPM support over in #161

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request for a new feature or improvement to an existing feature installer Issues related to the installation of the framework
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants