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

Build errors after updating from 0.4.1 to higher version #99

Closed
jmarek41 opened this issue Jun 18, 2024 · 3 comments
Closed

Build errors after updating from 0.4.1 to higher version #99

jmarek41 opened this issue Jun 18, 2024 · 3 comments

Comments

@jmarek41
Copy link

jmarek41 commented Jun 18, 2024

Hello,

I cannot build the project after updating from 0.4.1 to 0.4.2 or 0.5.0. I am getting those errors:

The package product 'SwiftBasicFormat' requires minimum platform version 13.0 for the iOS platform, but this target supports 12.0
The package product 'SwiftSyntax' requires minimum platform version 13.0 for the iOS platform, but this target supports 12.0
The package product 'SwiftSyntaxBuilder' requires minimum platform version 13.0 for the iOS platform, but this target supports 12.0

I use integration directly to Xcode project target (my target has deployment target iOS 16 >) and I followed instructions here: https://swiftpackageindex.com/liamnichols/xcstrings-tool/documentation/documentation/integrating-xcstrings-tool-into-an-xcode-project-target

Since 0.4.1 is working without any issues I suspect this PR to causing the issue https://github.com/liamnichols/xcstrings-tool/pull/92/files. Or did I just misunderstood the usage? @liamnichols And thank you for this great library ❤️

Screenshot 2024-06-18 at 12 46 54 Screenshot 2024-06-18 at 12 47 17
@liamnichols
Copy link
Owner

Thanks for raising this @jmarek41! I've not seen this myself but from looking at the build log, it suggests that it is trying to build xcstrings-tool (the command line tool) for iOS, which shouldn't happen because this is a macOS utility that is used at build time.

When adding the xcstrings-tool package into your project, Xcode annoyingly suggests adding xcstrings-tool as a dependency to your targets, which you need to be sure to disable, it might be that this is the issue.

Could you double check the "Target Dependencies" under the "Build Phases" of your target to make sure that xcstrings-tool or StringsCatalog are not included. There should only be a reference to XCStringsToolPlugin under the "Run Build Tool Plug-ins" section for a correct configuration 🙇

@jmarek41
Copy link
Author

Lol 😅. Sorry I overlooked it. Library was added as a dependency in my target. Thanks a lot for quick and helpful answer!

@liamnichols
Copy link
Owner

No worries, I don't know why Xcode does this. I should probably add a note to the docs (#102) to make that clear.

It's also worth noting that there are actually two ways you can add the dependency:

  1. By adding the xcstrings-tool repo (this repo) - this is what you did
  2. By adding the xcstrings-tool-plugin repo - this is what the docs suggest

xcstrings-tool-plugin contains the underlying command line tool as a precompiled binary artifact, so if you didn't already have swift-syntax in your dependency graph, it will help keep your clean builds nice and fast.

Some people prefer to compile their tools from source though, so the choice is yours 👍

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