I have created .xcframework and trying to use in another app by embedding the .xcframework in xcode project, but I am getting an error "error: the use of xcframeworks is not supported in the legacy build system". I am testing this in xcode 11.3
You can try turning off the legacy build system. Go to File -> Workplace Settings -> Build System -> Change to New Build System (Default).