单例
static AppInfo *_instance; @implementation AppInfo + (id)shareAppInfo { if (_instance == nil) { _instance = [[self alloc]init]; } return _instance; } + (id)allocWithZone:(struct _NSZone *)zone { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ _instance = [super allocWithZone:zone]; }); return _instance; } - (id)init { self = [super init]; if (self) { self.appUserInfo = nil; } return self; }