Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-02-2012, 11:15 AM   #1 (permalink)
Registered Member
 
Join Date: Feb 2012
Posts: 3
DJFrail is on a distinguished road
Default Keeping important files in iCloud

I'm working on an iOS app and currently adding iCloud support. I'd like for the user to do some 'stuff,' save that 'stuff' in a file, and sync that file to the other devices over icloud. The tutorials I've seen to do this recommend using "setUbiquitous" on the files you want to sync to iCloud, which removes them from your app's sandbox directory (the 'documents' directory, in my case) and places them in an iCloud container directory where a daemon shuffles them off to iCloud and everything stays in sync.

But - now the user's 'stuff' file is exposed to be deleted off of icloud, which also deletes it off all of the iDevices. On the iDevice, anybody can go to settings/icloud/storage&backup/manage storage/theApp and delete the file. If they were to do that, it would be lost for good.

So I'm wondering - is this standard procedure - to just let people have the opportunity to, perhaps mistakenly, delete these possibly critical files out of iCloud?

So I'm not sure what the right thing is to do here... Do you just let people delete those files and be screwed? Do you always keep a copy of important files somewhere in the app sandbox? I'm curious to hear how other people are handling (or not handling) this situation.

Thanks!
DJFrail is offline   Reply With Quote
Old 02-02-2012, 11:19 AM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

It sounds pretty logical to keep a backup copy in the sandbox. Don't depend on your users to not screw things up.
smithdale87 is offline   Reply With Quote
Old 02-03-2012, 10:26 AM   #3 (permalink)
Registered Member
 
Join Date: Feb 2012
Posts: 3
DJFrail is on a distinguished road
Default

What do you think would be the best way to go about making that backup copy? I'm thinking:


a) If the user isn't using iCloud, then no problem. They can't delete the important 'stuff' file through the settings/icloud/manage storage. And that file is safely in the documents folder in app sandbox.

b) If they are using iCloud, then that important 'stuff' file is in the iCloud container. Any local or iCloud updates change that container file.

So it seems that if I want an up to date backup copy, it needs to come from that iCloud container file.



So what would the best way to safely copy a file from the iCloud container to the local app documents directory? Any sample code anywhere?



Thanks again!
DJFrail is offline   Reply With Quote
Reply

Bookmarks

Tags
icloud, setubiquitous

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 415
16 members and 399 guests
Atatator, chiataytuday, dre, FrankWeller, imac74, ipodphone, jeroenkeij, kukat, LunarMoon, MAMN84, n00b, PowerGoofy, QuantumDoja, Retouchable, tim0504, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,675
Threads: 94,124
Posts: 402,909
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Retouchable
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:04 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0