Including resource bundles in xcframeworks

In my project I have a framework build target and a resource bundle build target. The framework target has the resource bundle target set in the Dependencies build phase.

My goal is to create an xcframework that contains my framework and resource bundle. Typically, frameworks contain a Bundles or Resources folder containing resource bundles.

When I use xcodebuild to archive my framework I use options:
Code Block
SKIP_INSTALL=NO
BUILD_LIBRARY_FOR_DISTRIBUTION=YES

The xcarchive is created just fine. When I look inside the xcarchive I see:
  • My resource bundle under Products/Library/Bundles

  • My framework under Products/Library/Frameworks (without the resource bundle inside)

When I create the xcframework, each -framework argument on the "xcodebuild -create-xcframework" has to be a path into each xcarchive like "foo.xcarchive/Products/Library/Frameworks/foo.framework"

The xcframework is created, but the resource bundle from Products/Library/Bundles doesn't get copied into the xcframework. Do I need to manually copy the contents of Products/Library/Bundles into each foo.framework/Resources inside the xcframework?

Replies

I'm in a similar situation, have you found an answer?

#Metoo Any update ?

Has anyone got a solution, please add the steps. No idea when we will get someone from Apple tech team answer this?