I build my application as an universal binary, for both arm64 and x86_64 architectures. The app is linked to frameworks like CoreFoundation and CoreData.
However on building the app using Xcode 12.3, the dynamic libraries under my app directory Example.app/Contents/Frameworks are built for x86_64 architecture only, and not for arm64.
On going through the build logs, I see that these libraries are copied from the location
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/macosx/libswiftCoreData.dylib
All the libraries under this ndirectory are for x86_64 architecture only.
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/macosx/libswiftCoreData.dylib: Mach-O 64-bit dynamically linked shared library x86_64
Does anyone know the reason for this? Is it fine to discard these libraries or build them for arm64 too?
PS - The application does not seem to use these libraries, as my app runs on arm64 architecture without any hassle.