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

App Crashing : Attempt to revert document #101

Open
monish152 opened this issue Dec 20, 2016 · 8 comments
Open

App Crashing : Attempt to revert document #101

monish152 opened this issue Dec 20, 2016 · 8 comments

Comments

@monish152
Copy link

I am getting much crash on
-[UIDocument revertToContentsOfURL:completionHandler:] and assert saying attempt to revert document at URL. Can please anyone help.

@srabon88
Copy link

I too am receiving the same error. Is this an issue with the API or the way I'm handling the files before calling the API?

@c1wren
Copy link

c1wren commented Jul 16, 2017

I'm also having this issue occur. Xcode debugger isn't helping out at all in trying to find the cause of this issue.

@srabon88
Copy link

Although I was never able to fix this issue, our app's requirements have changed and I'm no longer using iCloud, but I was able to recreate this issue by putting the phone in airplane mode and calling the API. I believe it has something to do with the app not having internet connection. Maybe this can help point you in the right direction to solve it.

@monish152
Copy link
Author

Yes this is known issue of library.

@yorkwang
Copy link

I'm also having this issue occur too.

@yorkwang
Copy link

Anyone solve this issue?

@c1wren
Copy link

c1wren commented Jan 18, 2018

I think I've solved it by making sure that only one save can happen per file at a time. I think the issue comes from it trying to save a file while that file is currently being saved.

@yorkwang
Copy link

My app only save data into iCloud once when it's opened, and it's all right on iOS 9 and before, since iOS 10, the crash logs appeared. And I found [self.fileManager fileExistsAtPath:[fileURL path]] isn't working when app is just opened on iOS 10 and 11, only after about 10s, it will return the right value.
In the function saveAndCloseDocumentWithName, if [self.fileManager fileExistsAtPath:[fileURL path]] return NO, it will call [document saveToURL:document.fileURL forSaveOperation:UIDocumentSaveForCreating completionHandler:^(BOOL success) all the time.

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

No branches or pull requests

5 participants