App Extension - Fix matrix session handling

The matrix session should be handled by the ShareExtensionManager. This manager is able to prepare, suspend and resume the session.
Note: The ShareViewController is reloaded each time the extension is launched
This commit is contained in:
Giom Foret
2017-08-21 22:33:06 +02:00
parent 490c022ed5
commit 36d080400c
3 changed files with 108 additions and 89 deletions
@@ -19,6 +19,12 @@
@class ShareExtensionManager;
/**
Posted when the matrix session has been changed.
The notification object is the matrix session.
*/
extern NSString *const kShareExtensionManagerDidChangeMXSessionNotification;
/**
The protocol for the manager's delegate
*/
@@ -58,6 +64,11 @@
*/
@property (nonatomic) NSExtensionContext *shareExtensionContext;
/**
The associated matrix session (nil by default).
*/
@property (nonatomic, readonly) MXSession *mxSession;
/**
A delegate used to notify about needed UI changes when sharing
*/