Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode code generation [closed]

I was wondering if there is a tool (automator script or a third party) to generate code for simple scenarios like add another property. I don't like going to two or three places and write the same thing over and over again. instead I want to say "I want a new property of type int with name X" and it generates the lines in .h and .m files for me in one go.

like image 311
Ali Shafai Avatar asked Apr 09 '10 05:04

Ali Shafai


People also ask

How do I get NSManagedObject?

Still inside the Core Data editor, go to the Editor menu and choose Create NSManagedObject Subclass. Make sure your data model is selected then click Next. Make sure the Commit entity is checked then click Next again.

What is codegen in Core Data?

The Codegen menu is where you specify the code generation for the entity. There are three code generation options. Choosing Manual/None tells Xcode not to generate code for the entity. You must create the class for the entity by creating a new file or by choosing Editor > Create NSManagedObject Subclass.

How do I use Core Data?

Use Core Data to save your application's permanent data for offline use, to cache temporary data, and to add undo functionality to your app on a single device. To sync data across multiple devices in a single iCloud account, Core Data automatically mirrors your schema to a CloudKit container.

What is an NSEntityDescription?

NSEntityDescription provides a user dictionary for you to store any related, app-specific information.


1 Answers

I haven't actually used either, but xobjc is free (though requires you to do some code annotations) and Accessorizer looks interesting if somewhat complicated to setup.

like image 172
nall Avatar answered Sep 28 '22 06:09

nall