<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1933638537299613548</id><updated>2025-10-21T23:58:42.796-07:00</updated><category term="Cloud Storage"/><category term="IPod"/><category term="Key Value"/><category term="iCloud"/><category term="iCloud Document share"/><category term="iCloud Integration"/><category term="iOS 5.0"/><category term="iPad"/><category term="iPhone"/><category term="iPhone Software Development"/><title type='text'>iCloud Integration in iOS application</title><subtitle type='html'>In Apple&#39;s recent release iOS 5.0, major feature is iCloud service. iCloud is the service for sharing data of iPhone, iPad application which is running in different devices. iCloud service can be use in application many different ways i.e. data sharing (where you can set values on key like for application NSUserDefaults), Document sharing and database sharing by using core data.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://icloudintegration.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1933638537299613548/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://icloudintegration.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Pragnesh Dixit</name><uri>http://www.blogger.com/profile/08016771699141725132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1933638537299613548.post-3153332738996600724</id><published>2011-10-16T04:22:00.000-07:00</published><updated>2011-11-23T08:03:42.402-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cloud Storage"/><category scheme="http://www.blogger.com/atom/ns#" term="iCloud"/><category scheme="http://www.blogger.com/atom/ns#" term="iCloud Document share"/><category scheme="http://www.blogger.com/atom/ns#" term="iCloud Integration"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS 5.0"/><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone Software Development"/><category scheme="http://www.blogger.com/atom/ns#" term="IPod"/><category scheme="http://www.blogger.com/atom/ns#" term="Key Value"/><title type='text'>Data Sharing on iCloud from iPhone/iPad with iOS 5.0</title><content type='html'>&lt;meta content=&#39;Apple has recently launch iOS5.0 with iCloud integration and iPhone/iPad/iPod development seems very easy with New Xcode 4.0,4.2 with Lion.&#39; name=&#39;description&#39;/&gt;
&lt;meta content=&#39;iCloud Integration, iCloud development, iCloud sample code, iCloud start, iCloud tutorial, iPhone,iPad, iOS 5.0,Document sharing, iCloud, iPhone development,How to integrate iCloud, Apple, Xcode 4.0, Lion OS&#39;, icloudstore, stringforkey, icloud status, nsubiquitouskeyvaluestore, core data, com.apple.developer.ubiquity-kvstore-identifier, nsubiquitouskeyvaluestore stringforkey  name=&#39;keywords&#39;/&gt;
&lt;meta content=&#39;Pragnesh Dixit, Faqden,Faqden labs&#39; name=&#39;author&#39;/&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
In Apple&#39;s recent release iOS 5.0, major feature is iCloud service. iCloud is the service for sharing data of your application which is running in different devices. iCloud service can be use in application many different ways i.e. data sharing (where you can set values on key like for application NSUserDefaults), Document sharing and database sharing by using core data.
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
For iCloud integration, you must have Xcode 4.2 with iOS 5.0 device. &lt;b&gt;You can not test this feature in iPhone/iPad Simulator.&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div&gt;
Here is the some easier steps for data sharing :&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Create application specific (i.e. com.your company.applicationname) apple id from&amp;nbsp;&lt;a href=&quot;http://developer.apple.com/iPhone&quot;&gt;Apple Developer Portal&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Enable iCloud service for that App ID and create provisioning profile and install it on your mac.&lt;/li&gt;
&lt;li&gt;Create new project in Xcode with same app Id earlier created.&lt;/li&gt;
&lt;li&gt;Select target of application, click on summary and scroll down to&amp;nbsp;Entitlement&amp;nbsp;section. Click on custom entitlements.&lt;/li&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguown12Oyx-19fZ6TzBAtDg5xoj0bKEvb1ZwR4RD9-yIvOFcRGmRINfYSSH2BuVbqD6pkAKhMOf3RwqNfcUJvxl160lhyIQORxO3lmKlfnIBOlO9RKRy77_FcNN8_ZiTvHTj8svQ_6Oyc/s1600/Screen+shot+2011-10-16+at+9.56.21+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;278&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguown12Oyx-19fZ6TzBAtDg5xoj0bKEvb1ZwR4RD9-yIvOFcRGmRINfYSSH2BuVbqD6pkAKhMOf3RwqNfcUJvxl160lhyIQORxO3lmKlfnIBOlO9RKRy77_FcNN8_ZiTvHTj8svQ_6Oyc/s400/Screen+shot+2011-10-16+at+9.56.21+AM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;li&gt;Above action will add &quot;$ProjectName.Entitlement&quot; file in your project. Add following keys in entitlement.&lt;br /&gt;
com.apple.developer.ubiquity-container-identifiers as array&lt;br /&gt;
com.apple.developer.ubiquity-kvstore-identifier as string&lt;/li&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_0iG-4UHfauu-v1zBjrBbPU7KJ7kicCyj0cFwXSfTDvpfkGGDmr-HXBSdvHdT17YYMN42rilIVn39NLrILcIoUt8nGHkp23GsUo7M7HKGO75oHdZ0MwRi-WK7VLA0QKOJWHA_yXHcQ4g/s1600/Screen+shot+2011-10-16+at+10.13.00+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;155&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_0iG-4UHfauu-v1zBjrBbPU7KJ7kicCyj0cFwXSfTDvpfkGGDmr-HXBSdvHdT17YYMN42rilIVn39NLrILcIoUt8nGHkp23GsUo7M7HKGO75oHdZ0MwRi-WK7VLA0QKOJWHA_yXHcQ4g/s640/Screen+shot+2011-10-16+at+10.13.00+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;li&gt;&amp;nbsp;Now add valur for key with $&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;TeamID&lt;/span&gt;.com.yourcompany.applicationName. Don&#39;t bother about TeamID. There are two ways to find Team ID. First, open provisioning profile into &quot;TextEdit&quot;, you will find as below image. You can also find Team Id from&amp;nbsp;&lt;a href=&quot;https://developer.apple.com/membercenter/index.action#accountSummary&quot;&gt;member center -&amp;gt; Account Info&lt;/a&gt;.&lt;/li&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;Provisioning Profile &lt;/b&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-eFRNuzR5u4gUL78hmZvXRR8ouXcRvvy8VHp6MPWBVkGj7cMM0yYiKBfMQSTUz-ZUJyysXGvAw4tUSshJhhbJlyTrry1-93MPtduz40MHJPumvuE4wUphrlKFGc-6bRDIshuFRZJzvq0/s1600/provision.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;219&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-eFRNuzR5u4gUL78hmZvXRR8ouXcRvvy8VHp6MPWBVkGj7cMM0yYiKBfMQSTUz-ZUJyysXGvAw4tUSshJhhbJlyTrry1-93MPtduz40MHJPumvuE4wUphrlKFGc-6bRDIshuFRZJzvq0/s320/provision.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;Member Center&lt;/b&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhReBxHblU1l8UWP_xLHesf1or1L2EXQwXcDI9hK4uEDcZV2U0bTEY9qaC9faqQL4V8UCTi4PkMfliWMWGQzLFemN0WIHMhtTOyaiOIMxpAbp-4smDoqDhhMaHzNt8j3TLkyR7FaEtv1wA/s1600/member+center.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;153&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhReBxHblU1l8UWP_xLHesf1or1L2EXQwXcDI9hK4uEDcZV2U0bTEY9qaC9faqQL4V8UCTi4PkMfliWMWGQzLFemN0WIHMhtTOyaiOIMxpAbp-4smDoqDhhMaHzNt8j3TLkyR7FaEtv1wA/s320/member+center.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;li&gt;That&#39;s it from configuration side, Now you can add code &lt;br /&gt; &lt;br /&gt; 
NSFileManager *fileManager = [NSFileManager defaultManager];&lt;br /&gt; 
NSURL *iCloudURL = [fileManager URLForUbiquityContainerIdentifier:@&quot;$TeamID.com.yourcompany.applicationname&quot;];&lt;br /&gt; 
NSLog(@&quot;%@&quot;, [iCloudURL absoluteString]);&lt;br /&gt;&lt;br /&gt;  /&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #274e13;&quot;&gt;/iCloudURL  == nil if iCloud is not supported or enable.&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;
if(iCloudURL){&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NSUbiquitousKeyValueStore *iCloudStore = [NSUbiquitousKeyValueStore defaultStore];&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [iCloudStore setString:@&quot;Success&quot; forKey:@&quot;iCloudStatus&quot;];&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [iCloudStore synchronize]; // For Synchronizing with iCloud Server&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(@&quot;iCloud status : %@&quot;, [iCloudStore stringForKey:@&quot;iCloudStatus&quot;]);&lt;br /&gt;
}&lt;br /&gt; 

