We planned to create XCFramework for two libraries TDCore and TDApi and integrate the framework within an app that we have. However we are unable to create XCFramework to contain both libraries
TDCore is standalone library, however TDApi has a dependency to TDCore and the app needs to use both libraries inorder to fuction correctly.
TDCore -> No Dependency
TDApi -> Dependencies: TDCore.framework (embed:Do Not Embed)
App -> Dependencies to TDCore and TDApi using XCFramework
xcodebuild -archive generates archives for both TDCore and TDApi successfully. (4 archive in total for simulator,device)
The problem is having all these archives, we can not generate TDAPI.xcframework and the xcbuild command failes with the error :
Command:
xcodebuild -create-xcframework -framework ../Frameworks/tdapi_device.xcarchive/Products/Library/Frameworks/TDAPI.framework -framework ../Frameworks/tdapi_simulator.xcarchive/Products/Library/Frameworks/TDAPI.framework -framework ../Frameworks/tdcore_simulator.xcarchive/Products/Library/Frameworks/TDCore.framework -framework ../Frameworks/tdcore_simulator.xcarchive/Products/Library/Frameworks/TDCore.framework -output ../Frameworks/TDAPI.xcframework
Result:
2019-08-14 16:53:30.804 xcodebuild[85549:2370964] [MT] PluginLoading: Required plug-in compatibility UUID 07BAA045-2DD3-489F-B232-D1D4F8B92D2D for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ClangFormat.xcplugin' not present in DVTPlugInCompatibilityUUIDs
A library with the identifier "ios-x86_64-simulator" already exists.
Would be great if someone could see if there's a bug with Xcodebuild or anything missing to use the command correctly.