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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:16:03+00:00 2026-06-14T20:16:03+00:00

my application rejected due to this issue : https://i.stack.imgur.com/EwGTF.png My application is a dictionary

  • 0

my application rejected due to this issue :

https://i.stack.imgur.com/EwGTF.png

My application is a dictionary which uses SQL DBs , with bookmarking and etc …

so I copied this code from Apple docs in appDelegate.m :

- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL
{
    assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]);

    NSError *error = nil;
    BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES]
                                  forKey: NSURLIsExcludedFromBackupKey error: &error];
    if(!success){
        NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error);
    }
    return success;
}

but used like this :

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

    [self addSkipBackupAttributeToItemAtURL:[NSURL URLWithString:@"<myApplication>/Library/Caches"]];
}

but crashes with this reason :

Assertion failed: ([[NSFileManager defaultManager] fileExistsAtPath:
[URL path]]), function -[AppDelegate
addSkipBackupAttributeToItemAtURL:], file /iData/Development 2011/My
iPhone Project/APPNAME/APPNAME/AppDelegate.m, line 27.

According to that picture is this my only problem for rejection ? because this is my first time I work with data base .

Thanks .
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

EDITED :

- (NSString *) getDBPath
{
    NSInteger kValue = [[[NSUserDefaults standardUserDefaults] stringForKey:@"Bv"] intValue];

    NSString *documentsDir = [[NSString alloc] init];
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory , NSUserDomainMask, YES);
    documentsDir = [paths objectAtIndex:0];


    switch (kValue) {

            case 0:
            documentsDir = [NSString stringWithFormat:@"%@/eng-per.sqlite", documentsDir];
            break;
        case 1:
            documentsDir = [NSString stringWithFormat:@"%@/eng-per.sqlite", documentsDir];
            break;

        case 2:
            documentsDir = [NSString stringWithFormat:@"%@/per-eng.sqlite", documentsDir];
            break;
}

return documentsDir

}

and then changed to this in app delegate.m :

[self addSkipBackupAttributeToItemAtURL:[NSURL fileURLWithPath:dbClass.getDBPath]];

now app lunches fine without crash

  • 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-14T20:16:04+00:00Added an answer on June 14, 2026 at 8:16 pm

    Your app is “crashing” because you’re hitting that assert on line:

    assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]);
    

    And I suspect your problem is actually in how you are setting up the URL:

    [NSURL URLWithString:@"<myApplication>/Library/Caches"];
    

    How are you getting the path to “<myApplication>“?

    You need to get your application’s true Cache’s folder, which you can do via:

    [NSFileManager defaultManager] URLsForDirectory:NSCachesDirectory inDomains:NSUserDomainMask]; (for the location passed back via file URL’s)

    or

    NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); (for the path in the form of a NSString)

    So ultimately, what you need to do is not assert if the key has already been set in defaults and you need to properly set the file URL for the file you’re saving.

    Create your URL (a file URL, to be precise) using something like:

    NSArray * arrayOfURLs = [[NSFileManager defaultManager] URLsForDirectory:NSCachesDirectory inDomains:NSUserDomainMask];
    // make certain there's at least one file url returned by the above call
    if([arrayOfURLs count] > 0)
    {
        // and this would just be the URL to the cache directory...
        NSURL * cacheDirectoryPath = [arrayOfURLs objectAtIndex: 0];
    
        // ... to create a file url to your actual dictionary, you'd need to add a
        // filename or path component.
    
        // Assuming you save this as a property within your object
        self.cacheFileURL = [cacheDirectoryPath URLByAppendingPathComponent: @"myDatabase.db"];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Application : HTA (therefore IE) This is an application that uses SendKeys to populate
I have developed an iPhone application that was rejected. With this application I offer
This is second consecutive time that apple has rejected my application citing the following
I recently uploaded an application that got rejected by Apple due to in-app purchases,
Application rejected due to do not back up reason I tried one thing to
My application was rejected because it is crashing on iPhone 3G running iPhone OS
I submitted my application to apple for review.Apple rejected and gave me the following
My application was rejected from Apple today.Apple says that the video stream should be
So my first official application got rejected as it was crashing on iOS 4.0
I have developed an iPad application with portrait orientation, but my application was rejected

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.