Added workaround for mac catalyst & supported mac catalyst. #50
+32
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
close #34
Overview
In iOS, directories called
Debug
andDebug-iphonesimulator
are created in theBuild/Products
directory, and it is known that thespp
binary file is placed in both of them.However, in the case of Mac Catalyst, only the
Debug-maccatalyst
directory is created inBuild/Products
.Even though the path of
context.tool(named: "spp")
isDebug/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.