Skip to content

Commit

Permalink
File Update
Browse files Browse the repository at this point in the history
  • Loading branch information
iRare Media committed Oct 11, 2013
1 parent e623297 commit dcc94f0
Show file tree
Hide file tree
Showing 18 changed files with 151 additions and 48 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
**iCloud Document Sync is a work in progress**. Please help us get all features working and working well. We believe that this project will help many developers by easing the burden of iCloud. Below are the changes for each major commit.

<table>
<tr><th colspan="2" style="text-align:center;"><b>Version 6.3</b></th></tr>
<tr>
<td>Adds new methods. Fixes issues with documentation spelling, etc.
<ul>
<li>A new method, <tt>shareDocumentWithName: completion:</tt>, is now available. Share a file stored in iCloud by uploading it to a public URL. </li>
<li>Fixed spelling issues with documentation</li>
</ul>
</td>
</tr>
<tr><th colspan="2" style="text-align:center;"><b>Version 6.2</b></th></tr>
<tr>
<td>Adds new methods and improves other methods. Fixes issues with documentation spelling, etc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<key>CFBundleName</key>
<string>iCloudSDK Documentation</string>
<key>CFBundleShortVersionString</key>
<string>6.2</string>
<string>6.3</string>
<key>CFBundleVersion</key>
<string>6.2</string>
<string>6.3</string>



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ <h1 class="hideInXcode">iCloud Class Reference</h1>

<option value="//api/name/saveDocumentWithName:withContent:withDelegate:completion:">&nbsp;&nbsp;&nbsp;&nbsp;+ saveDocumentWithName:withContent:withDelegate:completion:</option>

<option value="//api/name/shareDocumentWithName:completion:">&nbsp;&nbsp;&nbsp;&nbsp;+ shareDocumentWithName:completion:</option>

<option value="//api/name/updateFilesWithDelegate:">&nbsp;&nbsp;&nbsp;&nbsp;+ updateFilesWithDelegate:</option>

<option value="//api/name/uploadLocalOfflineDocumentsWithDelegate:completion:">&nbsp;&nbsp;&nbsp;&nbsp;+ uploadLocalOfflineDocumentsWithDelegate:completion:</option>
Expand Down Expand Up @@ -102,6 +104,8 @@ <h1 class="hideInXcode">iCloud Class Reference</h1>

<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Uploading to iCloud">Uploading to iCloud</a></span></li>

<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Sharing iCloud Content">Sharing iCloud Content</a></span></li>

<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Deleting content from iCloud">Deleting content from iCloud</a></span></li>

<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Getting content from iCloud">Getting content from iCloud</a></span></li>
Expand Down Expand Up @@ -146,6 +150,8 @@ <h1 class="hideInXcode">iCloud Class Reference</h1>

<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/saveDocumentWithName:withContent:withDelegate:completion:">saveDocumentWithName:withContent:withDelegate:completion:</a></span></li>

<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/shareDocumentWithName:completion:">shareDocumentWithName:completion:</a></span></li>

<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/updateFilesWithDelegate:">updateFilesWithDelegate:</a></span></li>

<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/uploadLocalOfflineDocumentsWithDelegate:completion:">uploadLocalOfflineDocumentsWithDelegate:completion:</a></span></li>
Expand Down Expand Up @@ -312,6 +318,21 @@ <h3 class="subsubtitle task-title">Uploading to iCloud</h3>
</span>


</li>
</ul>


<a title="Sharing iCloud Content" name="task_Sharing iCloud Content"></a>
<h3 class="subsubtitle task-title">Sharing iCloud Content</h3>

<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/shareDocumentWithName:completion:">+&nbsp;shareDocumentWithName:completion:</a></code>
<span class="tooltip"><p>Share an iCloud document by uploading it to a public URL.</p></span>
</span>


</li>
</ul>

Expand Down Expand Up @@ -1004,6 +1025,67 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>



<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">iCloud.h</code><br />
</div>


</div>

<div class="section-method">
<a name="//api/name/shareDocumentWithName:completion:" title="shareDocumentWithName:completion:"></a>
<h3 class="subsubtitle method-title">shareDocumentWithName:completion:</h3>



