I can’t archive App that uses a swift package with an xcframework

Originator:enzo
Number:rdar://FB8781532 Date Originated:07/10/2020
Status:Open Resolved:
Product:Xcode Product Version:Version 12.0.1 (12A7300)
Classification:Bug Reproducible:Always
 
We have a situation where:
* we have a library A distributed as an xcframework.
* this library A is used in a swift package B that includes it as a binary target.
* our final iOS App uses our swift package B with swift package manager.

We first had issues with code signing and solved it by adding a copy framework phase then a build phase that code sign the framework A when building the App:
codesign -f -v --sign "23V736L7E8" ${CODESIGNING_FOLDER_PATH}/Frameworks/TestFramework.framework

Now everything is fine when running in debug on device but when trying to archive the App, we have a compilation error saying Xcode doesn’t find the framework A.
We try a lots of different setup but didn’t find any solution to fix this compilation error.

Any idea on how we could solve this issue?

Here is another link to our sample project: https://github.com/zocario/swiftpm_archive_binary_target

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!