ios – Find out how to single-object prelink a framework?


My scenario:

  • I’m creating a dynamically linked framework referred to as A, wrapped into .xcframework
  • I rely upon different frameworks B and C which are linked statically
  • Nonetheless, I do not need the shoppers of A to study in regards to the existence of B and C
  • And due to this, I want to carry out single object pre-link through the linkage of A in order that B and C are completely consumed by A and are to be by no means seen once more.

This job can be comparatively straightforward if as an alternative of static frameworks (.framework), I used static libraries (.a). On this case, I might be capable to simply plop the trail to the .a into the Prelink Libraries setting, set Carry out Single-Object Prelink to YES, disable the embedding – and the aim can be achieved.

Nonetheless, I’m dealing with the linkage in opposition to frameworks, not libs. The issue is that it has sources and bundles within it.

  • If I put a path to the .xcframework or .framework into the Prelink Libraries Construct Setting, the construct fails:
Command MasterObjectLink failed with a nonzero exit code
cannot map file, errno=22 file '/Customers/*****/B/B.xcframework/ios-arm64/B.framework'
  • And if I put a path to the precise executable contained in the framework (B.xcframework/ios-arm64/B.framework/B), the construct succeeds. Nonetheless, not one of the sources of B.framework are current within the ensuing output.

Is there a method to routinely copy sources throughout Single-Object Prelink?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles