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.
Swift rewrite
Fixes serious minor bugs relating to syntax and trivial mistakes.
Minor Changes
iCloudFilesDidChange:
delegate method. Closes #59.Resolved Issues
||
issue, where it should be &&
Known Issues No Known Issues
Fixes serious issues with initialization and setup. Adds a new method which must be called before performing any document handling operations.
Resolved Issues
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).API Changes
setupiCloudDocumentSyncWithUbiquityContainer:
Known Issues No Known Issues
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
Deprecated APIs
getListOfCloudFiles
is deprecated to honor the modern Objective-C Syntax guidelines (esp. conflicts with properties). Use listCloudFiles
instead.New Features
iCloudFileUpdateDidBegin
is called (once) when the file update beginsiCloudFileUpdateDidEnd
is called (once) when the file update finishesMinor Changes
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.
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
Resolved Issues
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.
Updated init
method, fixed double-init of singleton, fixed bug when saving documents, new delegate method, and fixed ubiquity URL bugs.
Breaking Changes
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
URLForUbiquityContainerIdentifier
set to run async inside the init
method.URLForUbiquityContainerIdentifier
by using instance variablenil
iCloudDidFinishInitializingWitUbiquityToken: withUbiquityContainer
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
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]
.
Other Changes
iCloudQueryLimitedToFileExtension
iCloudAvailabilityDidChangeToState:withUbiquityToken:withUbiquityContainer:
verboseAvailabilityLogging
property to toggle the display of availability changes in the log.checkCloudAvailability
method. Now checks for ubiquityIdentityToken instead of the ubiquity container (which was intensive and time consuming).shareDocumentWithName: completion:
method.x86_64
architecture compile issue.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.
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
.
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
Adds new methods and improves other methods. Fixes issues with documentation spelling, etc.
Breaking Changes No Breaking Changes
Other Changes
getListOfCloudFiles
, is now available. When called, it returns a list of files currently stored in your app's iCloud Documents directory.deleteDocumentWithName:
method works properly.Known Issues No known issues