Manage dependencies with CocoaPods #703

wants to merge 4 commits into


None yet

3 participants


Instead of having submodules and manually keeping track of dependencies for each Sharer, we should use CocoaPods. Each Sharer becomes a pod subspec with its own dependencies.

Integrating ShareKit into a project becomes as simple as adding this to the Podfile:

pod 'ShareKit/Facebook'
pod 'ShareKit/Twitter'

The included Podspec is based on the current Spec in but the repository needs to be tagged with the current version (2.2.1?) and the tag added to the Podspec.


Current version is always the last commit in master. I am not familiar with cocoa pods, though I admit I should learn more about it. I'd also like to make ShareKit cocoa pods friendly. So please forgive me these questions.

Sometimes (quite often actually) there are files added to share kit - either core files, or new sharers, sdks etc. If user adds share kit via subproject, all he needs to do is git pull, as everything is encapsulated within subproject. What needs to be done in this case with cocoa pods, on user's side and my side?

You "downgraded" ARC enabled SHKFile to manual. Is there a problem with pods unable to hadle both types of files? I plan to migrate ShareKit to ARC slowly, and there is no problem with current way doing this.

Is it impossible to support cocoa pods and current install way together? You have removed all current project settings.

Is it still possible to run the demo app after your changes?


When adding a new subproject you need to add a new subspec to the podspec file with any relevant dependencies. Then submit this new spec to CocoaPods. That's it.

Yeah, CocoaPods does not support per-file configuration: CocoaPods/CocoaPods#532 you either have all ARC or all non-ARC. Except for subspecs, those can have different ARC settings.

You can support both CocoaPods and current install. The only problem may be managing the dependencies because you have to make sure that the version linked in the submodule matches the version in the pod spec. It may be easier just have users download dependencies on their own if they don't want to use CocoaPods.

What do you mean I removed all project settings? I only removed settings that had no effect. And yes the demo project still runs fine.


I also think that adding cocoa pods support would be very handy, but using this as the only option to manage dependancies is probably not a good idea, since people who don't use cocoapods are left back hanging. I don't see why the submodules, build settings, etc. couldn't be left intact so that either a cocoapods based or submodule based integration would be possible.


Agree. I have added a 2.3 tag, and @orta made podspec for it, you can check. If there are some quirks and needed help from me, let me know. I wish cocoapods is working with ShareKit.

@VilemKurz VilemKurz closed this May 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment