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

OCMock with Swift Package Manager #416

Closed
wants to merge 3 commits into from

Conversation

ajpallares
Copy link
Contributor

Fixes #335.

Note that because OCMock contains unsafeOptions, the dependency of OCMock has to be specified by a commit hash (see erikdoe/ocmock#460 (comment)).

Copy link
Collaborator

@MatyasKriz MatyasKriz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm mostly new to SPM and curious as to how it works, so please excuse my questions if they seem too stupid. As for the #if directives, those seem a bit painful for me, especially as I expect to not get a feedback that I forgot one until after I try to do some SPM work, correct?

However, I do appreciate the PR and want to add support for SPM, I wouldn't want to block anyone from switching to their dependency manager of choice. Thanks for tackling this!

Package.swift Show resolved Hide resolved
OCMock/Swift/NSValueConvertible.swift Outdated Show resolved Hide resolved
OCMock/Swift/ObjectiveMatchers.swift Outdated Show resolved Hide resolved
@ajpallares
Copy link
Contributor Author

Don't worry! I'm also rather new to SPM but the good thing about this is that we learn from it 😊

In any case, I didn't find any of your questions to be stupid at all! I think it's a good thing that you care a lot about this library and that you require minimum quality standards.

As for the #if directives, those seem a bit painful for me, especially as I expect to not get a feedback that I forgot one until after I try to do some SPM work, correct?

Totally agree. They are painful and easy to be forgotten in the future.

However, I do appreciate the PR and want to add support for SPM, I wouldn't want to block anyone from switching to their dependency manager of choice.

No problem. We'll get it working for sure. I'm already using Cuckoo with SPM in our project but I needed to add some ObjC mocks and the straightforward solution is to use Cuckoo + OCMock. So thank you for this amazing library! 🙌

@MatyasKriz
Copy link
Collaborator

Merged! Thanks a lot, @ajpallares, for this great PR and the research that you've put into making Cuckoo+OCMock work with SPM. 🙂

@MatyasKriz MatyasKriz closed this Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OCMock with Swift Package Manager
2 participants