ICloudDocumentSync Versions Save

Integrate iCloud into iOS document projects with one-line code methods. Sync, upload, manage, and remove documents from iCloud quickly and easily. Helps to make iCloud "just work" for developers too.

8.0.0-beta

4 years ago

Swift rewrite

v7.4.1

9 years ago

Fixes serious minor bugs relating to syntax and trivial mistakes.

Minor Changes

  • Hidden Files are no longer filtered out of the returned files. If you would like to filter out hidden files, you should do so in the iCloudFilesDidChange: delegate method. Closes #59.

Resolved Issues

  • Removed unreacheable code
  • Renamed masking variables
  • Fixed || issue, where it should be &&
  • Added return statements to method, which expects return values
  • Updated NSMetadataQuery notification methods

Known Issues No Known Issues

v7.4

9 years ago

Fixes serious issues with initialization and setup. Adds a new method which must be called before performing any document handling operations.

Resolved Issues

  • Fixed an issue where no setup code was called within iCloud's init method. According to Apple's documentation, no setup code is called in an NSObject's init. iCloud now properly sets up using a new API (see below).
  • Resolved a problem that caused crashes when iCloud was not correctly setup.

API Changes

  • Added the following API:
    • setupiCloudDocumentSyncWithUbiquityContainer:
      Use this method to setup and initialize iCloud Document Sync. You must call this method before performing any document handling operations. Calling this method helps resolve the issues noted above, and starts an initial sync.

Known Issues No Known Issues

v7.3.0

10 years ago

Fixes issues with file updates. Adds two new delegate methods for file updates. Deprecated getListOfCloudFiles in favor of listCloudFiles. Refactored code to modern Objective-C Syntax.

Resolved Issues

  • Revamped internal file update procedure - delegate method should only get called once and updates are now more reliable and stable.

Deprecated APIs

  • Deprecated the following APIs:
    • getListOfCloudFiles is deprecated to honor the modern Objective-C Syntax guidelines (esp. conflicts with properties). Use listCloudFiles instead.

New Features

  • Added two new delegate methods to handle file updates.
    • iCloudFileUpdateDidBegin is called (once) when the file update begins
    • iCloudFileUpdateDidEnd is called (once) when the file update finishes

Minor Changes

  • Completed transition to auto-synthesized properties.
  • Refactored to modern Objective-C Syntax.
  • Improved ARM-64 architecture support.