<div class="method-subsection brief-description">
<p>Share an iCloud document by uploading it to a public URL.</p>
</div>



<div class="method-subsection method-declaration"><code>+ (NSURL *)shareDocumentWithName:(NSString *)<em>name</em> completion:(void ( ^ ) ( NSURL *sharedURL , NSDate *expirationDate , NSError *error ))<em>handler</em></code></div>



<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>

<dl class="argument-def parameter-def">
<dt><em>name</em></dt>
<dd><p>The name of the iCloud file being uploaded to a public URL</p></dd>
</dl>

<dl class="argument-def parameter-def">
<dt><em>handler</em></dt>
<dd><p>Code block called when the document is successfully uploaded. The completion block passes NSURL, NSDate, and NSError objects. The NSURL object is the public URL where the file is available at. The NSDate object is the date that the URL expries on. The NSError object contains any error information if an error occurred, otherwise it will be nil.</p></dd>
</dl>

</div>



<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
<p>The public URL where the file is available at</p>
</div>





<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Upload a document stored in iCloud for a certain amount of time.</p>
</div>







<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">iCloud.h</code><br />
Expand Down Expand Up @@ -1195,7 +1277,7 @@ <h4 class="method-subtitle">Declared In</h4>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 iRare Media. All rights reserved. (Last updated: 2013-10-09)</span><br />
<p><span class="copyright">&copy; 2013 iRare Media. All rights reserved. (Last updated: 2013-10-10)</span><br />

<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ <h4 class="method-subtitle">Declared In</h4>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 iRare Media. All rights reserved. (Last updated: 2013-10-09)</span><br />
<p><span class="copyright">&copy; 2013 iRare Media. All rights reserved. (Last updated: 2013-10-10)</span><br />

<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ <h4 class="method-subtitle">Declared In</h4>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 iRare Media. All rights reserved. (Last updated: 2013-10-09)</span><br />
<p><span class="copyright">&copy; 2013 iRare Media. All rights reserved. (Last updated: 2013-10-10)</span><br />

<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ th {

#contents, #overview_contents {
-webkit-overflow-scrolling: touch;
border-top: 1px solid #A9A9A9;
border-top: 1px solid #2B334F;
position: absolute;
top: 90px;
top: 91px;
left: 0;
right: 0;
bottom: 0;
Expand Down Expand Up @@ -186,26 +186,26 @@ th {

#top_header #title {
background: url("../img/title_background.png") repeat-x 0 0 #8A98A9;
border-bottom: 1px solid #757575;
border-bottom: 1px solid #B6B6B6;
height: 25px;
overflow: hidden;
}

#top_header h1 {
font-size: 105%;
font-size: 115%;
font-weight: normal;
margin: 0;
padding: 3px 0 2px;
text-align: center;
/*text-shadow: 0 1px 0 #D5D5D5;*/
text-shadow: 0 1px 0 #D5D5D5;
white-space: nowrap;
}

#headerButtons {
background-color: #D8D8D8;
background-image: url("../img/button_bar_background.png");
border-bottom: 0px solid #EDEDED;
border-top: 0px solid #a8a8a8;
border-bottom: 1px solid #EDEDED;
border-top: 1px solid #2B334F;
font-size: 8pt;
height: 28px;
left: 0;
Expand All @@ -227,7 +227,6 @@ th {
}

#toc_button button {
background-color: #EBEEF1;
border-color: #ACACAC;
border-style: none solid none none;
border-width: 0 1px 0 0;
Expand Down Expand Up @@ -263,14 +262,14 @@ li#jumpto_button select {
}

#tocContainer {
background-color: #EBEEF1;
border-top: 1px solid #ACACAC;
background-color: #E4EBF7;
border-top: 1px solid #2B334F;
bottom: 0;
display: none;
left: 0;
overflow: hidden;
position: absolute;
top: 90px;
top: 91px;
width: 229px;
}

Expand Down Expand Up @@ -547,32 +546,6 @@ span.tooltip:hover span.tooltip {
color: #000;
}

.termdef {
margin-bottom: 10px;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
}

.termdef dt {
margin: 0;
padding: 0;
}

