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

iOS only SPM won't build #1375

Closed
simonmcl opened this issue Dec 1, 2023 · 2 comments
Closed

iOS only SPM won't build #1375

simonmcl opened this issue Dec 1, 2023 · 2 comments
Labels

Comments

@simonmcl
Copy link

simonmcl commented Dec 1, 2023

I'm trying to use jazzy docs for an SPM package, that is iOS only (mainly due to a dependency). When trying to run jazzy, the build errors saying the macos versions of dependencies are mismatched. I want to tell jazzy to build iOS only. I've tried using the flag to say iphoneos but it doesn't seem to restrict the build. Is there something else I can do?

My package:

let package = Package(
	name: "xxxxxxxxx",
	platforms: [
		.iOS("15.0")
	],
	....

Command:

jazzy --root-url xxxxxx --output Documentation
jazzy --root-url xxxxxx --output Documentation --sdk iphoneos
jazzy --root-url xxxxxx --output Documentation --sdk iphoneos --swift-build-tool spm

All produce the same errors:

My library is listed as "requiring 10.13", which it doesn't, this must be default if its unsupplied. I can't add a value for mine, because then it won't compile as it doesn't work for Macos

error: the library 'CustomAuth' requires macos 10.15, but depends on the product 'JWTDecode' which requires macos 11.0; consider changing the library 'CustomAuth' to require macos 11.0 or later, or the product 'JWTDecode' to require macos 10.15 or earlier.
error: the library 'xxxxx' requires macos 10.13, but depends on the product 'yyyyy' which requires macos 11.0; consider changing the library 'xxxxx' to require macos 11.0 or later, or the product 'yyyyy' to require macos 10.13 or earlier.
error: the library 'xxxxx' requires macos 10.13, but depends on the product 'Kingfisher' which requires macos 10.14; consider changing the library 'xxxxx' to require macos 10.14 or later, or the product 'Kingfisher' to require macos 10.13 or earlier.
error: the library 'xxxxx' requires macos 10.13, but depends on the product 'CustomAuth' which requires macos 10.15; consider changing the library 'xxxxx' to require macos 10.15 or later, or the product 'CustomAuth' to require macos 10.13 or earlier.
@johnfairh johnfairh added the help label Dec 1, 2023
@johnfairh
Copy link
Collaborator

What command are you using to build the module outside of jazzy? You'll need to pass those same flags to it -- right now it just knows to run swift build.

(The --sdk flag is something to do with Objective-C and isn't doing anything here.)

@simonmcl
Copy link
Author

simonmcl commented Dec 4, 2023

@johnfairh I had no command line scripts for building it. After some googling I found the solution was to force jazzy to use xcodebuild and have to use a .jazzy.yaml file, so that you can use comma separated string for -destination. Need settings something like the below to force it to stop building for macos:

root_url: xxxxx
output: Documentation
swift_build_tool: xcodebuild
xcodebuild_arguments:
  - "-scheme"
  - "xxxxx"
  - "-destination"
  - "platform=iOS Simulator,OS=16.2,name=iPhone 14 Pro"

Thanks for responding anyway

@simonmcl simonmcl closed this as completed Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants