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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:00:41+00:00 2026-05-28T07:00:41+00:00

I am new to iOS development so please bear with me. I have created

  • 0

I am new to iOS development so please bear with me. I have created an application that uses the CoreData framework and I have been following the tutorial on Apple’s website. I have an AppDelegate file with the Context, Object, and the PersistantStore. A RootViewController, and a SubViewController that the RootViewController calls on with a Context and a fetchedResultsController. In my ModelData I have 4 string attributes which I use to store basic user information regarding their session.

What I am trying to do is when the user exits the program their past information gets removed and the new information is to be saved. I just want 1 entry saved at all times. The issue is that when I get to the save I get a SIGABRT being thrown for some reason. When I placed a try catch around the save then I am able to see the data the next time I try a save. However, when I restart the application the session information is no longer there.

Is there any good advice that anyone can bestow on me?

EDIT

-(void)UpdateSession
{
    // Delete all records
    NSFetchRequest *request = [[NSFetchRequest alloc] init];
    NSEntityDescription *entity = [NSEntityDescription entityForName:@"Session" inManagedObjectContext:managedObjectContext];
    [request setEntity:entity];

    NSError *error = nil;
    NSArray *items = [managedObjectContext executeFetchRequest:request error:&error];
    [request release];

    // Create and store a new session
    Session *newSession = (Session *)[NSEntityDescription insertNewObjectForEntityForName:@"Session" inManagedObjectContext:managedObjectContext];

    // Set the data
    [newSession setMap:@"TestMap"];
    [newSession setLayout:@"Top"];
    [newSession setSpeed:@"3"];
    [newSession setCamera:@"1"];
    error = nil;

    if(![managedObjectContext save:&error])
    {
        NSLog("Error");
    }
}
  • 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-05-28T07:00:42+00:00Added an answer on May 28, 2026 at 7:00 am

    I figured out the answer after looking at other core data tutorials. What was weird is that I had to create a local copy of the database and then move it over into the iOS application and that seemed to work. Which is odd since the iOS application should create the store file and read and write directly from it. Not sure if it was an issue with permissions or what not, but it seems that all is able to run properly.

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

Sidebar

Related Questions

I'm very new with iOS Development and I have just created one of my
I am new to iOS development. I had created an iOS application. In my
I'm relatively new to iOS development and I have a question that I'm sure
I am new to ios app development.could you please tell me how to download
I'm new to iOS development so I'm confused. I have a ViewController, in this
We are new to iOS development and this is our first application for iPad
I'm new at iOS development. I have two table views and a content detail
Since I am new to iOS development I have a few Questions. Firstly I
Just to preface, I am new to iOS development. I have looked around for
I am new in ios development. I have a UITextField. There I set a

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.