I was really surprised when one of my apps was rejected by Apple when all I did was update the icon and the app have past previous reviews with flying colors. It seems like there's a new rule about data you store in the /Documents folder.
All files in the Documents folder are backed up to iCloud and such files that can be re-downloaded or re-created should not be stored there. For obvious reasons, to not waste those precious 5 GB we have by default. However, if you put your data in Caches folder or tmp folder, it might be deleted in low storage situations so there is a new solution from iOS 5.0.1.
This allows you to put files that you generate, like a read-only database, to the Documents folder without having it backed up to iCloud.
Here's a snippet from
iOS Developer LibraryQ: My app has a number of files that need to be stored on the device permanently for my app to function properly offline. However, those files do not contain user data and don't need to be backed up. How should I store those files in iOS 5?
A: Starting in iOS 5.0.1 a new "do not back up" file attribute has been introduced allowing developers to clearly specify which files should be backed up, which files are local caches only and subject to purge, and which files should not be backed up but should also not be purged. In addition, setting this attribute on a folder will prevent the folder and all of its contents from being backed up.
Important The new "do not back up" attribute will only be used by iOS 5.0.1 or later. On iOS 5.0 and earlier, applications will need to store their data in <Application_Home>/Library/Caches to avoid having it backed up. Since this attribute is ignored on older systems, you will need to insure your app complies with the iOS Data Storage Guidelines on all versions of iOS that your application supports.
How to set the attribute
#include <sys/xattr.h>
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL
{
const char* filePath = [[URL path] fileSystemRepresentation];
const char* attrName = "com.apple.MobileBackup";
u_int8_t attrValue = 1;
int result = setxattr(filePath, attrName, &attrValue, sizeof(attrValue), 0, 0);
return result == 0;
}
140
180
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALMAAAAkCAIAAABNFZxfAAAKqWlDQ1BJQ0MgUHJvZmlsZQAASImVlwdQU+kWx797b3qhBSKd0HuXLr2GIh0EUQlJCKGEEAggNkQWV2AtqIiAIsiKiIJrAWQtiCi2RbD3BVlUlHWxICoq7wKP8N6bt/PmnZmT75czZ/75znfvN/MPAJR2llCYCssAkCbIEoX5ejCWxMQy8I8BDBBABuZAgcXOFLqHhASCv42PdwE0vd4yndb6+77/GrIcbiYbACgE5QROJjsN5RNo7mULRVkAIBFo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FJD09nxJFvfLyr8UDFu5Hfrf9D5fcPSkAgEAiFwsD5873T0m52dmLmTMybh3nzMHu2qaPDNy0tcP58oVDI/VTDZgXGl9SvA1ASn91ixOTX35EBOlVCyfbDOt0pzbYNNXdvZzkFk+PTAWiLFQXbD58921BV1UABkoCfyABt8eaqhrNG35cXywGo/7iyvEGna66tXLPhMOU5MhyArnRJwYbygqiE0qe2znDt3qR97+6jlw0Uy1JfNbUACBsjkQSEAHptSzvNosdsATwAuvPr6i2d8LKYWWCgAM6L6m+1p69fPbh+yYo6QAIWMLQd07ZdJfyCwid5P0wiAoFALBZLpVJRVtZ/Cgs7Kcqq1Vq12s7r19sLC4msLKlUKhaLOZ0hEQsB+M94d7tSBmhi3q9mR8+uba5KlqFUmRAVFbMws/gWA/TdLsAABJeAGJtw5bg6EVApE6ZOVaR+3gYAoyOWZcuBylRFmp72zfpSt1Ep16ryFFFRigXKEt0tEOOLmtUyQKsqzjvz641FiQDEQqELzs4wEbjyv+P0N6mKbF3/UfqHFTlzJgKGbVlJqpNA0NvHtoZ98Fp+PQCfV9Jjbn5Ro0//bH/OS+z/BHtS0VY9b4nqJoCYlIKA+vVXftNYvqBj9/I3VU19YT/ZljMr+IG5ODeuZrPZYDBYLBaapgGQJOnl5eXn5+ft7U0QxDCfhLKUsRtCIUkSxm7CH81JAQoNlDrL5knk3QKJhBjcyp2UkD9+SFMUC0IiIX887AHcSZIk+iUsbezucff1/X8/+ByAS50BgKVNFNVDw9PPb+D00BQNkiAJAqBNJlbiIyEAykSRPn2qAQKApUwUfHwkgyLTLAtiwAQ/CKc5bDabzWZjWRYAQRBisVgsFg/fFgOgWkTSGOdb+br6I/kzHjHOs42rnfHs4egHgKCfxwtJX2r9pqPLJBo9OWrK2Of1l6fn3xk8jwb/KzwPN7wzeLjhncHDDe8MHm54Z/BwwzuDhxveGTzc8M7g4YZ3Bg83vDN4uPkvjlXf1YDCp9IAAAAASUVORK5CYII=
iOS
記載されている会社名、および商品名等は、各社の商標または登録商標です。
0 コメント:
コメントを投稿