diff --git a/iphone/Maps/Classes/CustomViews/Login/MWMAuthorizationCommon.mm b/iphone/Maps/Classes/CustomViews/Login/MWMAuthorizationCommon.mm index 356b8aa0ab..f22c42d6d9 100644 --- a/iphone/Maps/Classes/CustomViews/Login/MWMAuthorizationCommon.mm +++ b/iphone/Maps/Classes/CustomViews/Login/MWMAuthorizationCommon.mm @@ -44,7 +44,6 @@ void AuthorizationStoreCredentials(std::string const & oauthToken) // To also see # of edits when offline. [ud setInteger:prefs.m_changesets forKey:kOSMChangesetsCount]; } - [ud synchronize]; } BOOL AuthorizationHaveOAuth1Credentials() @@ -60,7 +59,6 @@ void AuthorizationClearOAuth1Credentials() NSUserDefaults * ud = NSUserDefaults.standardUserDefaults; [ud removeObjectForKey:kOSMRequestToken]; [ud removeObjectForKey:kOSMRequestSecret]; - [ud synchronize]; } BOOL AuthorizationHaveCredentials() @@ -78,7 +76,6 @@ void AuthorizationClearCredentials() [ud removeObjectForKey:kOSMRequestSecret]; [ud removeObjectForKey:kOSMUserName]; [ud removeObjectForKey:kOSMChangesetsCount]; - [ud synchronize]; } std::string const AuthorizationGetCredentials() @@ -94,7 +91,6 @@ void AuthorizationSetNeedCheck(BOOL needCheck) { NSUserDefaults * ud = NSUserDefaults.standardUserDefaults; [ud setBool:needCheck forKey:kAuthNeedCheck]; - [ud synchronize]; } BOOL AuthorizationIsNeedCheck() @@ -120,7 +116,6 @@ NSInteger OSMUserChangesetsCount() if (count >= 0) { [ud setInteger:count forKey:kOSMChangesetsCount]; - [ud synchronize]; return count; } return [ud integerForKey:kOSMChangesetsCount]; diff --git a/iphone/Maps/Classes/FirstSession.mm b/iphone/Maps/Classes/FirstSession.mm index 3532ffdddd..6ea496b06a 100644 --- a/iphone/Maps/Classes/FirstSession.mm +++ b/iphone/Maps/Classes/FirstSession.mm @@ -99,7 +99,6 @@ static NSString * gInstallationId = nil; // Non-standard situation: this method is called before calling setup. Return current date. date = [NSDate date]; [ud setObject:date forKey:kFirstLaunchDateKey]; - [ud synchronize]; } return date; } @@ -142,7 +141,6 @@ static NSString * gInstallationId = nil; gInstallationId = [@"I:" stringByAppendingString:(NSString *)CFBridgingRelease(CFUUIDCreateString(kCFAllocatorDefault, uuid))]; CFRelease(uuid); [ud setValue:gInstallationId forKey:kAlohalyticsInstallationId]; - [ud synchronize]; gIsFirstSession = YES; } } diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index cf82f0bce2..3dc8bfece8 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -397,7 +397,6 @@ NSString *const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing"; [self.alertController presentEditorViralAlert]; [ud setObject:[NSDate date] forKey:kUDViralAlertWasShown]; - [ud synchronize]; } - (void)viewWillDisappear:(BOOL)animated { diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm index bab49ac79a..e3c3b8927f 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.mm +++ b/iphone/Maps/Classes/MapsAppDelegate.mm @@ -375,7 +375,6 @@ using namespace osm_auth_ios; [standartDefaults setObject:currentVersion forKey:kUDFirstVersionKey]; [standartDefaults setInteger:1 forKey:kUDSessionsCountKey]; [standartDefaults setObject:NSDate.date forKey:kUDLastLaunchDateKey]; - [standartDefaults synchronize]; } - (void)incrementSessionCount { @@ -390,7 +389,6 @@ using namespace osm_auth_ios; sessionCount++; [standartDefaults setInteger:sessionCount forKey:kUDSessionsCountKey]; [standartDefaults setObject:NSDate.date forKey:kUDLastLaunchDateKey]; - [standartDefaults synchronize]; } } diff --git a/iphone/Maps/Core/Location/MWMLocationManager.mm b/iphone/Maps/Core/Location/MWMLocationManager.mm index b18e9ed5fc..a0f50ddddd 100644 --- a/iphone/Maps/Core/Location/MWMLocationManager.mm +++ b/iphone/Maps/Core/Location/MWMLocationManager.mm @@ -102,7 +102,6 @@ BOOL needShowLocationAlert() { void setShowLocationAlert(BOOL needShow) { NSUserDefaults * ud = NSUserDefaults.standardUserDefaults; [ud setBool:needShow forKey:kLocationAlertNeedShowKey]; - [ud synchronize]; } } // namespace diff --git a/iphone/Maps/Core/Settings/MWMSettings.mm b/iphone/Maps/Core/Settings/MWMSettings.mm index d999bf3289..e42547b347 100644 --- a/iphone/Maps/Core/Settings/MWMSettings.mm +++ b/iphone/Maps/Core/Settings/MWMSettings.mm @@ -116,7 +116,6 @@ NSString * const kUDTrackWarningAlertWasShown = @"TrackWarningAlertWasShown"; { NSUserDefaults * ud = NSUserDefaults.standardUserDefaults; [ud setObject:spotlightLocaleLanguageId forKey:kSpotlightLocaleLanguageId]; - [ud synchronize]; } + (BOOL)largeFontSize { return GetFramework().LoadLargeFontsSize(); } @@ -143,7 +142,6 @@ NSString * const kUDTrackWarningAlertWasShown = @"TrackWarningAlertWasShown"; { NSUserDefaults * ud = NSUserDefaults.standardUserDefaults; [ud setBool:shown forKey:kUDTrackWarningAlertWasShown]; - [ud synchronize]; } + (NSString *)donateUrl diff --git a/iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.mm b/iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.mm index 9405202a28..f16bc4775b 100644 --- a/iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.mm +++ b/iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.mm @@ -121,7 +121,6 @@ using Observers = NSHashTable; - (void)setNotificationsLocale:(NSString *)locale { NSUserDefaults * ud = NSUserDefaults.standardUserDefaults; [ud setObject:locale forKey:kUserDefaultsTTSLanguageBcp47]; - [ud synchronize]; [self createVoice:locale]; } @@ -135,7 +134,6 @@ using Observers = NSHashTable; [tts setActive:NO]; NSUserDefaults * ud = NSUserDefaults.standardUserDefaults; [ud setBool:enabled forKey:kIsTTSEnabled]; - [ud synchronize]; [tts onTTSStatusUpdated]; if (enabled) diff --git a/iphone/Maps/UI/Editor/MWMEditorViewController.mm b/iphone/Maps/UI/Editor/MWMEditorViewController.mm index eb3c8fdedd..55411c64e5 100644 --- a/iphone/Maps/UI/Editor/MWMEditorViewController.mm +++ b/iphone/Maps/UI/Editor/MWMEditorViewController.mm @@ -1086,7 +1086,6 @@ void registerCellsForTableView(std::vector const & cells, UITab [self.alertController presentPersonalInfoWarningAlertWithBlock:^ { [ud setBool:YES forKey:kUDEditorPersonalInfoWarninWasShown]; - [ud synchronize]; [self onSave]; }];