This turned out to be some kind of Xcode bug after all. The following contains the symptoms we observed and the solution which worked for us in the hopes that it will help someone else.
To view the problem perform the following steps:
Select the project in the file browser, then the MyKit target, and observe the Enable Bitcode setting for MyKit.framework. It shows Yes with both items in bold text as:
Enabled Bitcode - Yes
indicating that some customization had been applied to the setting.
Now change the view settings to levels from combined and observe Yes in bold under the Resolved, MyKit and iOS Default columns as:
Build Options
Settings - Resolved - MyKit - MyApp - iOS Default
Enable Bitcode - Yes - Yes - <empty> - Yes
with the MyKit column highlighted in green.
To fix the problem perform the following steps:
Highlight the Enable Bitcode row then press delete. The settings should now be changed to (Xcode 12.2 GM):
Build Options
Settings - Resolved - MyKit - MyApp - iOS Default
Enable Bitcode - Yes - <empty> - <empty> - Yes
with the iOS Default column now highlighted in green.
The diff for the project file only shows two items changed. Xcode removed ENABLE_BITCODE = YES for both the Debug and Release configurations of the MyKit framework target though it still shows as enabled in Xcode when viewing the settings as combined. After applying this change the Any Mac (Apple Silicon, Intel) build can be archived and exported properly with no signing errors.
Takeaway / Lessons Learned:
Try randomly removing customized Xcode project settings values when things go wrong (by highlighting and pressing the delete key on them).
Topic:
App & System Services
SubTopic:
General
Tags: