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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:12:54+00:00 2026-05-24T05:12:54+00:00

If I created subclasses of NSManagedObject Subclass, I see these functions on the implementation

  • 0

If I created subclasses of NSManagedObject Subclass, I see these functions on the implementation files Business.m (for example)

None of these functions are declared in the header file Business.h. I have to personally add

- (void)addDistrictsObject:(District *)value;
- (void)addCategoriesObject:(Category *)value;
- (void)addReviewsObject:(Review *)value;

I wonder why do I have to add those declaration manually? Why not automatically when I tried to generate the SubClass?

Here are the function by the way:

- (void)addPromotionsObject:(Promotion *)value {    
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"Promotions" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"Promotions"] addObject:value];
    [self didChangeValueForKey:@"Promotions" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)removePromotionsObject:(Promotion *)value {
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"Promotions" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"Promotions"] removeObject:value];
    [self didChangeValueForKey:@"Promotions" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)addPromotions:(NSSet *)value {    
    [self willChangeValueForKey:@"Promotions" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"Promotions"] unionSet:value];
    [self didChangeValueForKey:@"Promotions" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
}

- (void)removePromotions:(NSSet *)value {
    [self willChangeValueForKey:@"Promotions" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"Promotions"] minusSet:value];
    [self didChangeValueForKey:@"Promotions" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
}



- (void)addCategoriesObject:(Category *)value {    
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"Categories" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"Categories"] addObject:value];
    [self didChangeValueForKey:@"Categories" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)removeCategoriesObject:(Category *)value {
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"Categories" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"Categories"] removeObject:value];
    [self didChangeValueForKey:@"Categories" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)addCategories:(NSSet *)value {    
    [self willChangeValueForKey:@"Categories" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"Categories"] unionSet:value];
    [self didChangeValueForKey:@"Categories" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
}

- (void)removeCategories:(NSSet *)value {
    [self willChangeValueForKey:@"Categories" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"Categories"] minusSet:value];
    [self didChangeValueForKey:@"Categories" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
}



- (void)addImagesObject:(Image *)value {    
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"Images" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"Images"] addObject:value];
    [self didChangeValueForKey:@"Images" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)removeImagesObject:(Image *)value {
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"Images" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"Images"] removeObject:value];
    [self didChangeValueForKey:@"Images" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)addImages:(NSSet *)value {    
    [self willChangeValueForKey:@"Images" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"Images"] unionSet:value];
    [self didChangeValueForKey:@"Images" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
}

- (void)removeImages:(NSSet *)value {
    [self willChangeValueForKey:@"Images" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"Images"] minusSet:value];
    [self didChangeValueForKey:@"Images" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
}



- (void)addReviewsObject:(Review *)value {    
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"Reviews" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"Reviews"] addObject:value];
    [self didChangeValueForKey:@"Reviews" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)removeReviewsObject:(Review *)value {
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"Reviews" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"Reviews"] removeObject:value];
    [self didChangeValueForKey:@"Reviews" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)addReviews:(NSSet *)value {    
    [self willChangeValueForKey:@"Reviews" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"Reviews"] unionSet:value];
    [self didChangeValueForKey:@"Reviews" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
}

- (void)removeReviews:(NSSet *)value {
    [self willChangeValueForKey:@"Reviews" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"Reviews"] minusSet:value];
    [self didChangeValueForKey:@"Reviews" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
}


- (void)addURLsObject:(URL *)value {    
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"URLs" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"URLs"] addObject:value];
    [self didChangeValueForKey:@"URLs" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)removeURLsObject:(URL *)value {
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"URLs" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"URLs"] removeObject:value];
    [self didChangeValueForKey:@"URLs" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)addURLs:(NSSet *)value {    
    [self willChangeValueForKey:@"URLs" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"URLs"] unionSet:value];
    [self didChangeValueForKey:@"URLs" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
}

- (void)removeURLs:(NSSet *)value {
    [self willChangeValueForKey:@"URLs" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"URLs"] minusSet:value];
    [self didChangeValueForKey:@"URLs" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
}



- (void)addDistrictsObject:(District *)value {    
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"Districts" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"Districts"] addObject:value];
    [self didChangeValueForKey:@"Districts" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)removeDistrictsObject:(District *)value {
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"Districts" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"Districts"] removeObject:value];
    [self didChangeValueForKey:@"Districts" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)addDistricts:(NSSet *)value {    
    [self willChangeValueForKey:@"Districts" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"Districts"] unionSet:value];
    [self didChangeValueForKey:@"Districts" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
}

- (void)removeDistricts:(NSSet *)value {
    [self willChangeValueForKey:@"Districts" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"Districts"] minusSet:value];
    [self didChangeValueForKey:@"Districts" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
}
  • 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-24T05:12:55+00:00Added an answer on May 24, 2026 at 5:12 am

    Prior to Xcode 4.x, the autogenerated code did produce header definition for methods. The loss of the headers is probably another victim of X4’s un-Apple-like slipshod quality control.

    The headers are really only needed for intellisense or some other human interface tool. The @dynamic preprocessor command will tell the compiler that the methods exist based on naming conventions. During runtime, Core Data will check the class by sending respondsToSelector to the instantiated objects or it will use direct key-value methods.

    You can always add them yourself with a small script that runs manually or with a build. It’s pain but apparently X4 design was focused on managing large multi-product projects and they dropped the ball on some of the older basic stuff.

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

Sidebar

Related Questions

I created an UIViewController subclass, and figured out that the default implementation of -loadView
I created a subclass of NSManagedObject. When I fetch it, an object of NSManagedObject
I have a NSManagedObject subclass, created by the XCode model interface. This class has
Generating subclasses for 2 Entities with the option Create NSManagedObject SubClass Xcode creates 4
I created a subclass from UIView #import <UIKit/UIKit.h> @interface MeeSelectDropDownView : UIView { UILabel
I have created a subclass of UIImageView and I am handling the touches for
I have created a a subclass of Table in my ASP.NET project which creates.
In interface builder i've created a UITextfield within a subclass of a UITableViewCell. The
I have one subclass of NSManagedObject like following and stored some instances by NSManagedObjectContext.
I have a CoreData NSManagedObject subclass, TextNarration, that has an attribute of type NSString,

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.