I am converting a non ARC projecs to ARC. I just found that after login in my old app, the data is stored in app delegate objects, like Home_DataArray, various flags and some other objects.I am bit confused at it, because my app delegate is looking like constant class and BoolDidFinishLaunch looks like parent of various code. Old app Delegates.h:@property (nonatomic, copy) void(^backgroundTransferCompletionHandler)();@property(nonatomic)BOOL activatedFromBackground;@property(nonatomic,strong)IBOutlet UIViewController *SplashViewController;@property(nonatomic,strong)IBOutlet UIViewController *AppCodeViewController;@property(nonatomic,strong)IBOutlet UINavigationController *navControl;@property(nonatomic,strong)NSMutableArray *arrHomeProducts;@property(nonatomic,strong)NSMutableArray *arrayDownloadProducts;@property(nonatomic,strong)NSString *AppNIB;@property(nonatomic,strong)NSBundle* languageBundle;@property(nonatomic,strong)UIViewController* loginVC;@property(nonatomic,assign)BOOL acceptedMessage_Status;@property(nonatomic,strong)NSIndexPath *selectedWebsiteIndex;@property(nonatomic,strong)NSString *selectedWebsiteID;@property(nonatomic,strong)NSString *userID;@property(nonatomic,strong)NSString *partID;@property(nonatomic,strong)NSString *websiteID;@property(nonatomic,strong)NSString *BrandName;@property(nonatomic,strong)NSString *driverSide;@property(nonatomic,strong)NSString *str_bundle;@property(nonatomic,strong)NSString *str_BundleCost;@property(nonatomic,assign)BOOL isCalledFromSafariBrowser;-----------------------------------------------------------------------------------------so on ---------------------------and in similar allocation of array in didfinish launch.I did same things and code is working but is it the right way of using objects in app delegate.Please suggest how I should opt a singleton-based approach to declare, alloc and store various objects for various view controllers or something else.
Storing global constants in app delegate or singleton
design patterns;objective c;singleton