Post

Replies

Boosts

Views

Activity

How to stop MacOS Document-based App from automatically loading cached file
On launching my app from Xcode, my document-based app automatically apparently tries to load a cached document from a previous launch. That document appears to be corrupted as the app crashes in initWithCoder [which was called from readFromData:]. The solution appears to be to delete the cached documents. Where are they located and is there anything special about deleting them?
1
0
650
Mar ’21
How to delete my mac app's savedstate data?
I suspect that my mac app's savedstate data is over full. I've been doing a great many launches of my mac application which involves creating new files, then breaking back to Xcode. Now a stable compiled version and a later version launched from inside Xcode both crash. The Xcode crashes are preceded by NSDocumentController calls that include the suggestive phrase: "... makeDocumentForURL:withContentsOfURL:alternateContent...". As this occurs before control is given to my code, it must be part of document-based app's launch activity. The only thing I can see to do is to delete the app's savedstate data. How do I delete this savedstate data? The instructions on the web are out-of-date.
1
0
747
Jan ’21
What is the definition of type in makeUntitledDocumentOfType
The NSDocumentController method:- (__kindof NSDocument *)makeUntitledDocumentOfType:(NSString *)typeName error:(NSError * _Nullable *)outError;is asking for a typeName. From discussions on the web it is not clear exactly what typeName is other than a NSString. Using jus tthe UTI isn't working for me. Various suggestions are to append "modules" of various sorts. I'm lost. Anyone have a clear answer? I've tried "My_App_Name.myUTI, but no luck.Thanks
1
0
566
Mar ’20
How to debug issues caused by 10.15.4 Upgrade
10.15.4 caused major disruption of my published app. This is the first time I have had a problem with an OS upgrade. How does one approach finding the cause? I have problems with Sandbox secure urls pointing to the wrong location and screen coordinate variations from previous appearaces. At least that's how it appears.I'm not asking for the answers, just how to go about finding them. In the past I've seen change lists for upgrades, but couldn't find them for this upgrade. Frankly, I'm freaking out about this. Get me started on a rational approach to address these issues.Thanks
3
0
669
Mar ’20
bookmarkDataWithOptions yields: NSCocoaErrorDomain Code=256
When calling:NSURL* aURL = [NSURL URLByResolvingBookmarkData:secBookmark options:options relativeToURL:nil bookmarkDataIsStale:&isStale error:&err];isStale is YES.When attempting to get a fresh bookmark, calling:NSData* secureBookmark = [aURL bookmarkDataWithOptions:options includingResourceValuesForKeys:nil relativeToURL:nil error:&err];produces:2019-03-11 15:53:51.603133-0700 ***[534:8439] Error: Error Domain=NSCocoaErrorDomain Code=256 "Could not open() the item" UserInfo={NSURL=file:///Users/oldmancoyote1/Desktop/E%20Projects%20folder/Drawing/Drawing%201%20.pdf, NSDebugDescription=Could not open() the item}If I ignore isStale, there appears to be no problem. Can I safely ignore isStale?
2
1
1.6k
Mar ’19