xcodebuild -create-xcframework copies dSym file to different folder

I have following framework binaries:

  1. Device.framework
  2. Device.dSYM
  3. Simulator_x86.framework
  4. Simulator_arm.framework

I first create a fat binary from the 2 simulator files: lipo -create -output /Output/Simulator /Simulator/Simulator_x86.framework /Simulator/Simulator_arm.framework

Then I use xcodebuild to create xcframework like this:

xcodebuild -create-xcframework -framework /Input/Device.framework -debug-symbols /Input/Device.dSYM -framework /Output/Simulator -output Release/App.xcframework

In the resultant xcframework, some time the dSYM directory gets copied to ios-arm64 directory and sometimes to ios-arm64_x86_64-simulator which clearly seems to be some bug.

xcodebuild -create-xcframework copies dSym file to different folder
 
 
Q