I am trying to reuse the Obj-C shell group between iPhone applications. Values that differ from application to application have been isolated, and I'm trying to find a better way to apply these user-defined values to classes based on application-by-application.
Should I store them in code?
// I might have 10 customizable values for each class, that a long signature! CarController *controller = [[CarController alloc] initWithFontName:@"Vroom" engine:@"Diesel" color:@"Red" number:11];
Should I store them in a large settings.plist ?
// Wasteful! I sometimes only use 2-3 of 50 settings! AllMyAppSettings *settings = [[AllMyAppSettings alloc] initFromDisk:@"settings.plist"]; CarController *controller = [[CarController alloc] initWithSettings:settings]; [settings release];
Should I have a small, optional n_settings.plist for each class?
Or is there an OO solution that I don't think about at all that would be better?
source share