mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 02:22:44 +02:00
[Share extension] Track memory warning
This commit is contained in:
@@ -67,6 +67,9 @@ typedef NS_ENUM(NSInteger, ImageCompressionMode)
|
||||
// Add observer on the Extension host
|
||||
[[NSNotificationCenter defaultCenter] addObserver:sharedInstance selector:@selector(checkUserAccount) name:NSExtensionHostWillEnterForegroundNotification object:nil];
|
||||
|
||||
// Add observer to handle memory warning
|
||||
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(didReceiveMemoryWarning:) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
|
||||
|
||||
MXSDKOptions *sdkOptions = [MXSDKOptions sharedInstance];
|
||||
// Apply the application group
|
||||
sdkOptions.applicationGroupIdentifier = @"group.im.vector";
|
||||
@@ -840,6 +843,11 @@ typedef NS_ENUM(NSInteger, ImageCompressionMode)
|
||||
}
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning:(NSNotification*)notification
|
||||
{
|
||||
NSLog(@"[ShareExtensionManager] Did receive memory warning");
|
||||
}
|
||||
|
||||
#pragma mark - Sharing
|
||||
|
||||
- (void)sendText:(NSString *)text toRoom:(MXRoom *)room successBlock:(dispatch_block_t)successBlock failureBlock:(void(^)(NSError *error))failureBlock
|
||||
|
||||
Reference in New Issue
Block a user