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

RunPhase in Xcode project #328

Open
kyzmitch opened this issue Oct 18, 2022 · 1 comment
Open

RunPhase in Xcode project #328

kyzmitch opened this issue Oct 18, 2022 · 1 comment

Comments

@kyzmitch
Copy link

Wasn't able to find how to integrate SwiftyMocky after installation using SPM in Issues or in documentation, also tried to find it on stackoverflow but with no luck.

Is it correct that after adding SwiftyMocky as swift package dependency to the xcode project it is necessary to add swiftymocky module to unit test target and then add a Run Script build phase like:

# To setup initial Mockfile
swiftymocky setup
# To generate mocks
swiftymocky generate

Could someone help figure out which path to use for swiftymocky executable if it was installed using SPM?
Also, I noticed that after adding SwiftyMocky framework as a dependency to unit test target in Link Binary with libraries it can't be found in XCTestCase related unit test file if you use import

I didn't want to use CLI from brew or mint, because I see that binary is present already in SPM

@markst
Copy link

markst commented Apr 18, 2023

Seem to recall executing something like this:

/usr/bin/xcrun --sdk macosx swift package --allow-writing-to-package-directory sourcery-code-generation

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

No branches or pull requests

2 participants