Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8037893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:03:40+00:00 2026-06-05T03:03:40+00:00

In my app i have to store Core Data Database and audio files, so

  • 0

In my app i have to store Core Data Database and audio files, so i decoded to put them in Documents directory.
To prevent them from backing up, when i first launch the app, i put the Don’t BackUp flag like this

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
 [self addSkipBackupAttributeToItemAtURL:[self applicationDocumentsDirectory]];
}
    - (NSURL *)applicationDocumentsDirectory
{
    return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
}
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL
{
  if (&NSURLIsExcludedFromBackupKey == nil) { // iOS <= 5.0.1
    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;
  } else { // iOS >= 5.1
    return [URL setResourceValue:[NSNumber numberWithBool:YES] forKey:NSURLIsExcludedFromBackupKey error:nil];
  }
}

But it seems like it doesn’t work – i still get rejected:

We found that your app does not follow the iOS Data Storage Guidelines, which is required per the App Store Review Guidelines.

In particular, we found that on launch and/or content download, your
app stores 3.6 MB. To check how much data your app is storing:

  • Install and launch your app
  • Go to Settings > iCloud > Storage & Backup > Manage Storage
  • If necessary, tap “Show all apps”
  • Check your app’s storage

And the other problem is that i just can’t check that – i don’t see my app in

Settings > iCloud > Storage & Backup > Manage Storage

Maybe the problem is only with 5.0 that i kind of not think about here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T03:03:41+00:00Added an answer on June 5, 2026 at 3:03 am

    The problem is with iOS 5.0, in this iOS you should not put the dont backup flag
    The dont back up flag was introduced in ios 5.0.1
    We did face similar problem with our app, it has been rejected several times
    So we had to do a work around to handle different iOSes
    We needed to support iOS < 5.0, iOS 5.0, and iOS > 5.0

    So after contacting apple, we didnt find any solution except to have different paths on different iOSes

    We had a function like this:

    + (NSString*) savePath
    {
        NSString *os5 = @"5.0";
    
        NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
        NSString *path = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
    
        if ([currSysVer compare:os5 options:NSNumericSearch] == NSOrderedAscending) //lower than 4
        {
            return path;
        }
        else if ([currSysVer compare:os5 options:NSNumericSearch] == NSOrderedDescending) //5.0.1 and above
        {        
            return path;
        }
        else // IOS 5
        {
            path = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches"];
            return path;
        }
    
        return nil;
    }
    

    We used and still use this function.

    Please read more

    iOS 5.0

    It is not possible to exclude data from backups on iOS 5.0. If your
    app must support iOS 5.0, then you will need to store your app data in
    Caches to avoid that data being backed up. iOS will delete your files
    from the Caches directory when necessary, so your app will need to
    degrade gracefully if it’s data files are deleted.

    http://developer.apple.com/library/ios/#qa/qa1719/_index.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Core Data-based iPhone app with a pre-populated read-only database. What protection
In my app, I have a UITableViewController which loads calculated data from my Core
Ok, so I have multiple threads pull data from the persistent store (SQLite database)
I have an iOS app on App Store that utilized Data Core with SQLite
I have an App in which I record the sound files and store it
I have a new app that I made and put in the store yesterday.
I have a Core Data app that will end up being an iPhone/iPad universal
I have been working on a Core Data iOS app that works perfectly through
I have an app that fetches data from the internet and uses CoreData to
When using an SQLite persistent data store does Core Data have any kind of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.