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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:07:39+00:00 2026-06-03T12:07:39+00:00

I am getting the following error: -[Order items]: unrecognized selector sent to instance 0x6b5f240

  • 0

I am getting the following error:

“-[Order items]: unrecognized selector sent to instance 0x6b5f240”

I do have a class called Order, which looks like this:

Order.h

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>

@class OrderItem;

@interface Order : NSManagedObject {
@private
}
@property (nonatomic, retain) NSNumber * orderID;
@property (nonatomic, retain) NSDate * date;
@property (nonatomic, retain) NSNumber * orderCode;
@property (nonatomic, retain) NSSet* items;

@end

Order.m

#import "Order.h"
#import "OrderItem.h"


@implementation Order
@dynamic orderID;
@dynamic date;
@dynamic orderCode;
@dynamic items;

...

It doesn’t extend any sort of class which has an “items” method, if I’m reading that correctly?

Is there any other reason I would be getting such an error. To add to the madness, this project is copied directly from a previous project, with some minor edits. I’ve done text comparisons on every single class in both projects and there are no differences other than the cosmetic changes I’ve made.

  • 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-03T12:07:41+00:00Added an answer on June 3, 2026 at 12:07 pm

    @dynamic items tells the compiler that you will be providing the methods for items.

    Since this was working in a previous project, it must have had the following method somewhere in the .m file:

    - (NSSet *)items {
        // Appropriate code
    }
    

    If you do not want to provide your own custom getter like this, then change @dynamic items to @synthesize items and the compiler will generate one for you.

    For more details, see the Declared Properties section of The Objective-C Programming Language provided by Apple here: https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Chapters/ocProperties.html

    EDIT
    While everything above still applies to a normal object (and may still apply here), I just noticed that this is a subclass of NSManagedObject.

    In your old data model there was probably a relationship called items and therefore the appropriate methods were provided by NSManagedObject and @dynamic was appropriate to prevent compiler warnings.

    If in your new data model there is no relationship named items, then the methods will not be generated and it will cause the problem that you are getting here.

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

Sidebar

Related Questions

I am getting the following error when I make an order with a credit/debit
I am getting the following error message on the code below (which is at
Am getting following error message on calling WCF service: The formatter threw an exception
I am getting following error when I am trying to get WebResponse using WebResponse
I am getting following error message when using Doctrine ORM in Codeigniter. ( !
I am getting following error in different places like when I am removing an
I am getting following error: error: calling a host function(strcpy) from a __device__/__global__ function(doDecompression)
We are getting following error when we try to validate our app. This bundle
SOLVED in the last answer im getting following error, dunno where and why? cause
I am trying to create a new project but it getting following error .

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.