.termdef dd {
margin-bottom: 6px;
margin-left: 16px;
margin-right: 0px;
margin-top: 1px;
}

.termdef dd p {
margin-bottom: 6px;
margin-left: 0px;
margin-right: 0px;
margin-top: -1px;
}

.argument-def {
margin-top: 0.3em;
margin-bottom: 0.3em;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ <h2 class="index-title">Protocol References</h2>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 iRare Media. All rights reserved. (Last updated: 2013-10-09)</span><br />
<p><span class="copyright">&copy; 2013 iRare Media. All rights reserved. (Last updated: 2013-10-10)</span><br />

<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h2 class="index-title">Protocol References</h2>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 iRare Media. All rights reserved. (Last updated: 2013-10-09)</span><br />
<p><span class="copyright">&copy; 2013 iRare Media. All rights reserved. (Last updated: 2013-10-10)</span><br />

<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,26 @@
<NodeRef refid="1"/>
</Token>

<Token>
<TokenIdentifier>//apple_ref/occ/clm/iCloud/shareDocumentWithName:completion:</TokenIdentifier>
<Abstract type="html">Share an iCloud document by uploading it to a public URL.</Abstract>
<DeclaredIn>iCloud.h</DeclaredIn>

<Declaration>+ (NSURL *)shareDocumentWithName:(NSString *)name completion:(void ( ^ ) ( NSURL *sharedURL , NSDate *expirationDate , NSError *error ))handler</Declaration>
<Parameters>
<Parameter>
<Name>name</Name>
<Abstract type="html">The name of the iCloud file being uploaded to a public URL</Abstract>
</Parameter><Parameter>
<Name>handler</Name>
<Abstract type="html">Code block called when the document is successfully uploaded. The completion block passes NSURL, NSDate, and NSError objects. The NSURL object is the public URL where the file is available at. The NSDate object is the date that the URL expries on. The NSError object contains any error information if an error occurred, otherwise it will be nil.</Abstract>
</Parameter>
</Parameters>
<ReturnValue><Abstract type="html">The public URL where the file is available at</Abstract></ReturnValue>
<Anchor>//api/name/shareDocumentWithName:completion:</Anchor>
<NodeRef refid="1"/>
</Token>

<Token>
<TokenIdentifier>//apple_ref/occ/clm/iCloud/deleteDocumentWithName:completion:</TokenIdentifier>
<Abstract type="html">Delete a document from iCloud.</Abstract>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ iCloud Document Sync will automatically detect changes in iCloud documents. When
### Uploading Documents
iCloud Document Sync uses UIDocument and NSData to store and manage files. All of the heavy lifting with NSData and UIDocument is handled for you. There's no need to actually create or manage any files, just give iCloud Document Sync your data, and the rest is done for you.

To create a new document or save an exisiting one (close the document), use the method below.
To create a new document or save an existing one (close the document), use the method below.

[iCloud saveDocumentWithName:@"Name.ext" withContent:[NSData data] completion:^(UIDocument *cloudDocument, NSData *documentData, NSError *error) {
if (error == nil) {
Expand All @@ -67,7 +67,7 @@ You can also upload any documents created while offline, or locally. Files in t
// Completion handler could be used to tell the user that the upload has completed
}];

Note the `repeatingHandler` block. This block is called everytime a local file is uploaded, therefore it may be called multiple times in a short period. The NSError object contains any error information if an error occured, otherwise it will be nil.
Note the `repeatingHandler` block. This block is called every-time a local file is uploaded, therefore it may be called multiple times in a short period. The NSError object contains any error information if an error occurred, otherwise it will be nil.

### Removing Documents
You can delete documents from iCloud by using the method below. The completion block is called when the file is successfully deleted.
Expand Down Expand Up @@ -99,7 +99,7 @@ You can also check whether or not a file actually exists in iCloud or not by usi
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
// 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
}];


Expand Down
15 changes: 15 additions & 0 deletions iCloud.framework/Versions/A/Headers/iCloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,21 @@ NS_CLASS_AVAILABLE_IOS(5_0) @interface iCloud : NSObject
+ (void)uploadLocalOfflineDocumentsWithDelegate:(id<iCloudDelegate>)delegate repeatingHandler:(void (^)(NSString *fileName, NSError *error))repeatingHandler completion:(void (^)(void))completion;


