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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:55:04+00:00 2026-05-20T20:55:04+00:00

I renamed my project.. and step by step I renamed all the targets, AppDelegate

  • 0

I renamed my project.. and step by step I renamed all the targets, AppDelegate classes etc. Anyway it builds now but crashes as it can’t find the .momd in the below code:

NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"MyApp" withExtension:@"momd"];

How do I get it to ‘refresh’ or build this momd file again? I have read various potential solutions involving adding a version on the .xdatamodeld file but heres the other thing.

When I click on the .xdatamodeld file it doesn’t open up the editor anymore. It just does nothing. Right click bring me zero options.

I tried deleting the xdatamodeld file and creating a new one, but it has the same problem. When I press on it it doesn’t open the editor.

When I create a brand new core data xcode project template, it does open the editor when I press on it. What am I doing wrong here?

  • 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-20T20:55:04+00:00Added an answer on May 20, 2026 at 8:55 pm

    I’m still using Xcode 3, but when I double-click an .xdatamodeld file, it just opens the organizer. If I double-click an .xdatamodel file, it launches the project. This is probably because the xdatamodeld a folder, not a single file. It sounds like your problem is that the project file has lost its tracking to the mom you’re using.

    Here are some notes I made during past troubleshooting:

    • Troubleshooting dbase access — getting the right mom:
    • The first thing to suspect is that the managedObjectContext is not pointing to the correct data model (or managed object model, “mom”). (Actually, you are probably using the type:@“momd”, but it’s the target mom that’s been lost.)
    • In your app delegate, look for the accessor method managedObjectModel (created by Xcode when you stipulated Core Data store upon creating the project). Put a breakpoint in this method at the line that returns the mom.
    • Execute the program, and when it hits the breakpoint, go to the debugger model, and type “po” followed by the name of the mom variable being returned. (This is gdb’s “print object” command.)
    • What prints out will include “entities {” followed by a description of the entities in your data model. If nothing follows the brace, a blank mom is being returned — you’re not accessing the correct data model.
    • If clicking on the xcdatamodel in Xcode shows the full data model as expected, is it enclosed in an xcdatamodeld? That’s a sort of bundler/router/path file, and it may have lost its way. Do this:
      – First, is the current xcdatamodel, the one with the green check icon, the first one? If not, drag it into first place, then test the app again.
      – In Finder, make a copy of your xcdatamodel elsewhere for safekeeping.
      – Get rid of the xcdatamodeld, in Finder and/or Xcode (I’m not sure which order I did this in). When done, it should not appear in Xcode.
      – Drag the xcdatamodel (the one in the project folder) from the Finder to Xcode’s Groups & Files pane for the project, and choose the option that makes a copy for the project.
      – Select the xcdatamodel, Design>DataModel>AddModelVersion. Now you should have a new xcdatamodeld file.
      – Run the test again, doing the gdb print object command at breakpoint. Hopefully you’ll get a nice long printout, representing your data model.
      – In future, avoid grouping the xcdatamodel/d files into a folder in Xcode. That seems to confuse things.
    • Examining the contents of the xcdatamodel/d files in Finder:
      These are actually folders in disguise, as you will see if you remove their extensions. The guts of the data model is a plist, which you can open by double-clicking.
      If you do this, test your app afterward and make sure it is still able to access your database. If not, follow the steps above.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In NetBeans 6.7.1, I had a Java project in which I renamed some classes.
I renamed my Xcode project, now it is saying that I will lose changes
I renamed my project from MyProjectName to MyNewProjectName. I did a complete find/replace on
I copied an existing project and renamed the folder. Now I get this error
I want to deploy my application. i followed this step but i can't get
I renamed my project and it's files and now Xcode is still looking for
Can AppHarbor applications be renamed more than once? I've added a new project, then
I want to measure API evolution for a given Java project, in particular new/renamed
I renamed 3 columns of a table and suddenly ALL of my unit and
I just renamed my project and also in the project.pbxproj renamed my product to

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.