Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting stuck on saveAndCloseDocumentWithName:withContent:completion #127

Open
robertmanea opened this issue Jun 11, 2019 · 2 comments
Open
Labels

Comments

@robertmanea
Copy link

I shared my build with someone and they get stuck on saving (specifically somewhere around here, from what I gathered from my logs:

// Get the URL to save the new file to
NSURL *fileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];
// Initialize a document with that path
iCloudDocument *document = [[iCloudDocument alloc] initWithFileURL:fileURL];
document.contents = content;
[document updateChangeCount:UIDocumentChangeDone];

My build works fine on my device, so I can't figure out if there's any cloud setting on their device that I'm missing.
Did anyone else get stuck here?

@robertmanea
Copy link
Author

After some more logging, I found out it gets stuck when initializing the iCloudDocument

iCloudDocument *document = [[iCloudDocument alloc] initWithFileURL:fileURL];

@Sam-Spencer do you have any idea why that would be? Have you had any reports of this?

@ankrv
Copy link

ankrv commented Jun 20, 2020

Same problem with [[iCloudDocument alloc] initWithFileURL:fileURL]. It freezes the app. In my case it happens when I try to retrieveCloudDocumentWithName for the file that already exists. I use Swift with the Bridging-Header. The logs end here:

[iCloud] Initialized
[iCloud] Initializing Ubiquity Container
[iCloud] Retrieving iCloud document, file.txt
[iCloud] Ubiquity Container Created and Ready
[iCloud] The document, file.txt, already exists and will be opened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants