My situation:
- I am developing a dynamically linked framework called
A
, wrapped into.xcframework
- I depend upon other frameworks
B
andC
that are linked statically - However, I don't want the consumers of
A
to learn about the existence ofB
andC
- And because of this, I would like to perform single object pre-link during the linkage of
A
so thatB
andC
are totally consumed byA
and are to be never seen again.
This task would be relatively easy if instead of static frameworks (.framework
), I used static libraries (.a
). In this case, I would be able to easily plop the path to the .a
into the Prelink Libraries
setting, set Perform Single-Object Prelink
to YES
, disable the embedding - and the goal would be accomplished.
However, I am facing the linkage against frameworks, not libs. The problem is that it has resources and bundles inside of it.
- If I put a path to the
.xcframework
or.framework
into thePrelink Libraries
Build Setting, the build fails:
Command MasterObjectLink failed with a nonzero exit code
can't map file, errno=22 file '/Users/*****/B/B.xcframework/ios-arm64/B.framework'
- And if I put a path to the actual executable inside the framework (B.xcframework/ios-arm64/B.framework/B), the build succeeds. However, none of the resources of
B.framework
are present in the resulting output.
Is there a way to automatically copy resources during Single-Object Prelink
?