> > >> On Dec 1, 2015, at 4:55 PM, Quincey Morris >> <quinceymor...@rivergatesoftware.com> wrote: >> >> On Dec 1, 2015, at 12:58 , Carl Hoefs <newsli...@autonomy.caltech.edu >> <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >>> available to all classes via [[UIApplication sharedApplication] delegate]. >> >>> Are there any drawbacks to this?
I've found it's best to remove as much of your app-specific singleton behavior out of the app delegate as possible, with an eye toward porting the iOS app to OS X or vice-versa. This is not to say you should actually port it. But by moving those things out of the app delegate, it makes that sort of thing much easier should you choose to. You may also want to break up that singleton into more than one, depending on the functional areas it serves. For example, I no longer put my Core Data stack in app delegate, instead putting it in a CDManager of some sort. This, along with my model classes, ends up being a fairly portable chunk of code I can share among apps. But I may have a different singleton for collecting other app-wide functionality that's specific to my app, again, trying to keep it out of the AppDelegate. -- Rick Mann rm...@latencyzero.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com