Catalyst document folder does not exist

Hey, on iOS we always access the document folder assuming it exists, but on Catalyst we ran into issues caused by the fact that the document folder does not exist, so we had to create it first. Is it normal behaviour on catalyst ?
Answered by Frameworks Engineer in 614433022
Yes, it’s normal. You can use FileManager.url(for:in:appropriateFor:create:) to look up this directory, and pass true to the create: parameter to get this directory created for you if needed.
Accepted Answer
Yes, it’s normal. You can use FileManager.url(for:in:appropriateFor:create:) to look up this directory, and pass true to the create: parameter to get this directory created for you if needed.

This worked for me:
NSFileManager *fileManager = [NSFileManager defaultManager];     NSURL *directoryURL = [fileManager URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:nil];

Catalyst document folder does not exist
 
 
Q