I am trying to create an XCFramework on Xcode 12.2 (12B45b) and do not get past the archive step for iOS. Simulator archive is created successfully, but because the iOS archive fails so does the -create_xcframework command.
I have followed the instructions outlined here: https://help.apple.com/xcode/mac/11.0/#/dev544efab96
and have built XCFrameworks for other projects without an issue before Xcode 12.2.
My issue is similar to the one from this thread: https://developer.apple.com/forums/thread/658195 except I am not using Cocoapods.
Here are the commands I used to build the archive:
		xcodebuild archive \
		-project "MyModule.xcodeproj" \
		-scheme "MyModule" \
		-destination "generic/platform=iOS Simulator" \
		-archivePath "build/ios-sim.xcarchive"
		xcodebuild archive \
		-project "MyModule.xcodeproj" \
		-scheme "MyModule" \
		-destination "generic/platform=iOS" \
		-archivePath "build/ios.xcarchive"
Here is the error from the xcodebuild output:
The following build commands failed:
Ld /Users/username/Library/Developer/Xcode/DerivedData/MyModule-fkvjupapscucufgdksosogqrhicg/Build/Intermediates.noindex/ArchiveIntermediates/MyModule/IntermediateBuildFilesPath/MyModule.build/Release-iphoneos/MyModule.build/Objects-normal/armv7/Binary/MyModule normal armv7
Ld /Users/username/Library/Developer/Xcode/DerivedData/MyModule-fkvjupapscucufgdksosogqrhicg/Build/Intermediates.noindex/ArchiveIntermediates/MyModule/IntermediateBuildFilesPath/MyModule.build/Release-iphoneos/MyModule.build/Objects-normal/arm64/Binary/MyModule normal arm64
(2 failures)
error: the path does not point to a valid framework: /Users/username/mymodule-root-directory/build/ios.xcarchive/Products/Library/Frameworks/MyModule.framework
The build settings for my target are: Build Libraries for Distribution: YES
Skip Install: NO
Excluded Architectures: arm64 (for "Any iOS Simulator SDK" only) Note: I have tried removing this and still see the error.
I might be missing something, but has something changed recently? Any help is greatly appreciated!