module 'Swift' was created for incompatible target

I am trying to create xcframework for my module.


While running the archive command using "xcodebuild archive" for maccatalyst, I am seeing the below error :


<unknown>:0: error: module 'Swift' was created for incompatible target x86_64-apple-macosx10.15: ........./ModuleCache.noindex/Swift-1AHEKWVT0NTUQ.swiftmodule


The full xcode command is -


xcodebuild archive -workspace <myworkspace>.xcworkspace -configuration Debug -sdk macosx -scheme <myscheme> BUILD_LIBRARY_FOR_DISTRIBUTION=YES SKIP_INSTALL=NO -derivedDataPath <some-path> -archivePath <archive-path>


This error started to come up recently. Earlier I was able to run the archive command successfully.

Also, there is no addition of module 'Swift' in my project.


I am running the above command on macOS Catalina v10.15.3 and Xcode version 11.4.


Any help is really appreciated.



Thanks.

Replies

I am having the same issue as well but for x86_64-apple-ios 13.0

Xcode 11.4.1

Same. Any luck?