title: OpenCV on IOS haar cascade xml file path issues from C++
body: <p>So I have my code in C++ and I am able to run it fine on linux/OSX/Android.  The problem now is ios.  I am simply trying to load the haar cascade xml files via full path "/foo/blah/myapp.app/haar.xml" and having one heck of a time.</p>
  
  <p>C++ can't confirm the file exists nor can opencv load it.  I am new to ios and am aware that the myapp.app could be a compressed dir like the android .apk dir.  </p>
  
  <p>I have confirmed that I'm looking in the right place....or at least I hope I have! to check i use getcwd in c++ to get running directory and I confirm that with the file path to the xml file.  It looks legit!</p>
  
  <p>What can I do?  The nice part about using C++ for the lib is that I can use one code base for desktop/android/ios.  I really don't want to have to mix in Objective-C into my lib just for file paths.</p>
  
  <p>Thanks in advance!</p>
  
  <p>The code I'm using is the following:</p>
  
  <pre><code>    std::ifstream fexists(face_haar_path.c_str());
      if(!fexists.good()) {
          std::cout &lt;&lt; "Could not find any facehaar.xml" &lt;&lt; std::endl;
          return NO_FACE_HAAR_FILE;
      }
  
      face_haar.load(face_haar_path); //cv::CascadeClassifier face_haar
  </code></pre>