|
|
|
@ -4,6 +4,7 @@
|
|
|
|
|
#import "CategorizingLogger.h"
|
|
|
|
|
#import "DialerViewController.h"
|
|
|
|
|
#import "DiscardingLog.h"
|
|
|
|
|
#import "Environment.h"
|
|
|
|
|
#import "InCallViewController.h"
|
|
|
|
|
#import "LeftSideMenuViewController.h"
|
|
|
|
|
#import "MMDrawerController.h"
|
|
|
|
@ -15,9 +16,7 @@
|
|
|
|
|
#import "SettingsViewController.h"
|
|
|
|
|
#import "TabBarParentViewController.h"
|
|
|
|
|
#import "Util.h"
|
|
|
|
|
#import <UICKeyChainStore/UICKeyChainStore.h>
|
|
|
|
|
#import "Environment.h"
|
|
|
|
|
#import "CallServerRequestsManager.h"
|
|
|
|
|
#import "VersionMigrations.h"
|
|
|
|
|
|
|
|
|
|
#define kSignalVersionKey @"SignalUpdateVersionKey"
|
|
|
|
|
|
|
|
|
@ -49,6 +48,7 @@
|
|
|
|
|
// Application was updated, let's see if we have a migration scheme for it.
|
|
|
|
|
if ([previousVersion isEqualToString:@"1.0.2"]) {
|
|
|
|
|
// Migrate from custom preferences to NSUserDefaults
|
|
|
|
|
[VersionMigrations migrationFrom1Dot0Dot2toLarger];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -63,7 +63,6 @@
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
- (void)protectPreferenceFiles{
|
|
|
|
|
|
|
|
|
|
NSMutableArray *pathsToExclude = [NSMutableArray array];
|
|
|
|
|
|
|
|
|
|
[pathsToExclude addObject:[[[NSHomeDirectory() stringByAppendingString:@"/Library/Preferences/"] stringByAppendingString:[[NSBundle mainBundle] bundleIdentifier]] stringByAppendingString:@".plist"]];
|
|
|
|
@ -79,11 +78,11 @@
|
|
|
|
|
|
|
|
|
|
for (NSUInteger i = 0; i < [pathsToExclude count]; i++) {
|
|
|
|
|
[[NSURL fileURLWithPath:[pathsToExclude objectAtIndex:i]] setResourceValue: [NSNumber numberWithBool: YES]
|
|
|
|
|
forKey: NSURLIsExcludedFromBackupKey error: &error];
|
|
|
|
|
forKey: NSURLIsExcludedFromBackupKey error: &error];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (error) {
|
|
|
|
|
NSLog(@"Error: %@", error.description);
|
|
|
|
|
DDLogError(@"Error while removing log files from backup: %@", error.description);
|
|
|
|
|
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:NSLocalizedString(@"WARNING", @"") message:NSLocalizedString(@"DISABLING_BACKUP_FAILED", @"") delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", @"") otherButtonTitles:nil, nil];
|
|
|
|
|
[alert show];
|
|
|
|
|
|
|
|
|
@ -132,7 +131,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
InCallViewController *callViewController = [InCallViewController inCallViewControllerWithCallState:latestCall
|
|
|
|
|
andOptionallyKnownContact:[latestCall potentiallySpecifiedContact]];
|
|
|
|
|
andOptionallyKnownContact:[latestCall potentiallySpecifiedContact]];
|
|
|
|
|
[_drawerController.centerViewController presentViewController:callViewController animated:YES completion:nil];
|
|
|
|
|
} onThread:[NSThread mainThread] untilCancelled:nil];
|
|
|
|
|
|
|
|
|
|