Skip to content

Conversation

@brentleyjones
Copy link

No description provided.

Signed-off-by: Brentley Jones <github@brentleyjones.com>
@erikdoe
Copy link
Owner

erikdoe commented Jul 7, 2025

Can you provide a bit more context here?

It's been a long time but as far as I remember OCMock doesn't have a strict dependency on XCTest. If it's there at runtime it'll be used, but if it's not there, that's okay, too. There were good reasons for this approach. I wish I had documented them.

As far as I can tell, you're change would force linking of XCTest. Why would you do this in OCMock? If you want the extra functionality, you can always link XCTest from your test target and OCMock will discover it.

@brentleyjones
Copy link
Author

brentleyjones commented Aug 26, 2025

Unless OCM_DISABLE_XCTEST_FEATURES is defined, there is a hard dependency on XCTest. I needed to add this to allow creating a dynamic framework for OCMock.

I'm open to different ways to support this, but without this change linking into a dynamic framework fails, because of the use of XCTest without OCM_DISABLE_XCTEST_FEATURES defined (which is the case for the SwiftPM target). Could create two targets, one with and one without this defined?

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

Successfully merging this pull request may close these issues.

2 participants