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

Cocoapods support #310

Closed
cuva opened this issue Nov 8, 2018 · 4 comments
Closed

Cocoapods support #310

cuva opened this issue Nov 8, 2018 · 4 comments

Comments

@cuva
Copy link
Contributor

cuva commented Nov 8, 2018

Hi,

First of all, thanks for the great library!

Would you be open in accepting a PR adding cocoapods support for Mozjpeg? Cocoapods is a dependency manager for iOS projects which would make the library's integration a no brainer and should only require adding a single file to the repo.

Thanks!

@cuva cuva changed the title Cocoapod support Cocoapods support Nov 8, 2018
@kornelski
Copy link
Member

kornelski commented Nov 9, 2018

How would that support look like?

The library has a C interface, but I guess a proper library for Cocoa should have an interface compatible with ObjC and/or Swift best practices.

If you'd like to implement a higher-level ObjC or Swift wrapper for libjpeg, that'd be great.

@cuva
Copy link
Contributor Author

cuva commented Nov 9, 2018

Thanks for your quick answer @kornelski.

Couldn't agree more. Since C is interoperable with Objective-C, I'd suggest first and foremost defining a mozjpeg pod to enable it being integrated through Cocoapods as-is.

As you've mentioned, It would then open the door for a higher-level Objective-C/Swift compatible framework that exposes idiomatic platform APIs depending on mozjpeg's C library through CP.

In practice, adding support for CP simply requires adding a .podspec file at the root of the repo. As the podspec contains the library's version number, running pod repo update when releasing a new version would be the only command required to push an updated version of the spec to their centralised spec repository.

I've got a working podspec locally - so happy to push a PR if that's ok with you and get into more details there!?

@kornelski
Copy link
Member

Yes, great! I'm happy to add a podspec.

@cuva
Copy link
Contributor Author

cuva commented Nov 14, 2018

It's live https://cocoapods.org/pods/mozjpeg !

One last thing - could I ask you to register on cocoapods trunk so we can have shared ownership of the pod? To do so, you'd simply have to do three things:

  • Install cocoapods: sudo gem install cocoapods
  • Register a trunk account: pod trunk register [email protected] 'First Last Name' --description='optional description'
  • Click on the link sent via email. Once done, let me know the email you've used to register and I'll add you as an owner!

FYI, when releasing a new update, the only required thing will be to update the version number / tag in the podspec and run from the root of the repo:

pod trunk push mozjpeg.podspec --allow-warnings

Cheers, Kornel!

@cuva cuva reopened this Nov 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants