Create xcframework by docs not work.

xcode 13.4 trying move from fat to xcframework.

  1. I create the package by: 'swift package init --type library`;
  2. Move our sources to Source folder;
  3. Generate archive for iOS:
xcodebuild archive -scheme TestFramework \
            -destination "generic/platform=iOS" \
            -archivePath ./Archive-iOS \
            -derivedDataPath ".build" \
            SKIP_INSTALL=NO \
            BUILD_LIBRARY_FOR_DISTRIBUTION=YES
  1. . Generate archive for iOS Simulator:
xcodebuild archive -scheme TestFramework \
            -destination "generic/platform=iOS Simulator" \
            -archivePath ./Archive-iOSSimulator \
            -derivedDataPath ".build" \
            SKIP_INSTALL=NO \
            BUILD_LIBRARY_FOR_DISTRIBUTION=YES
  1. Generate the xcframework by docs:
xcodebuild -create-xcframework \
-framework './Archive-iOS.xcarchive/Products/Library/Frameworks/TestFramework.framework' \
-framework './Archive-iOSSimulator.xcarchive/Products/Library/Frameworks/TestFramework.framework' \
-output './Archive-iOS.xcarchive.xcframework'

got error: error: unable to read the file -> ./Archive-iOS.xcarchive/Products/Library/Frameworks/TestFramework.framework/TestFramework

Ofc, because on steps 3,4 I haven't this framework in archive. Where can I found correct documentation with step by step for make xcframeworks?

Create xcframework by docs not work.
 
 
Q