-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
File not deleted after calling deleteDocumentWithName #33
Comments
I noticed this a few times during testing: UIDocument returns and calls its completion handlers without any errors, however the file does not disappear until some time after that. In my experience, it is best to use the completion handler to remove that file from your data source and update your interface. For some strange reason, the file may not delete for a while. I'm not sure why this happens or how it can be fixed. I'll look into it more and update you if I figure anything out. If anyone has suggestions or know-how please provide it. |
Do your deleted files have a 0 byte size? I recently found that if I opened a file with retrieveCloudDocumentWithName:completion: and then later on tried to delete it with deleteDocumentWithName:completion: then it would delete the file but then quickly replace it with a 0 byte file. The reason for this is the UIDocument object is still open. I found that if i call saveAndCloseDocumentWithName:withContent:completion: then (as the method name states) it closes the UIDocument and I can delete the file as expected. I also tried just closing the UIDocument after the retrieveCloudDocumentWithName call but that was not working for me. So I ended up writing my own function to open the file, extract the NSData, close the file and then just return the NSData since my app didn't really care about the UIDocument object and I didn't want to always have to save the file to close it. You can check out my fork to see what I did. The code is a bit messy right now but I hope to clean it up soon. Look for the retrieveCloudDataWithName:completion: method in iCloud.m I hope this helps! |
Hello, thank you for the support,
this is working sometimes but some other times loops because it is inside the
I'm evaluating the option of
this is not clear as I want, I hope to resolve this issue in other manner Thank you again |
@giorgioval87 I'm working on a fix for this (sorry for taking so long to get back to you) now. I noticed that there were some issues with Did you ever find a solution or pinpoint the problem? I hope to resolve the issue soon. |
Hello everybody,
I love iCloudDocumentSync it works perfectly, but my question is:
Is there a reason why After I call deleteDocumentWithName on a valid iCloud filename, it is not deleted, and there's no error.
It seems that the cloud continues to push me the file that I'm managing to delete.
Can you help me please ?
I want to delete that file from ALL devices.
Thank you very much and again congratulations!
Giorgio
The text was updated successfully, but these errors were encountered: