mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
5bb3bd7bc1
Updated the migrations so they can specify whether a configuration sync is required Moved the config sync logic into a MessageSender extension (makes far more sense than AppDelegate) Fixed a bug where the ShareVC was triggering the 'versionMigrationsDidComplete' twice Removed a couple of imports for files that had been deleted
26 lines
790 B
Objective-C
26 lines
790 B
Objective-C
//
|
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
#import <SessionUtilitiesKit/TSYapDatabaseObject.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
typedef void (^OWSDatabaseMigrationCompletion)(BOOL success, BOOL requiresConfigurationSync);
|
|
|
|
@class OWSPrimaryStorage;
|
|
|
|
@interface OWSDatabaseMigration : TSYapDatabaseObject
|
|
|
|
@property (nonatomic, readonly) OWSPrimaryStorage *primaryStorage;
|
|
|
|
// Prefer nonblocking (async) migrations by overriding `runUpWithTransaction:` in a subclass.
|
|
// Blocking migrations running too long will crash the app, effectively bricking install
|
|
// because the user will never get past it.
|
|
// If you must write a launch-blocking migration, override runUp.
|
|
- (void)runUpWithCompletion:(OWSDatabaseMigrationCompletion)completion;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|