In fact the iCloud Drive app on the iPhone will show me the correct folder name as I defined it with NSUbiquitousContainerName. The app runs without any errors and I can confirm the file is created and viewable from the iCloud Drive app on the phone. You can see I am using the app's default ubiquity container URL and appending the folder 'Documents' and appending a filename. Text.write(to: documentURL, atomically:true, encoding:8) Let documentURL = documentDirectoryURL.appendingPathComponent('myFile.txt') Let documentDirectoryURL = containerURL!.appendingPathComponent('Documents') Let containerURL = (forUbiquit圜ontainerIdentifier: nil) However the files are not visible with the mac finder even though the files do exist in the mac filesystem. My iPhone app will create files and store them in the app's ubiquitous file folder so they should appear in the icloud drive on the mac or PC. Maybe I misunderstand how iCloud Drive is designed to work.