Reworked the Share Extension to use a subclass of MXKRecentsDataSource to show content, solved the room order issue, as well introduced a new class ShareExtensionManager responsible for Sharing content and communicating with the system to terminate the extension with the appropriate exit code when needed.

This commit is contained in:
Aram Sargsyan
2017-08-11 02:38:47 +04:00
parent d469848cba
commit 89592fd34c
19 changed files with 602 additions and 360 deletions
@@ -0,0 +1,24 @@
//
// ShareExtensionManager.h
// Riot
//
// Created by Aram Sargsyan on 8/10/17.
// Copyright © 2017 matrix.org. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <MatrixKit/MatrixKit.h>
@interface ShareExtensionManager : NSObject
@property NSExtensionContext *shareExtensionContext;
+ (instancetype)sharedManager;
- (void)sendContentToRoom:(MXRoom *)room failureBlock:(void(^)())failureBlock;
- (void)cancelSharing;
- (void)cancelSharingWithFailure;
@end