Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add to CocoaPods #88

Open
mgrebenets opened this Issue · 10 comments

8 participants

@mgrebenets

Any plans to make XMPPFramework available through cocoapods.org?
I find it extremely useful and convenient, would be great to have XMPPFramework in pods too.
Thanks.

@robbiehanson
Owner

Good question. Most of my other open source projects are available through CocoaPods:

I didn't set any of this up myself. It was all via contributors.

I wonder if it would be difficult to add XMPPFramework. One possible source of difficulty is the XMPPFramework.h file...

The project comes with a "Sample_XMPPFramework.h" file, with instructions that it should be copied into your own project, renamed to "XMPPFramework.h", and then customized to meet the requirements of the project. This is a mandatory step, and various components within the framework will optionally interact with each other if the extensions are included. And they discover what's included by importing XMPPFramework.h.

Like I said, I'm not an expert on CocoaPods. So not sure if all this functionality is possible through the CocoaPods project yet. Would be really cool if this was possible.

Any CocoaPods experts out there?

@mborsten

I would suggest to leave out the Sample_XMPPFramework.h and XMPPFramework.h files and let the import the header files they need in their code. All header files are included in the Pods project, so users will only need to add them where they want to use them.

@subsymbolic

I've started working on the podspec at http://github.com/subsymbolic/Specs/blob/master/XMPPFramework/3.5/XMPPFramework.podspec.

I have the core XMPPFramework done and I'll hopefully get the extensions in sometime this week. It's still completely untested but as soon as I'm happy with it I'll send a pull request to the main Specs repo.

Regarding the XMPPFramework.h file, my current plan is to do as @mborsten suggested and omit it altogether.

@paulmelnikow

It sounds like Robbie is saying that XMPPFramework.h serves another purpose, which is to let the developer indicate which modules should be active, so that the active modules can #import that file and discover each other:

... various components within the framework will optionally interact with each other if the extensions are included. And they discover what's included by importing XMPPFramework.h.

@subsymbolic

@noa Yeah, it looks like XMPPFramework.h is used for component registration - which makes turning it into a pod a little challenging. I think the requirement for XMPPFramework.h will need to be replaced with some kind of dependency injection or registration service before it can be used as a Cocoa Pod.
...but this would be a big api breaking change, so I'll have a look to see if there's another way next time I've got some spare time.

@yosit

Did you find anyway around the "XMPPFramework.h" import, I'm creating a detailed podspec file for XMPPFramework and hit this issue. not sure it's the right thing to do in any github project (including a user customized file in the repository) as it makes it impossible to add as a submodule or as a pod.

@ObjColumnist
Collaborator

I don't think anybody has yet, would it be possible for CocoaPods to generate XMPPFramework.h with all the modules in it?

There isn't any issues with it being a submodule though, as you only have to add the files you want to your Xcode project and keep your XMPPFramework.h in the parent repo.

@yosit
@ObjColumnist
Collaborator

Short Answer is yes ... long answer is that it isn't maintained by us and it includes all extensions which might not be desired.

@hansaaaaa hansaaaaa referenced this issue in CocoaPods/Specs
Open

Pod specs which have circular dependencies #12819

5 of 7 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.