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

  • Home
  • SEARCH
  • 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 8752573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:15:45+00:00 2026-06-13T13:15:45+00:00

Hello i have created a Simple Application with Core Data and OS X 10.8,

  • 0

Hello i have created a Simple Application with Core Data and OS X 10.8, it’s the simple template that xcode create, but if i change the Base SDK to 10.7 xcode give me this error on this method in App Controller:

- (NSPersistentStoreCoordinator *)persistentStoreCoordinator
{
    if (_persistentStoreCoordinator) {
    return _persistentStoreCoordinator;
}

NSManagedObjectModel *mom = [self managedObjectModel];
if (!mom) {
    NSLog(@"%@:%@ No model to generate a store from", [self class], NSStringFromSelector(_cmd));
    return nil;
}

NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *applicationFilesDirectory = [self applicationFilesDirectory];
NSError *error = nil;

NSDictionary *properties = [applicationFilesDirectory resourceValuesForKeys:@[NSURLIsDirectoryKey] error:&error];

if (!properties) {
    BOOL ok = NO;
    if ([error code] == NSFileReadNoSuchFileError) {
        ok = [fileManager createDirectoryAtPath:[applicationFilesDirectory path] withIntermediateDirectories:YES attributes:nil error:&error];
    }
    if (!ok) {
        [[NSApplication sharedApplication] presentError:error];
        return nil;
    }
} else {
    if (![properties[NSURLIsDirectoryKey] boolValue]) {
        // Customize and localize this error.
        NSString *failureDescription = [NSString stringWithFormat:@"Expected a folder to store application data, found a file (%@).", [applicationFilesDirectory path]];

        NSMutableDictionary *dict = [NSMutableDictionary dictionary];
        [dict setValue:failureDescription forKey:NSLocalizedDescriptionKey];
        error = [NSError errorWithDomain:@"YOUR_ERROR_DOMAIN" code:101 userInfo:dict];

        [[NSApplication sharedApplication] presentError:error];
        return nil;
    }
}

NSURL *url = [applicationFilesDirectory URLByAppendingPathComponent:@"SimpleApp.storedata"];
NSPersistentStoreCoordinator *coordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:mom];
if (![coordinator addPersistentStoreWithType:NSXMLStoreType configuration:nil URL:url options:nil error:&error]) {
    [[NSApplication sharedApplication] presentError:error];
    return nil;
}
_persistentStoreCoordinator = coordinator;

return _persistentStoreCoordinator;
}

i receive this error:

enter image description here

how i can do?

  • 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-13T13:15:47+00:00Added an answer on June 13, 2026 at 1:15 pm

    This is actually not a problem with Core Data, but this is having to do with object subscripting. In order for these literals to work correctly, your SDK needs to be at least OS X 10.8 or iOS 6.

    If there is no other way, you can still use subscripting and keep your SDK to 10.7 by adding a stub header to a category on NSObject that implements the required methods. You can see one such example here. I’d advise keeping your SDK on 10.8, however.

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

Sidebar

Related Questions

I have created a simple hello world application in xcode using the command line
I have created a simple Hello World Application using Flash Builder Burrito SDK. I
I have created a simple command line tool that outputs hello world. This is
I have created a simple vc++ console application and try to print Hello World.
I have created a simple RMI application, that just send a message to RMI
hello i have created one windows application in c# .net and its working fine
I have a simple RESTful web service that print Hello World ! I'm using
I`m trying to create simple QML application. I have QtSDK installed with latest QtCreator.
Hello i have created a sample application in android using eclipse IDE my code
I have created a paid application and I'm trying to create the free with

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.