We have been using Tuist for a while already, and it successfully solves most of our problems. But there are some areas where we need to add some hacks to modify default tuist behavior. One of these areas is embedding static frameworks.
The problem
We rely on precompiled xcframeworks to embed our 3rdParty dependencies, it helps to improve CI built time + some of the frameworks are just not available in any other ways.
These frameworks can be static or dynamic and some of them also have resource bundles inside.
But if a static framework has a resource bundle inside, we are getting a problem. Tuist generates a project file that just links the framework and does not embed it. Without embedding - that resource bundle will not be copied into the app bundle, so the framework will not be able to access its resources.
Workarounds I tried:
copyFiles: [
.frameworks(name: "TestFramework", files: [
.folderReference(path: "3rdParty/Deps/TestFramework.xcframework")
])
],
Unfortunately, this option doesn't allow me to code-sign the framework. As a result, all TestFlight and Firebase builds are not able to launch. That's kind of makes sense.
Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.Tjf3SY/extracted/TestApp.app/Frameworks/TestFramework.framework : 0xe800801c (No code signature found.)
So as a result none of the workarounds works for me and I'm out of ideas now.
Do you have any suggestions on how to resolve it?
I understand, that I can always migrate to a dynamic framework/push vendors to provide dynamic frameworks and get proper behavior out of the box, but having a lot of dynamic frameworks in the app seems like a bit not so good idea.
Suggested solution
It's already possible to create custom copy phases into the Frameworks folder. Also, in the generated project - it's possible to configure code-signing for these files.
What if Tuist can give a bit more control to devs and make it possible to specify code-sign/not-code sign for these copied files?
Also, as another option - it would be nice to be able to configure it on TargetDependency.xcframework
level. But interface-wise it'll be a bit harder to set up, since it somehow should be defaulted to "always embed" for dynamic frameworks.
14.1.2
3.37.0
15.1.0
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too