&lt;/li&gt;
&lt;li&gt;You can also verify data storage from iPhone Settings -&amp;gt; iCloud -&amp;gt; Storage &amp;amp; Backup -&amp;gt; Manage Storage. Also, In Mac -&amp;gt; System Preference -&amp;gt; iCloud -&amp;gt; Manage Storage.&lt;/li&gt;
&lt;/ol&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;/ol&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRI3wC9cB0g_DD51wOB6T5q3-VcwyGNIVs3eFdjNEO6t0zAr_7ZCsDScFaZ7FF7Jgt_G1wL14g_WUpQcGF1tgEhIws5-iXadeYmmmdfDIckNJIwm5Gj3PIRPWGbOqhDnQDwzSs8qZKekY/s1600/download.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRI3wC9cB0g_DD51wOB6T5q3-VcwyGNIVs3eFdjNEO6t0zAr_7ZCsDScFaZ7FF7Jgt_G1wL14g_WUpQcGF1tgEhIws5-iXadeYmmmdfDIckNJIwm5Gj3PIRPWGbOqhDnQDwzSs8qZKekY/s320/download.png&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/ol&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;/ol&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://icloudintegration.blogspot.com/feeds/3153332738996600724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://icloudintegration.blogspot.com/2011/10/data-sharing-on-icloud.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1933638537299613548/posts/default/3153332738996600724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1933638537299613548/posts/default/3153332738996600724'/><link rel='alternate' type='text/html' href='http://icloudintegration.blogspot.com/2011/10/data-sharing-on-icloud.html' title='Data Sharing on iCloud from iPhone/iPad with iOS 5.0'/><author><name>Pragnesh Dixit</name><uri>http://www.blogger.com/profile/08016771699141725132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguown12Oyx-19fZ6TzBAtDg5xoj0bKEvb1ZwR4RD9-yIvOFcRGmRINfYSSH2BuVbqD6pkAKhMOf3RwqNfcUJvxl160lhyIQORxO3lmKlfnIBOlO9RKRy77_FcNN8_ZiTvHTj8svQ_6Oyc/s72-c/Screen+shot+2011-10-16+at+9.56.21+AM.png" height="72" width="72"/><thr:total>5</thr:total></entry></feed>