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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:41:32+00:00 2026-06-11T18:41:32+00:00

I have a Core Data object, Account , represented as a subclass of NSManagedObject

  • 0

I have a Core Data object, Account, represented as a subclass of NSManagedObject:

@interface Account : NSManagedObject

My entire app has been developing just fine, however, when I add the MessageUI.framework so I can get a compose email view controller, all hell breaks loose. The app links and compiles fine, and runs just fine. Until, that is, I start interfacing with my previously working Account objects. Then, I start getting these:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: '"Account" is not a subclass of NSManagedObject.'
*** First throw call stack:
(0x202b012 ... 0x2385)
libc++abi.dylib: terminate called throwing an exception

This particular one of which was caused by:

// we need to insert a new account
Account *newAccount = [NSEntityDescription
                            insertNewObjectForEntityForName:[Account entityName] 
                            inManagedObjectContext:self.managedObjectContext];

Now, I’m guessing that there is some class in the MessageUI.framework causing the conflict, but I have a few questions:

  1. The app compiles and runs just fine, no compile-time name conflicts
  2. The other components in the framework seem to be prefix-namespaced (ie: MFMailComposeViewController), so should the theoretical account not be MFAccount?
  3. I’m not even doing an #import <MessageUI/MessageUI.h> or the slightly tighter #import <MessageUI/MFMailComposeViewController.h>, the latter of which I inspected and saw no definition of Account, so I’m not sure why the possible conflicts would even be loaded.
  4. Just to be certain, I re-generated my Core Data classes, and reset all simulator settings, still no dice.
  5. Removing the Framework from the project and build settings immediately fixes the issue.
  • 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-11T18:41:33+00:00Added an answer on June 11, 2026 at 6:41 pm

    I’ve had this happen to me, with this is exact framework (the class was called Broadcaster). In this case, the private Message framework is linked by MessageUI, and this framework provides the Account implementation.

    You can verify that the MessageUI framework loads an Account class by making a new project, and in the app delegate’s application:didFinishLaunchingWithOptions: method, add the following code:

    NSString *account = @"Account";
    Class accountClass = NSClassFromString(account);
    NSLog(@"accountClass = %@",accountClass);
    

    On a fresh project this will print accountClass = (null) but after adding MessageUI it will print accountClass = Account.

    Furthermore, if you use class-dump on the private Message framework, you’ll see the interface declaration for Account.

    Now, you list 5 items in your post as questions, I’ll try to address them

    1. I don’t know enough about the link-time process for working with
      Frameworks to say for sure, but I suspect the Message framework is weakly linked and thus won’t cause a duplicate symbol error at link time.
    2. The public facing ones are named correctly but some undocumented
      ones aren’t. Also, the conflicting class is in the private Message framework.
    3. That doesn’t matter at all. The compiler will use #import, but at
      run time, all the classes are loaded with your application and there
      is no “visibility” or anything like that enforced in the runtime.
    4. N/A
    5. Consistent with other evidence

    As far as a course of action, I just renamed my model class to have a prefix. I’m not aware of any other solution.

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

Sidebar

Related Questions

I have an iPhone app with a Core Data object that has a color
I have a core data object and a REST web interface that use different
I have a core data UITableView, the core data managed object has 4 properties
I have a app that works with Core Data. The data has a field
I have a Core Data object called Workshop. It has a to-many relationship to
I have a core data object that has a bunch of optional values. I'm
Say you have a Core Data object called Workshop. It has a to-many relationship
I have an app on the market which has just one object instance a1
I have a list of core data objects each has a longitude and latitude
I have a core data recipe object that contains an ordered list of ingredient

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.