SampathKumar
SampathKumar

Reputation: 2545

How to find the device path in mac (iPhone)?

I am working in iPhone application, I have download a file from Dropbox to store iPhone device path like "/Users/govindarajk/Library/Application Support/iPhone Simulator/5.1/Applications/343cc44-024DF2-34qs34-4433243-csafsa42232/Documents/Example.txt", but i check this path in my Mac, the path file not shown it, How to find this path and Example.txt file? please help me

Thanks in Advance

I have to store a file this way:

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 
    NSString *documentsDirectory = [paths objectAtIndex:0]; // Get documents directory
    NSString *filePath = [documentsDirectory stringByAppendingPathComponent:@"Example.txt"];
    NSError *error;

    [self.restClient loadFile:@"/example/Example.txt" intoPath:filePath];

    if (filePath) { // check if file exists - if so load it:
        NSString *tempTextOut = [NSString stringWithContentsOfFile:filePath
                                                          encoding:NSUTF8StringEncoding
                                                             error:&error];
    }

Screen shot for your reference:

User/govindaraj/Library, the Library file not shown here:

enter image description here

enter image description here

Upvotes: 1

Views: 3551

Answers (2)

TimD
TimD

Reputation: 8572

Open up Terminal and enter the following

defaults write com.apple.Finder AppleShowAllFiles YES

Then relaunch Finder from the Force Quit option on the Apple menu.

If you want to turn hidden files back on, the command is

defaults write com.apple.Finder AppleShowAllFiles NO

Upvotes: 0

rckoenes
rckoenes

Reputation: 69499

The Library directory is hidden, you can go there by doing the following: Press ⇧ Shift++G when in finder. Then a dialog will popup asking to open a directory, just type in ~/Library and it should open the library directory.

Upvotes: 1

Related Questions