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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:45:54+00:00 2026-06-10T05:45:54+00:00

I am developing an app that uses Core Data. In iOS 5, I don’t

  • 0

I am developing an app that uses Core Data. In iOS 5, I don’t have any problem.

However, in iOS 4, when I try to save any information I get an error message (more exactly: Cocoa error 134030, and “No such file or directory”). When I look in the documents folder, the SQL file is not there. I already debugged this, and none of these methods there cause errors or nil pointers.

The strangest part: the method addPersistentStoreWithType doesn’t return any error, but at the same time, the sqlite file is not created.

In one line, my app is not creating the sql file in the documents folder. Again, this happens only in iOS 4.

Why does my app not create the sqlite file on iOS 4?

//Core Data stack

- (NSManagedObjectContext *)managedObjectContext
{

NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator];
if (coordinator != nil)
{
    __managedObjectContext = [[NSManagedObjectContext alloc] init];
    [__managedObjectContext setPersistentStoreCoordinator:coordinator];
}

return __managedObjectContext;
}

- (NSManagedObjectModel *)managedObjectModel
{
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"Practi" withExtension:@"momd"];
__managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];

if (__managedObjectModel == nil)
{
    NSLog(@"NSManagedObjectModel in AppDelegate == nil");
}

return __managedObjectModel;
}

- (NSPersistentStoreCoordinator *)persistentStoreCoordinator
{

NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"MyAppDataBase.sqlite"];
NSError *error = nil;
__persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
if (![__persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error])
{

    NSLog(@"APPDELEGATE Unresolved error %@, %@", error, [error userInfo]);
}

return __persistentStoreCoordinator;
}

- (NSURL *)applicationDocumentsDirectory
{
NSString *docsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
return [NSURL fileURLWithPath:docsDirectory];
}
  • 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-10T05:45:56+00:00Added an answer on June 10, 2026 at 5:45 am

    I discovered what solved the problem:

    When each method above written was called, I was creating again the objects, instead of checking if it already existed to return. So, as the code is now, it is working also in iOS 4.

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

Sidebar

Related Questions

I'm developing an app that uses Core Data for save and retrieve data. Now
I'm currently developing an app that uses Core Data. I'm using two stores/configurations, one
I'm developing an iphone app that uses Core Data with a SQLite data store
I'm developing a Core Data app that uses a model object called Location. The
I'm thinking of developing an app that uses Microsoft Push Notification. However, I'm not
We developing a iOS app that uses CoreData. To keep ourselves from going crazy
I'm developing web-application (and also native iOS app) that uses images from different websites.
I´m developing an ASP.NET MVC app that uses EF 4.1 Code First. I have
I have an app that I'm developing that uses AccountManager to get credentials for
Developing an app that uses data synchronization. Sending images (even resized) takes time if

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.