This repository has been archived by the owner on Feb 13, 2019. It is now read-only.
FileManager.url(forUbiquityContainerIdentifier:)
should not be called from main thread
#12
Labels
bug
Something isn't working
Summary
FileManager.url(forUbiquityContainerIdentifier:)
is currently being called on the main thread, against Apple's guidance.Details
At the moment you are instantiating the shared
DocumentManager
in theDocumentBrowserViewController.viewDidLoad ()
, which is happening on the main thread.textor/Textor/Controller/DocumentBrowserViewController.swift
Lines 11 to 17 in f97306e
When you step through the initialisation of the
DocumentManager
, you eventually get to a call for thecloudDocumentsURL
property which is where the call toFileManager.url(forUbiquityContainerIdentifier:)
happens.textor/Textor/Util/DocumentManager.swift
Lines 60 to 66 in f97306e
This goes against Apple's guidance for
FileManager.url(forUbiquityContainerIdentifier:)
that it should not be called from the main thread.Link to full Apple documentation: https://developer.apple.com/documentation/foundation/filemanager/1411653-url
The text was updated successfully, but these errors were encountered: