I would like my OS X app to open a sample document located in the application bundle.
I'm currently doing the following:
NSString* path = [[NSBundle mainBundle] pathForResource:@"tutorial.doc" ofType:nil];
[_documentController openDocumentWithContentsOfURL:[NSURL fileURLWithPath:path] display:YES completionHandler:nil];
This works but has an unexpected effect: if I make changes to the document and save, the next time I open the bundle document the changes persist. I expected the bundle document to be read-only.
What am I doing wrong? How can I prevent this sample document to be modified?