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

Swift Package Manager Mandatory fields #190

Open
H2wk opened this issue Feb 3, 2021 · 0 comments
Open

Swift Package Manager Mandatory fields #190

H2wk opened this issue Feb 3, 2021 · 0 comments

Comments

@H2wk
Copy link

H2wk commented Feb 3, 2021

Summary

For pure SPM package projects i.e. projects that only use a Package.swift and no Xcode project. The xcodeproj: parameter is mandatory in xcov when trying to get coverage reports.

When building a swift package on the command line with xcodebuild you can build & test the package without a xcodeproj or
xcworkspace.

Xcode automatically generates a scheme file for any swift package manager projects so there is no longer a need to have a xcodeproj or xcworkspace file present.

Proposal

  • Introduce a new boolean setting like "use_spm" to indicate the use with a SPM package
  • Adjust the validation to check for an existing Package.swift file
  • The remaining behaviour should remain the same

To test:

Create a new swift package. swift package init. The swift package will be named after the folder you created it in.
Run xcodebuild -list this will list the schemes associated with the project. When this command is complete you will be able to see the scheme exists in the project and is named according to the directory it is in.
Build the project: xcodebuild -scheme %NAME% build`
Test the project: xcodebuild -scheme %NAME% test
Would be great to see this functionality added where the project or workspace can be specified as optional.

Link to the mandatory fields for xcov documentation in Fastlane here

Identical issue with scan here

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

1 participant