0

In my iOS SwiftUI app, I have a navigation view that lists links to several open Objective-C UIDocuments. While debugging my SwiftUI app in XCode, When I switch to another app, I get a log message in the console about "[UIDocumentLog] document saving on resign active finished" for each open document. Where is this log message coming from? Is there a way to turn it off? Does this indicate something amiss with my code?

1 Answers1

0

UIDocument supports autosaving. Apple's documentation on UIDocument says

Change Tracking

To enable the autosaving feature of UIDocument, you must notify it when users make changes to a document. UIDocument periodically checks whether the hasUnsavedChanges method returns YES; if it does, it initiates the save operation for the document.

So as your app goes into the background, UIDocument seems to be doing a check to see if autosaving is required.

I see this message on documents opened read-only. I can also confirm that no changes occur to such files. So I interpret this message as an indication that a check is being made (and optionally autosaving).

So the message is harmless, and unfortunately I don't think you can turn it off.

MichaelR
  • 1,681
  • 15
  • 28