# Making an ios app using opencv

**URL:** <https://forum.opencv.org/t/making-an-ios-app-using-opencv/7103>\
**Category:** Uncategorized\
**Created:** [January 12, 2022, 12:09pm UTC](https://forum.opencv.org/t/making-an-ios-app-using-opencv/7103 "2022-01-12T12:09:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo\_Reubelt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/leo_reubelt/32/4205_2.png) [@Leo\_Reubelt](https://forum.opencv.org/u/Leo_Reubelt)\
**Post date:** [January 12, 2022, 12:09pm UTC](https://forum.opencv.org/t/making-an-ios-app-using-opencv/7103/1 "2022-01-12T12:09:04Z")

</div>

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 [https://medium.com/onfido-tech/building-a-simple-lane-detection-ios-app-using-opencv-4f70d8a6e6bc](https://medium.com/onfido-tech/building-a-simple-lane-detection-ios-app-using-opencv-4f70d8a6e6bc) 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.

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [January 12, 2022, 12:21pm UTC](https://forum.opencv.org/t/making-an-ios-app-using-opencv/7103/2 "2022-01-12T12:21:44Z")

</div>

related: [xcode - iOS app using opencv2.framwork gets 'parse error' when trying to build - Stack Overflow](https://stackoverflow.com/questions/70673915/ios-app-using-opencv2-framwork-gets-parse-error-when-trying-to-build)

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [January 12, 2022, 12:22pm UTC](https://forum.opencv.org/t/making-an-ios-app-using-opencv/7103/3 "2022-01-12T12:22:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Leo\_Reubelt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/leo_reubelt/32/4205_2.png) [@Leo\_Reubelt](https://forum.opencv.org/u/Leo_Reubelt)\
**Post date:** [January 12, 2022, 2:00pm UTC](https://forum.opencv.org/t/making-an-ios-app-using-opencv/7103/4 "2022-01-12T14:00:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [January 12, 2022, 2:16pm UTC](https://forum.opencv.org/t/making-an-ios-app-using-opencv/7103/5 "2022-01-12T14:16:28Z")

</div>

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:

> <https://github.com/opencv/opencv/issues/6114>
>
> There is a conflict in stitching/detail/blenders.hpp line 63:
> enum { NO, FEA…THER, MULTI\_BAND };
> 
> The enum name "NO" is conflict with the build-in BOOL type "NO" in iOS.
> So an error occurred :
> /opencv/Pods/OpenCV/opencv2.framework/Headers/stitching/detail/blenders.hpp:63:12: Expected identifier
> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/usr/include/objc/objc.h:74:13: Expanded from macro 'NO'
