Questions tagged [nsfileversion]

An NSFileVersion object represents a snapshot of a file at a specific point in time. You use the NSFileVersion class to access and create and manage file revisions in your application. Each instance of this class contains meta information about a single revision, such as the location of the file containing the revision data, the modification date of the revision, and whether the revision is discardable.

6 questions
6
votes
1 answer

Automatically creating conflicting NSFileVersions

I've written a custom conflict handling routine that automatically kicks in to resolve conflicting versions of NSFileVersion. Now I want to write unit tests for in order to make sure it works. Here is the question: How do I cause/create conflicting…
Max Seelemann
  • 9,344
  • 4
  • 34
  • 40
3
votes
0 answers

NSFileVersion: resolve conflict by copying file

I have NSFilePresenter for the entire Documents folder. I used to put files in iCloud container and if files were created at the same time on multiple devices, they were automatically renamed by iCloud. At the same time…
pronebird
  • 12,068
  • 5
  • 54
  • 82
3
votes
3 answers

Programmatically resolve NSDocument iCloud version conflicts?

I have a Mac "Shoebox" app that internally uses NSDocument objects, but does not expose the concept of individual documents to the user. (I rely on NSDocument to make syncing via iCloud easier.) My problem is that when a version conflict arises, my…
Mark
  • 6,647
  • 1
  • 45
  • 88
3
votes
1 answer

What does it mean when a URL reports true for NSURLUbiquitousItemHasUnresolvedConflictsKey but there are no other versions of the URL?

In order to test conflicts, I've been saving two different versions of the same document on two devices. On both devices I would then be able to look at the currentVersionOfItemAtURL to see the 'winning' version - which was the same on both devices…
Simon
  • 25,468
  • 44
  • 152
  • 266
2
votes
0 answers

iCloud: Strategy to merge two versions of a file package (common ancestor)?

I have a document based app (Mac & iOS) and am trying to find a good way to automatically resolve version conflicts without bothering the user. My document is actually a file package with lots of small notes stored as text files. The most likely…
Mark
  • 6,647
  • 1
  • 45
  • 88
2
votes
0 answers

Is the method removeAndReturnError: not necessary?

I've just read the documentation about conflict resolution with UIDocuments in the iCloud: Resolving Document Version Conflicts In the last point of the chapter "How to Tell iOS That a Document Version Conflict Is Resolved" is written: Remove the…
Linard Arquint
  • 574
  • 3
  • 12
  • 32