I have many sublcasses of one class. I choose concrete class based on type (simple enum). I like idea of class cluster. Should i use it or just create factory class (but each class in objective-c is actually a factory)?What is the difference between factory pattern and class cluster pattern.When to use it in your code and why? 
Objective-C class cluster pattern
design;objective c
There isn't really any difference; a class cluster is a specific implementation of the Factory pattern. In the class cluster, the initialiser is used as the factory method to decide what instance to return.Stylistically, the class cluster will be familiar to users of your API because it's common in the Apple frameworks: the collection classes, number classes and others make use of the pattern. It also satisfies the higher-level pattern of Smalltalk and Objective-C where the class object is itself a factory for its instances.In addition the class cluster means fewer things to remember: rather than thinking I have to make a ThingFactory then call [factory thingForCase: foo] they just look at the initialiser for Thing, which is what you'd probably reach for by default.There is a situation in which you would reach for a more classic implementation of Factory, which is (as discussed in the comment thread) where the objects you might return won't necessarily be subclasses of a common parent. In the class cluster pattern, there's a common superclass and client code treats whatever object is returned as an instance of that superclass. If this restriction in the type hierarchy is not suited to your case then a class cluster is not going to work.