1

My Xcode app creates a document and resource path. Please see the console output below when I print out these two path variables:

enter image description here

However, when I try to find this folder in Finder, I'm told the folder doesn't exist.

enter image description here

Why?!

The code for getting the two paths are below:

// Get the path to the resource directory.
    NSString* resourcePath= [[NSBundle mainBundle] resourcePath];
    std::string *resourcePathCPP = new std::string([resourcePath UTF8String]);

    // Get the path to the Documents direcotory
    NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString* documentsPath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil;
    std::string *documentsPathCPP = new std::string([documentsPath UTF8String]);

Thanks!

BlueBucket7
  • 185
  • 3
  • 13

1 Answers1

0

That should be on your iPhone/iPad's file system, not on your Mac. Otherwise Go to folder ... Is the right way to check a directory.

Jakub Truhlář
  • 20,070
  • 9
  • 74
  • 84