NimbleKit - fast iOS app development

Save file as "do not backup"

Ask questions and share your skills here

Save file as "do not backup"

Postby limeduke » Wed Nov 23, 2011 12:13 am

Hello,

I sent my app for approval but got rejected. By following reason:
"We found that your app does not follow the iOS Data Storage Guidelines, which is not in compliance with the App Store Review Guidelines.

In particular, we found that your application is storing downloaded articles to the wrong directory.."

My app is a magazine, you can download PDF files which is stored in the /Documents folder so the reader can read our issues without any internet connection. This is where the app got rejected. They want me to store the file as "do not backup".

https://developer.apple.com/library/ios ... index.html

How is this possible with Nimblekit?
limeduke
 
Posts: 11
Joined: Mon Apr 11, 2011 8:27 am

Re: Save file as "do not backup"

Postby cactuscraig » Wed Nov 23, 2011 1:49 am

Seems you need to set a flag on the file (attribute). This will require some ObjC mix. This looks like a fairly easy tasks to overcome - look at the NK Blueprint. There is something in there that checks if a URL can be opened. This can likely be modified to set an attribute on a file.
I do not have time now - but can likely check this out tomorrow.
User avatar
cactuscraig
 
Posts: 846
Joined: Thu Feb 03, 2011 5:15 pm
Location: Scottsdale, AZ

Re: Save file as "do not backup"

Postby limeduke » Wed Nov 23, 2011 9:08 am

Thank you for your quick reply, looking forward for your help! :)

I must admit that I have no knowledged about ObjC or ObjC mix. About the "do not backup", as far as i know this is something Apple changed lately due to iCloud?

But if this App was rejected for this reason, it feels like many Nimblekit apps would be rejected with the same reason, or am I wrong?

This might be a thing to add in the next update, example:

download.start("nimblekit.dmg", 1);

1 = do not backup
0 = save as user-created data

EDIT: miss spelling
limeduke
 
Posts: 11
Joined: Mon Apr 11, 2011 8:27 am

Re: Save file as "do not backup"

Postby cactuscraig » Wed Nov 23, 2011 4:52 pm

if an app does not use the download feature - it is likely not a problem. I am in the midst of working out the obj c mix right now. hopefully will get it right.
User avatar
cactuscraig
 
Posts: 846
Joined: Thu Feb 03, 2011 5:15 pm
Location: Scottsdale, AZ

Re: Save file as "do not backup"

Postby cactuscraig » Wed Nov 23, 2011 5:48 pm

Not sure if this is working or not. I do not know how to check if File Attribute is actually set. I always get TRUE - even if the file does not exist.
Hopefully this will help you.

Attribute on File.zip
revised.
(65 KiB) Downloaded 80 times
User avatar
cactuscraig
 
Posts: 846
Joined: Thu Feb 03, 2011 5:15 pm
Location: Scottsdale, AZ

Re: Save file as "do not backup"

Postby limeduke » Wed Nov 30, 2011 8:31 pm

Just wanted to let you know that the app was accepted today! Thank you very much cactuscraig! :)
limeduke
 
Posts: 11
Joined: Mon Apr 11, 2011 8:27 am

Re: Save file as "do not backup"

Postby cactuscraig » Wed Nov 30, 2011 10:48 pm

This is so awesome - glad it worked!
User avatar
cactuscraig
 
Posts: 846
Joined: Thu Feb 03, 2011 5:15 pm
Location: Scottsdale, AZ

Re: Save file as "do not backup"

Postby floz » Thu Dec 08, 2011 12:14 pm

What about older versions of iOS, which don't have this flag? Have a look at the first boxed paragraph in Apple's Guidelines you linked to. I try, for now at least, to have my app backwards compatible up to iOS 3.1.3. Does that mean I now have to worry about that stuff to? I'm using the download feature to fetch an "over the air" update of the database used in my app...
User avatar
floz
NimbleKit Guru
 
Posts: 261
Joined: Sat Feb 05, 2011 2:07 pm
Location: Newcastle, Australia

Re: Save file as "do not backup"

Postby limeduke » Thu Dec 08, 2011 12:25 pm

I dont really know about databases, but i mostly think they reject it because of space restrictions. Our PDFs are about 1-3 mb in size and we have around 800 articles in our journal :P If you save around 20 articles or more to the iPad, it would take "alot" of space to back it up.

I might be wrong since they just changed these guidelines, but i think an sqlite database is nothing compared to PDF files.
limeduke
 
Posts: 11
Joined: Mon Apr 11, 2011 8:27 am

Re: Save file as "do not backup"

Postby floz » Thu Dec 08, 2011 12:36 pm

I see, mine's only like 300kb and only one file, i.e. it gets overwritten each time, rather than added to.
User avatar
floz
NimbleKit Guru
 
Posts: 261
Joined: Sat Feb 05, 2011 2:07 pm
Location: Newcastle, Australia

Next

Return to How To...

Who is online

Users browsing this forum: Google [Bot] and 0 guests