Skip to content

Commit

Permalink
Readme Update
Browse files Browse the repository at this point in the history
  • Loading branch information
iRare Media committed Oct 10, 2013
1 parent 7ba170b commit edcc867
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
iCloud Document Sync
==================

iCloud Document Sync helps integrate iCloud into iOS (OS X coming soon) Objective-C document projects with one-line code methods. Sync, upload, manage, and remove documents to and from iCloud with only a few lines of code (compared to the 400+ lines that it usually takes).
iCloud Document Sync helps integrate iCloud into iOS (OS X coming soon) Objective-C document projects with one-line code methods. Sync, upload, manage, and remove documents to and from iCloud with only a few lines of code (compared to the hundreds of lines that it usually takes).

If you like the project, please [star it](https://github.com/iRareMedia/iCloudDocumentSync) on GitHub!

Expand Down Expand Up @@ -76,13 +76,6 @@ You can delete documents from iCloud by using the method below. The completion b
// Completion handler could be used to update your UI and tell the user that the document was deleted
}];

### Sharing Documents
You can upload an iCloud document to a public URL by using the method below. The completion block is called when the public URL is created.

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

### Retrieving Documents and Data
You can open and retrieve a document stored in your iCloud documents directory with the method below. This method will attempt to open the specified document. If the file does not exist, a blank one will be created. The completion handler is called when the file is opened or created (either successfully or not). The completion handler contains a UIDocument, NSData, and NSError all of which contain information about the opened document.

Expand All @@ -102,6 +95,14 @@ You can also check whether or not a file actually exists in iCloud or not by usi
// File Exists in iCloud
}

### Sharing Documents
You can upload an iCloud document to a public URL by using the method below. The completion block is called when the public URL is created.

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


Delegates
-----
iCloud Document Sync delegate methods notify you of the status of iCloud and your documents stored in iCloud. There are no required delegate method for iOS, however it is recommended that you utilize all available delegate methods.
Expand All @@ -122,7 +123,7 @@ iCloud Document Sync delegate methods notify you of the status of iCloud and you
<li><tt>fileURL</tt> contains the NSURL pointing to the file. This could possibly be used to gather more information about the file. </li>
<li><tt>modifiedDate</tt> contains the NSDate representing the last modified date of the file. </li>
</ul>
<br /><br />
<br />
<tt> - (void)iCloudFileUploadConflictWithCloudFile:(NSDictionary *)cloudFile andLocalFile:(NSDictionary *)localFile;</tt></td>
</tr>
</table>
Expand Down

0 comments on commit edcc867

Please sign in to comment.