Known Issues Issue with initial setup of ubiquity container (confirmed in Issue #38). Wrapped in @try / @catch block to catch any possible exceptions. Please submit issue if the exception is thrown.

v7.2

10 years ago

Bug fixes and minor project changes in this update. Just to tidy things up a bit. OS X support coming soon. Cocoapods documentation coming soon too.

Changes

  • Migrated to auto-synthesized properties.
  • Enabled Objective-C modules (sorry, no module for the actual iCloud.framework - third party frameworks can't utilize the feature yet).
  • New compiler checks for:
    • Modules
    • ARC
    • SDK version (minimum of iOS 5.1)

Resolved Issues

  • Fixed ubiquity container bug on initial creation.
  • Fixed NSMetadataQuery predicate filter for files without extensions (thanks to @bgfriend0).

Known Issues Issue with initial setup of ubiquity container (confirmed in Issue #38). Wrapped in @try / @catch block to catch any possible exceptions. Please submit issue if the exception is thrown.

v7.1

10 years ago

Updated init method, fixed double-init of singleton, fixed bug when saving documents, new delegate method, and fixed ubiquity URL bugs.

Breaking Changes

  • Deprecated the saveChangesToDocumentWithName: withContent: completion: method because it was a functional duplicate of the saveAndCloseDocumentWithName: withContent: completion:. There was also an issue where creating the UIDocument object would close the document, causing it to always be closed when the changes were made.

Other Changes

  • Retrieval of URLForUbiquityContainerIdentifier set to run async inside the init method.
  • Avoided multiple calls to URLForUbiquityContainerIdentifier by using instance variable
  • Refined setup instructions for singleton to avoid initializing twice
  • Fixed bug where retrieving the document directory URL may return nil
  • Added a new delegate method called when the initialization of iCloud finishes, iCloudDidFinishInitializingWitUbiquityToken: withUbiquityContainer
  • Fixed bug when saving and closing a document to iCloud. Now updates changes, content, then saves by overwriting the current version, then closes.

Resolved Issues This release resolves the following issue: #23. Refer to this issue for specifics on some of the fixes included in this release.

Known Issues No known issues

v7.0

10 years ago

Major changes in favor of stability and security. iCloud Document Sync is now a singleton. There are numerous new and updated methods. New delegate methods and protocols. New iCloudDocument features. Automated documentation and framework builds for easier contribution. Plus it fixes numerous bugs and adds an iOS Sample app.

Breaking Changes

  • Converted the iCloud class to a singleton. This approach makes iCloud Document Sync easier to maintain, and it increases stability. All class methods are now instance methods that must be called with the iCloud singleton manager: sharedCloud. Now when calling a method instead of doing this: [iCloud methodName] do this instead:

    [[iCloud sharedCloud] methodName];
    
  • Removed all deprecated methods and delegate methods from previous versions. Any methods and delegate methods previously marked as deprecated no longer exist. Calling any of those methods will result in a compiler error.

  • Removed the delegate parameters from uploadLocalOfflineDocumentsWithDelegate: and updateFilesWithDelegate:. These methods have been renamed. Check the documentation for new names.

  • The delegate method, iCloudFilesDidChange: withNewFileNames: now passes an NSMetadataItem in the first parameter instead of an NSURL object. This provides much more information about a file, but will cause an error if you try to access it as an NSURL. To get the URL from the NSMetadataItem, just call [item valueForAttribute:NSMetadataItemURLKey].

    • Revised iCloudDocument properties, methods, structure, and organization. iCloudDocument can now be used as a singleton also. Plus, many properties and methods have changed - both in name and functionality.

Other Changes

  • Created iOS Sample app to demonstrate how to properly use many features of iCloud Document Sync. Also beneficial for testing purposes.
  • Added file conflict handling methods. Retrieve a list of conflicting versions of a document, select the correct one, and then submit it for resolution.
  • Added document change tracking when saving a file to iCloud. Changes to files are automatically saved when saving a file. You can also explicitly update the change count.
  • Added document state monitoring methods. You can now subscribe and unsibscribe from document state changes. Check the state of a document at any time too.
  • Added rename document method. Now you can rename documents stored in iCloud.
  • Added duplicate document method. Now you can duplicate documents stored in iCloud.
  • Added evict document method. Evict a document from iCloud storage (download to local app sandbox and then delete from iCloud) by setting it to not be ubiquitous.
  • Added promote document method. Promote a document to iCloud storage (upload from local app sandbox to iCloud) by setting it to be ubiquitous.
  • Added new method to submit changes to a document.
  • Added new methods for retrieving the current ubiquity directory URL
  • Added new methods for retrieving an iCloudDocument object based on a given file name
  • Added new methods for retrieving information about a document stored in iCloud (file modified date, creation date, and size)
  • New protocol / delegate on the iCloudDocument class. Now you can subscribe to errors with UIDocument.
  • New delegate method to specify the iCloud query predicate filter: iCloudQueryLimitedToFileExtension
  • New delegate method to notify you of changes in the availability of iCloud: iCloudAvailabilityDidChangeToState:withUbiquityToken:withUbiquityContainer:
  • New property to enable or disable verbose logging of iCloud Document Sync. Also added a verboseAvailabilityLogging property to toggle the display of availability changes in the log.
  • Made improvements to document saving, now closes instead of overwriting the document. Allowing UIDocument to handle versions and changes.
  • Made improvements to the checkCloudAvailabilitymethod. Now checks for ubiquityIdentityToken instead of the ubiquity container (which was intensive and time consuming).
  • All methods check for iCloud availability before executing. A method will return prematurely if iCloud is unavailable. Errors are printed in the console.
  • Fixed thread management issues and crashes in iCloudDocument.
  • Fixed crash when updating the iCloud list.
  • Fixed crash on shareDocumentWithName: completion: method.
  • Fixed issues related to thread-management that may have caused crashes in some cases.
  • Fixed x86_64 architecture compile issue.
  • Improved error reporting.
  • Improved exception handling with @try / @catch blocks.
  • Improved thread management.
  • Updated Xcode project settings.
  • Removed the irrelevant timer code and methods.
  • Removed iOS Simulator detection. As of Xcode 5.0, the iOS Simulator works with iCloud.

Issues Resolved This release resolves the following issues: #3, #5, #11, #14, #17, #18, and #19. Refer to these issues for specifics on some of the fixes included in this release.

Known Issues When saving, closing, or opening a UIDocument object - the UIDocument class may never call its completion handler or it may take an extended amount of time to call the completion handler. This is believed to be a bug in Apple's APIs (the UIDocument class itself), not iCloud Document Sync. A bug report has been filed with Apple. Radar: rdar://15555843 Open Radar: http://www.openradar.me/15555843

The iCloud Ubiquity Container URL may be nil when called at some points, causing a crash when generating the iCloud Documents Directory URL.

The save and close document method may not properly close or save documents when called.

v6.4

10 years ago

Fixes Issue #15 and Issue #14. This is a bug fix update making changes to the retrieveDocument: completion: method and the iCloudDocument.m file.

Breaking Changes No breaking changes

Known Issues The retrieveDocument: completion: method may throw an exception, and crash, when creating a document that does not exist in iCloud. This method may also throw an uncaught exception if iCloud is not currently available and the existence of a file cannot be determined. This issue is fully documented in Issue #14. For a workaround, check for iCloud availability before calling the method: checkCloudAvailability.

v6.3

10 years ago

Adds a new method and improves documentation.

Breaking Changes No Breaking Changes

Other Changes

  • Adds a method to share a file stored in iCloud by uploading it to a public URL

    NSURL *publicURL = [iCloud shareDocumentWithName:@"docName.ext" completion:^(NSURL *sharedURL, NSDate *expirationDate, NSError *error) {
        // Completion handler that passes the public URL created, the expiration date of the URL, and any errors. Could be used to update your UI and tell the user that the document was uploaded
    }];
    
  • Improves Documentation

Known Issues No known issues

v6.2

10 years ago

Adds new methods and improves other methods. Fixes issues with documentation spelling, etc.

Breaking Changes No Breaking Changes

Other Changes

  • A new method, getListOfCloudFiles, is now available. When called, it returns a list of files currently stored in your app's iCloud Documents directory.
  • Improved the delete document method. Fixes an issue where the document would not properly close and then delete - resulting in random errors, false positives, and inability to delete documents. Now, the deleteDocumentWithName: method works properly.
  • Fixed spelling issues with documentation
  • Created Macro for Document Directory

Known Issues No known issues