I was wondering if it is possible to make a new file inside the existing application? Now i am using:
[filemgr createFileAtPath: @"newFile.txt" contents: data attributes: nil];
But I think I have to change the path to something else. Anyone knows?
This is not a good idea. If the app is installed at
/Application/then only admin users launch the app will be able to write that file. (Never assume users are admins!)The application might also be on read-only media.
If might also interfere with digitally signed applications though I’m not sure. Changing a file within the bundle means the app has changed, which is essentially what digital signatures want to avoid. (Don’t mess with application bundles)
Instead, you should save a file on
~/Library/Application Support/<yourApplicationName>/.Read File System Programming Guide.