SwiftPM binary framework embedded in app with share extension

My organization is distributing a binary framework (.xcframework) through direct download and Cocoapods, and I'm currently exploring distributing it as a binary target contained in a Swift package. Everything works great until:

  1. the app embedding this package also contains an extension
  2. I archive and export the app for adhoc/enterprise/development

Then "compiling Bitcode..." fails with a "IPA processing failed" error.
Uploading to App Store connect seems to work but I cannot test it currently.

Besides a few warning: Failed to resolve rpath for Lib: Could not resolve @executable_path for @executable_path/Frameworks from Lib warnings, I haven't found anything meaningful in the distribution logs.

Here's a super easy project reproducing the error with step by step instructions:
https://github.com/nckh/BinaryFrameworkExtensionIssue

Am I doing something wrong? Is this a bug? An edge case? After painful hours of trying so many combinations I'm running out of ideas. Thank you for your help!!

Thanks for the example, this looks like a potential bug to me.

1 Like

Thank you for your quick answer. I'm hesitating where to report the issue. Do you think it's a SwiftPM bug or Xcode one?

I would report it as an Xcode issue, we can always route it to the right place internally if it is not.

1 Like