Manos Chorianopoulos

fix initialize crash

...@@ -250,9 +250,12 @@ typedef void (^FailureResponse)(NSURLSessionDataTask * _Nullable task, NSError * ...@@ -250,9 +250,12 @@ typedef void (^FailureResponse)(NSURLSessionDataTask * _Nullable task, NSError *
250 NSLog(@"restore error: %@", exception.reason); 250 NSLog(@"restore error: %@", exception.reason);
251 251
252 NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 252 NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
253 - self.appUUID = [defaults stringForKey:@"NBAPPUuidUD"]; 253 + if ([defaults boolForKey:@"NBAppUninstalled"] == YES) {
254 - self.apiKey = [defaults stringForKey:@"NBAPIKeyUD"]; 254 + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
255 - self.webId = [defaults stringForKey:@"NBWebIDUD"]; 255 + self.appUUID = [defaults stringForKey:@"NBAPPUuidUD"];
256 + self.apiKey = [defaults stringForKey:@"NBAPIKeyUD"];
257 + self.webId = [defaults stringForKey:@"NBWebIDUD"];
258 + }
256 } 259 }
257 @finally { 260 @finally {
258 // NSLog(@"Finally condition"); 261 // NSLog(@"Finally condition");
......