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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:23:10+00:00 2026-05-18T23:23:10+00:00

My app is still in development so I am not trying to do anything

  • 0

My app is still in development so I am not trying to do anything fancy like migrating data from one version of my data store to another. Instead I am trying to refactor my design and part of that is moving an attribute “Foo” that belonged to entity “Entity1” over to entity “Entity2”. Using the XCode data model editor, I deleted the “Foo” attribute from “Entity1”. Then I selected “Entity2” and added a new attribute with the same name, type, and other settings that “Foo” had in “Entity1”. Thus, I moved “Foo” from “Entity1” to “Entity2”. I then recreated the managed object classes for both “Entity1” and “Entity2” and confirmed that they reflected the change (“Foo” now being a dynamic property of “Entity2” and missing from “Entity1”).

Next, I went to the /Users/mike/Library/Application Support/iPhone Simulator/4.2/Applications directory and nuked the folder that contained my app to make sure that it no longer had a .sqlite file.

Next, I went to the iOS Simulator menu and chose to Reset Content and Settings.

Next, I did a Clean in Xcode.

Finally, I built and ran my app. But what I got was an InvalidArgumentException stating that “Foo” did not exists in “Entity1” id = 4!

I thought I nuked my data store? Why does my app think that there is an object of “Entity1” with an id of 4 that has the old schema?

What is the proper way to do a refactor like this in Xcode?

Please help!

  • 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-18T23:23:11+00:00Added an answer on May 18, 2026 at 11:23 pm

    Figured it out. My problem was not how I changed the data model but rather that I had a predicate that was still referring to the “Foo” attribute in “Entity1”.

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

Sidebar

Related Questions

I'm new to Grails (but not to Groovy or web development). I'm trying to
I'm still a complete beginner in the field of web development and I'm trying
I'm trying to get someone else's app up and running on my development laptop
I'm trying to follow the April 2009 and Winter 2010 Stanford iPhone app development
I am trying to push my app on heroku. I am still in dev.
We've got an app with some legacy printer setup code that we are still
I have an ASP.NET 2.0 web app and part of the structure still has
My app uses a WebRequest at certain points to get pages from itself. This
Our app (already deployed) is using an Access/Jet database. The upcoming version of our
My app needs to build a buffer from all the selected cells on 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.