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 7985075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:28:09+00:00 2026-06-04T11:28:09+00:00

My iPhone application contains approx 500 MB data. and application will use this data

  • 0

My iPhone application contains approx 500 MB data. and application will use this data offline. So i mark the folder to do not backup/copy on iTunes. so i am using below url :
https://gist.github.com/1999985

But it says ‘NSURLIsExcludedFromBackupKey’ undeclared. and i also tried to used https://developer.apple.com/library/ios/#qa/qa1719/_index.html
but i always return false..

So please let me know how it will works??

Thx

  • 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-04T11:28:10+00:00Added an answer on June 4, 2026 at 11:28 am

    NSURLIsExcludedFromBackupKey should compile fine on 5.1+ SDK.
    As the key is not available for 5.0, the following snippet could act as a workaround.

    if (SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(@"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;
    }          
    if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"5.1"))
    {
        NSError *error = nil;
        //[URL setResourceValue:[NSNumber numberWithBool:YES] forKey:NSURLIsExcludedFromBackupKey error:&error];
        [URL setResourceValue:[NSNumber numberWithBool:YES] forKey:@"NSURLIsExcludedFromBackupKey" error:&error];
        return error == nil;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My table column contains following sample data: /Users/abct2/Library/Application Support/iPhone Simulator/4.3/Applications/FD301781-D39F-469E-A604-8164CC9A4493/Library/Caches/List3-ROHAN TEST1/word_306:24:50.jpg Now, I want
I'm developing an iPhone application that's particularly large, and contains loads of videos. (Not
I'm trying to create a simple data entry application for the Mac (not iPhone).
I'm programming an iPhone application. This application contains a home page, which I would
I am developing an iPhone application that contains audio and PDF files. Will Apple
What type of iPhone application file should I use? Before, I was trying to
I am developing an iPhone application in which I am fetching data from a
I am writing an iPhone application, which contains a function. It can convert the
I post this topic because I have a problem with my iPhone application since
I have developed one application in iPhone which contains videos. Now I want to

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.