jbenet / ios-ntp

SNTP implementation for iOS
http://code.google.com/p/ios-ntp/
MIT License
370 stars 112 forks source link

Commit CocoaPod to make it easier to integrate #17

Closed iwasrobbed closed 7 years ago

iwasrobbed commented 9 years ago

Hi there! Great project and thanks for the time you've spent on it over the years.

Have you considered adding a CocoaPod spec to the repo so people can very easily integrate it into their Xcode projects?

Integration would then be as simple as me adding pod 'ios-ntp' and then running pod install and it'd add it to Xcode and automatically pull in a stable/tested version of CocoaAsyncSocket pod from their repo as well so you wouldn't have to maintain that code in your own repo. This allows teams of people to all effortlessly have the same code and setup.

All you'd need to do is:

I've tweaked your project slightly to work with CocoaPods and added a podspec to our own repo for now (https://github.com/5ecret5tar/ios-ntp/commit/f1fee66993bcc1962543d6179ea6c75477bd040b) since we need the library today, but we would really appreciate you considering this.

Thanks!

gavineadie commented 9 years ago

Good idea. I've not used CocoaPods before, so give me a little time to figure it out.

iwasrobbed commented 9 years ago

If you need any help, please don't hesitate to ask! I've set it up on a number of open source projects now; the hardest part is the podspec which I've already created in that commit above, with you just needing to change the git path to your repo.

gavineadie commented 9 years ago

I've checked in what is probably OK but I'd appreciate your checking it. I've not tagged it yet in case I need to make any changes before I do that ..

iwasrobbed commented 9 years ago

Hey @gavineadie! Podspec looks good! You may want to make the other changes we had to make as well by moving the logging stuff into it's own class that you include rather than into a prefix header (*.pch) file (we were getting build issues since it couldn't find NTPLogging before).

Once you're ready, you can use that Cocoapods trunk tool (http://guides.cocoapods.org/making/getting-setup-with-trunk.html) to upload it to their central repository and it also lints the .podspec file for you. Just be sure to tag the commit with the version you specified in the podspec file and push that tag up to remote before running the trunk command or the lint will likely fail.

Let me know if you need any help testing once you upload it using trunk!

gavineadie commented 9 years ago

"You may want to make the other changes we had to make as well by moving the logging stuff into it's own class that you include rather than into a prefix header (*.pch) file"

.. I did most of that too, did I miss something? I'll review your repo again.

iwasrobbed commented 9 years ago

Oh sorry I completely missed that, @gavineadie ! Everything looks great then! You should be good to go w/ tagging the latest commit and pushing the podspec up to Cocoapods w/ trunk :)

adamn commented 9 years ago

I think all that's left here is taking over 'ios-ntp' on CocoaPods. That should just involve sending an email to the team.