In what cases [NSDocument fileURL] can be nil?

163 Views Asked by At

I'm creating the document with:

[NSDocumentController openDocumentWithContentsOfURL:display:completionHandler:] 

When I'm working with the instance of NSDocument and sometimes I'm getting crashes because document.fileURL == nil. What cases in NSDocument lifecycle can cause this?

1

There are 1 best solutions below

0
On

document.fileURL is nil until you save the document for the first time.