diff --git a/modules/imgcodecs/src/ios_conversions.mm b/modules/imgcodecs/src/ios_conversions.mm index 2aba323a2d..7992325d77 100644 --- a/modules/imgcodecs/src/ios_conversions.mm +++ b/modules/imgcodecs/src/ios_conversions.mm @@ -39,6 +39,8 @@ // the use of this software, even if advised of the possibility of such damage. // //M*/ +#include +#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST #import #include "apple_conversions.h" @@ -61,3 +63,4 @@ void UIImageToMat(const UIImage* image, cv::Mat& m, bool alphaExist) { CGImageRef imageRef = image.CGImage; CGImageToMat(imageRef, m, alphaExist); } +#endif