Linking error in Xcode

I had updated the opencv2 framework (iOS) to the latest one.

I am compiling it for a Mac-OS app. Previously, I had no such problems but Xcode is now giving an error:
building for macOS, but linking in object file built for iOS Simulator, for architecture x86_64

I had read that the framework needs to be in XCFramework. Does anyone know how to resolve this?