/** @name Sharing iCloud Content */

/** Share an iCloud document by uploading it to a public URL.
@discussion Upload a document stored in iCloud for a certain amount of time.
@param name The name of the iCloud file being uploaded to a public URL
@param handler Code block called when the document is successfully uploaded. The completion block passes NSURL, NSDate, and NSError objects. The NSURL object is the public URL where the file is available at. The NSDate object is the date that the URL expries on. The NSError object contains any error information if an error occurred, otherwise it will be nil.
@return The public URL where the file is available at
*/

+ (NSURL *)shareDocumentWithName:(NSString *)name completion:(void (^)(NSURL *sharedURL, NSDate *expirationDate, NSError *error))handler;


/** @name Deleting content from iCloud */

/** Delete a document from iCloud.
Expand Down
Binary file modified iCloud.framework/Versions/A/iCloud
Binary file not shown.
6 changes: 5 additions & 1 deletion iCloud.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Start constants\ncompany=\"iRare Media\";\ncompanyID=\"com.iRareMedia\";\ncompanyURL=\"http://www.iRareMedia.com\";\ngitHubURL=\"https://github.com/iRareMedia/iCloudDocumentSync\";\nversion=\"6.2\";\ntarget=\"iphoneos\";\n#target=\"macosx\";\noutputPath=\"${BUILT_PRODUCTS_DIR}\";#\"~/help\";\n# End constants\n/usr/local/bin/appledoc \\\n--project-name \"${PROJECT_NAME}SDK\" \\\n--project-company \"${company}\" \\\n--project-version \"${version}\" \\\n--company-id \"${companyID}\" \\\n--docset-atom-filename \"iRareMedia.atom\" \\\n--docset-feed-url \"${gitHubURL}/%DOCSETATOMFILENAME\" \\\n--docset-package-url \"${gitHubURL}/%DOCSETPACKAGEFILENAME\" \\\n--docset-fallback-url \"${gitHubURL}\" \\\n--output \"${outputPath}\" \\\n--publish-docset \\\n--docset-platform-family \"${target}\" \\\n--logformat xcode \\\n--keep-intermediate-files \\\n--no-repeat-first-par \\\n--no-warn-invalid-crossref \\\n--ignore \"*.m\" \\\n--exit-threshold 2 \\\n\"${PROJECT_DIR}\"";
shellScript = "# Start constants\ncompany=\"iRare Media\";\ncompanyID=\"com.iRareMedia\";\ncompanyURL=\"http://www.iRareMedia.com\";\ngitHubURL=\"https://github.com/iRareMedia/iCloudDocumentSync\";\nversion=\"6.3\";\ntarget=\"iphoneos\";\n#target=\"macosx\";\noutputPath=\"${BUILT_PRODUCTS_DIR}\";#\"~/help\";\n# End constants\n/usr/local/bin/appledoc \\\n--project-name \"${PROJECT_NAME}SDK\" \\\n--project-company \"${company}\" \\\n--project-version \"${version}\" \\\n--company-id \"${companyID}\" \\\n--docset-atom-filename \"iRareMedia.atom\" \\\n--docset-feed-url \"${gitHubURL}/%DOCSETATOMFILENAME\" \\\n--docset-package-url \"${gitHubURL}/%DOCSETPACKAGEFILENAME\" \\\n--docset-fallback-url \"${gitHubURL}\" \\\n--output \"${outputPath}\" \\\n--publish-docset \\\n--docset-platform-family \"${target}\" \\\n--logformat xcode \\\n--keep-intermediate-files \\\n--no-repeat-first-par \\\n--no-warn-invalid-crossref \\\n--ignore \"*.m\" \\\n--exit-threshold 2 \\\n\"${PROJECT_DIR}\"";
};
9994D1BA16FE3C5C00AB071B /* Prepare Framework */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -363,13 +363,17 @@
9994D1BD16FE3C8400AB071B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD)";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
9994D1BE16FE3C8400AB071B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD)";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
Expand Down
Binary file not shown.

0 comments on commit dcc94f0

Please sign in to comment.