Were you able to solve this issue?
I'm now using makefile to generate FFMpeg libraries, everything builds correctly, but i have a problem during building xcframework.
Here are my compiler and linker flags.
CFLAGS="$CFLAGS -target x86_64-apple-ios13.0-macabi \
-isysroot $xcode_path/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk \
-isystem $xcode_path/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/iOSSupport/usr/include \
-iframework $xcode_path/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/iOSSupport/System/Library/Frameworks"
LDFLAGS="$LDFLAGS -target x86_64-apple-ios13.0-macabi \
-isysroot $xcode_path/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk \
-L$xcode_path/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/iOSSupport/usr/lib \
-L$xcode_path/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/maccatalyst \
-iframework $xcode_path/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/iOSSupport/System/Library/Frameworks"
I tried to use built library and also I tried to use object files to glue them into library with libtool.
libtool -static -arch_only $ARCHS -D \
-syslibroot $xcode_path/MacOSX.platform/Developer/SDKs/MacOSX.sdk \
-L$xcode_path/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/iOSSupport/usr/lib \
-L$xcode_path/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/maccatalyst \
$object_files \
-o "$TMP_FOLDER/$FRAMEWORK_NAME"
Then I do following to create XCFramework from libraries:
xcodebuild -create-xcframework \
-library "arm64/$LIB_NAME" \
-library "x86_64/$LIB_NAME" \
-headers "include" \
-output "$XCFRAMEWORK"
When I try to create XCFramework with only iOS arm64 slice, it succeeds.
If I use mac-catalyst x86_64 slice, it fails with following error
error: unable to find any specific architecture information in the binary at 'foo/bar/x86_64/libavcodec.a'