Hive
tuist cache builds macCatalyst destination for iOS apps
GitHub issue · Open
What happened?
When creating a project that has targets specifying .iOS as destination, I would expect the tuist cache command to generate xcframeworks for iOS simulator and device.
What I observed is that the Mac Catalyst variant gets built as well.
How do we reproduce it?
-
Download the sample project: ios_app_with_spm_dependencies.zip
-
Run
tuist install -
Run
tuist cache --external-only
Error log
Building scheme Binaries-Cache-iOS for the simulator
[...]
Archive Succeeded
Building scheme Binaries-Cache-iOS for Mac Catalyst
[...]
Archive Succeeded
Building scheme Binaries-Cache-iOS for device
[...]
Archive Succeeded
Creating XCFrameworks
[...]
Storing binaries to speed up workflows
macOS version
14.3.1
Tuist version
4.7.0
Xcode version
15.3
Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.
Start a Flight and preserve its objective, outcome, and session here.
@oct0f1sh could you include a reproducible project. I just tried @erudel’s project with the latest Tuist version, 4.81.1, and it works fine. Note that you can override the destination of a particular external dependency product by doing the following in your Package.swift
import PackageDescription
#if TUIST
import ProjectDescription
let packageSettings = PackageSettings(
productDestinations: ["Foo": [.iPhone]]
)
#endif
Could you try the above and let me know if it works?
Thanks for the response @pepicrft! I tried setting the productDestination for that one dependency as [.iPhone] as you have shown, but I’m still running into the issue when running tuist cache. I even went and checked in the generated workspace and can see that the supported destinations for that one package target still shows catalyst as well as a couple others that should not be there.
I’ve included here a sample project that has the same issue I’m running into. I’m able to run tuist build just fine, as well as run on the simulator, but when I run tuist cache it keeps trying to build for Mac Catalyst and fails because of an API that’s not available in a dependency. I’ve left out your suggested fix in my example code as adding it in yields the same result.