I am writing an Objective-c ++ application and I am trying to get to the Contents application folder.
Suppose my application name is MyApp.app. If I run the application from Xcode, I can get to the Contents folder as follows:
std::fstream file; file.open("MyApp.app/Contents/some_text_file.txt"); if(file.is_open()) { ... } else { ... }
But if I run my embedded application without Xcode, then file.is_open() will fail.
source share