Making an ios app using opencv

I am trying to make an iOS app using opencv. I am using Xcode version 13.2.1, an iPhone 13 pro simulator on iOS 15.2. Opencv version is 4.5.5.

I followed the instructions in to set it up.

When I try to build the app, I get the following errors…
opencv2.framework/Headers/stitching/detail/exposure_compensate.hpp:66:12: Expected identifier
opencv2.framework/Headers/stitching/detail/seam_finders.hpp:62:12: Expected identifier
opencv2.framework/Headers/stitching/detail/blenders.hpp:68:12: Expected identifier

I have tried uninstalling and reinstalling the framework, deleting my derrived data and cleaning the build folder. I also tried using an ipad.

related: xcode - iOS app using opencv2.framwork gets 'parse error' when trying to build - Stack Overflow

please post TEXT logs of your errors, not images
this also needs more context (a few more lines above & below)

I went through and made another project step by step running after every change. #include <opencv2/opencv.hpp> is what causes the errors.

if this only happens in the stitching module, exclude it from the build using the appropriate cmake variable (use cmake-gui to browse)

I guess this explains the issue: