NSFetchedResultsController

Instead of using the usual

NSFetchRequest *request = [NSFetchRequestfetchRequestWithEntityName:@”SomeClass”];

which is prone to String typos, rather use

NSFetchRequest *request = [NSFetchRequestfetchRequestWithEntityName:NSStringFromClass([SomeClassclass])];

This is a neat way to tie the name of the class to the entity.

Of course you have to make sure that you have done the whole CoreData DataModel and create entity based on the entities created in the model.

Advertisements

Configuring SBJSON-framework for XCode 4.2

Procedure to use json-framework in XCode 4.2

1) Open or create your project
2) Open the SBJSON XCode project file “SBJson.xcodeproj

pastedgraphic 1

 

Now drag the SBJson application to you project. There seems to be a bug in the XCode I am using in that it does not display as shown below. Close the project and open it again and it will work.

 

Now strap it in.

Click on your project file
Click the Targets section
Click the Build Phases

Expand target Dependencies
Click the “+” to add a dependency
Choose “sbjson-ios” under the SBJson project

Now expand the “Link Binary with Libraries”, click + and add “libsbjson-ios.a”

That’s it. All done