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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:58:13+00:00 2026-06-10T11:58:13+00:00

how can i create an instance for NSmanagedObject Class which i am created using

  • 0

how can i create an instance for NSmanagedObject Class which i am created using core data model. I have another class which is the subclass of NSObject. I want to create an object for NSManageObject Class. how can i do that. Is it like the normal way that we create the instance for NSobject class like

ClassB.m //ClassB is NSObject Class

ClassA *obj = [[ClassA alloc]init]; //ClassA is NSmanagedObject Class

or is there any way to do that???

i am not using this code(Apple Docs) for creating instance

NSManagedObject *newEmployee = [[NSManagedObject alloc]

            initWithEntity:employeeEntity

            insertIntoManagedObjectContext:context];

i would like to know, is there any way to create an object similar to the above code using restkit

Note: i am using Restkit for creating object instance and mapping.

Thanks

  • 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-10T11:58:15+00:00Added an answer on June 10, 2026 at 11:58 am

    Using Restkit you can use the static method object on the class you want to create. In your example

    [ClassA object]

    would return you an instantiated object.

    Just be sure to import the correct headers:

    #import <RestKit/CoreData.h>

    instead of

    #import <CoreData/CoreData.h>

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

Sidebar

Related Questions

I am using core data in my iPhone app. I have created a simple
I have a Core Data entity that uses a custom subclass of NSManagedObject. I
Can we able to create two instance of log4j in class one to write
Can I create instance of abstract class in C#/.net like in Java ? Additional
In C#, I can create an instance of every custom class that I write,
I know in Java we can create an instance of a Class by new
In an Interview Interviwer asked to me can we create instance of a class
Exactly as the title says, why does Core Data create instances of NSManagedObject with
In C++ (I use QT) I can create an instance of QString class two
Suppose I create an instance of this Test class, which starts a new Thread

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.