Hive
Setting the mergedBinaryType of the App Target to .automatic causes a crash. (Only Device, not Simulator)
GitHub issue · Open
What problem or need do you have?
The situation below is what happens when building on a real device. It does not happen in the simulator.
I’m using Tuist to configure the app.
If you set the mergedBinaryType of the target in the App to .automatic and forward the dependencies to a personally created dynamic framework, a crash will occur.
(.disable does not occur.)
Target(name: name,
platform: .iOS,
product: .app,
....
mergedBinaryType: .automatic)
When creating a target for HomeFeature framework, set it to mergeable: true.
Target(name: name,
platform: .iOS,
product: .framework,
...
mergeable: true)
However, it occurs independently of the mergeable value of HomeFeature.
It seems to be only related to the mergedBinaryType of App Target.
I’m attaching the demo app below. TuistMergeableTests.zip
The dependency of the demo app is simple.
CorpApp -> HomeFeature(Dynamic framework)
Can you help me?
Potential solution
No response
macOS version
14.1.2
Tuist version
3.33.4
Xcode version
15.0.1
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.
Hi, @Dev-MJ. I’m Dosu, and I’m helping the tuist team manage their backlog. I’m marking this issue as stale.
Issue Summary:
- You reported a crash on a real device when setting
mergedBinaryTypeto.automaticusing Tuist. - The crash does not occur in the simulator and seems linked to dependencies forwarded to a custom dynamic framework.
- You provided a demo app for further investigation.
- Pepicrft acknowledged the issue and mentioned a focus on releasing Tuist 4 in the next two weeks.
Next Steps:
- Please let us know if this issue is still relevant to the latest version of the tuist repository by commenting on this issue.
- If there is no further activity, the issue will be automatically closed in 7 days.
Thank you for your understanding and contribution!
The issue will remain open for further investigation.
Based on recent findings, the crash when setting mergedBinaryType to .automatic appears related to how Tuist handles merging and embedding dynamic frameworks, especially on device builds. There have been similar reports tied to changes in Tuist 4.39.0 and later, and some issues were resolved in newer Xcode versions (16.2+), so keeping your tools updated may help in the future. Also, Tuist CLI 4.49.0 introduced improvements for embedding and signing transitive dynamic frameworks, which could be relevant if you upgrade later on. No direct workaround has been documented yet, but reviewing your dependency structure and merged binary settings may help avoid runtime issues like missing frameworks or symbol duplication. If you have more details or test scenarios, sharing them could help with diagnosis.
References:
- Dynamic framework embedding and merging logic
- MergedBinaryType documentation
- Recent improvements in Tuist 4.49.0
To reply, just mention @dosu.
Docs are dead. Just use Dosu.
@pepicrft @fortmarek
Sorry for the late reply. I attempted to reproduce the issue in the environment specified below, and I was able to confirm that the same crash occurs.
macOS: Tahoe 26.1 tuist: 4.102.0 xcode: 26.0.1
The dependencies between the app and modules, as well as the file structure, are as follows. TuistMergeableTests_4.88.1.zip
If I convert the BaseUI module to a staticFramework, the crash does not occur.
Is it expected behavior that a crash happens when BaseUI is a dynamicFramework, but not when it is a staticFramework?