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

Added workaround for mac catalyst & supported mac catalyst. #50

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Kyome22
Copy link
Contributor

@Kyome22 Kyome22 commented Nov 26, 2024

close #34

Overview

In iOS, directories called Debug and Debug-iphonesimulator are created in the Build/Products directory, and it is known that the spp binary file is placed in both of them.
However, in the case of Mac Catalyst, only the Debug-maccatalyst directory is created in Build/Products.
Even though the path of context.tool(named: "spp") is Debug/spp.
As a result, the plugin fails to run on Mac Catalyst because the spp binary file cannot be found.

Related Issues

This bug seems to be unfixed in Xcode 16.2. 🤮

How to fix

I verified whether the following API could be used, but found it to be of no use.

  • #if targetEnvironment(macCatalyst)
  • ProcessInfo.processInfo.environment["IS_MACCATALYST"] == "YES"
  • ProcessInfo.processInfo.isMacCatalystApp

So I added a workaround to check in FileManager whether the Debug-maccatalyst directory exists.

@Kyome22 Kyome22 changed the title Added workaround for mac catalyst Added workaround for mac catalyst & supported mac catalyst. Nov 26, 2024
@Kyome22 Kyome22 mentioned this pull request Nov 26, 2024
@Kyome22
Copy link
Contributor Author

Kyome22 commented Nov 27, 2024

The string we get with context.tool(named: "spp").path.string is "/${BUILD_DIR}/${CONFIGURATION}/spp"
If I could convert this to an absolute path, I could do string replacement, but I don't know how.

@Kyome22
Copy link
Contributor Author

Kyome22 commented Nov 27, 2024

This workaround seems to work at first glance, but the build will fail immediately after a Clean Build.

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.

Catalyst support
1 participant