mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
Merge pull request #1692 from vector-im/sdk_extensions
Make use of sdk extensions
This commit is contained in:
commit
2816b42d2b
3 changed files with 29 additions and 9 deletions
15
Podfile
15
Podfile
|
@ -20,13 +20,19 @@ $matrixKitVersion = '0.7.3'
|
|||
def import_MatrixKit
|
||||
if $matrixKitVersion == 'local'
|
||||
pod 'MatrixSDK', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
pod 'MatrixSDK/JingleCallStack', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
pod 'MatrixSDK/GoogleAnalytics', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
pod 'MatrixKit', :path => '../matrix-ios-kit/MatrixKit.podspec'
|
||||
else
|
||||
if $matrixKitVersion == 'develop'
|
||||
pod 'MatrixSDK', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
|
||||
pod 'MatrixSDK/JingleCallStack', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
|
||||
pod 'MatrixSDK/GoogleAnalytics', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
|
||||
pod 'MatrixKit', :git => 'https://github.com/matrix-org/matrix-ios-kit.git', :branch => 'develop'
|
||||
else
|
||||
pod 'MatrixKit', $matrixKitVersion
|
||||
pod 'MatrixSDK/JingleCallStack'
|
||||
pod 'MatrixSDK/GoogleAnalytics'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -35,13 +41,19 @@ end
|
|||
def import_MatrixKitAppExtension
|
||||
if $matrixKitVersion == 'local'
|
||||
pod 'MatrixSDK', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
pod 'MatrixSDK/JingleCallStack', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
pod 'MatrixSDK/GoogleAnalytics', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
pod 'MatrixKit/AppExtension', :path => '../matrix-ios-kit/MatrixKit.podspec'
|
||||
else
|
||||
if $matrixKitVersion == 'develop'
|
||||
pod 'MatrixSDK', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
|
||||
pod 'MatrixSDK/JingleCallStack', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
|
||||
pod 'MatrixSDK/GoogleAnalytics', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
|
||||
pod 'MatrixKit/AppExtension', :git => 'https://github.com/matrix-org/matrix-ios-kit.git', :branch => 'develop'
|
||||
else
|
||||
pod 'MatrixKit/AppExtension', $matrixKitVersion
|
||||
pod 'MatrixSDK/JingleCallStack'
|
||||
pod 'MatrixSDK/GoogleAnalytics'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -52,9 +64,6 @@ abstract_target 'RiotPods' do
|
|||
pod 'GBDeviceInfo', '~> 4.4.0'
|
||||
pod 'GoogleAnalytics'
|
||||
|
||||
# The Google WebRTC stack
|
||||
pod 'WebRTC', '61.5.19063'
|
||||
|
||||
# OLMKit for crypto
|
||||
pod 'OLMKit'
|
||||
#pod 'OLMKit', :path => '../olm/OLMKit.podspec'
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#import <AudioToolbox/AudioToolbox.h>
|
||||
|
||||
#include <MatrixSDK/MXUIKitBackgroundModeHandler.h>
|
||||
#include <MatrixSDK/MXGoogleAnalytics.h>
|
||||
|
||||
// Calls
|
||||
#import "CallViewController.h"
|
||||
|
@ -60,9 +61,12 @@
|
|||
#import <MatrixEndpointWrapper/MatrixEndpointWrapper.h>
|
||||
#endif
|
||||
|
||||
#ifdef MX_CALL_STACK_JINGLE
|
||||
|
||||
#if __has_include(<MatrixSDK/MXJingleCallStack.h>)
|
||||
#define CALL_STACK_JINGLE
|
||||
#endif
|
||||
#ifdef CALL_STACK_JINGLE
|
||||
#import <MatrixSDK/MXJingleCallStack.h>
|
||||
#import <MatrixSDK/MXJingleCallAudioSessionConfigurator.h>
|
||||
#endif
|
||||
|
||||
#define CALL_STATUS_BAR_HEIGHT 44
|
||||
|
@ -322,6 +326,9 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
// Set the App Group identifier.
|
||||
MXSDKOptions *sdkOptions = [MXSDKOptions sharedInstance];
|
||||
sdkOptions.applicationGroupIdentifier = @"group.im.vector";
|
||||
|
||||
// Track SDK performance on Google analytics
|
||||
sdkOptions.analyticsDelegate = [[MXGoogleAnalytics alloc] init];
|
||||
|
||||
// Redirect NSLogs to files only if we are not debugging
|
||||
if (!isatty(STDERR_FILENO)) {
|
||||
|
@ -1847,7 +1854,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
#ifdef MX_CALL_STACK_ENDPOINT
|
||||
callStack = [[MXEndpointCallStack alloc] initWithMatrixId:mxSession.myUser.userId];
|
||||
#endif
|
||||
#ifdef MX_CALL_STACK_JINGLE
|
||||
#ifdef CALL_STACK_JINGLE
|
||||
callStack = [[MXJingleCallStack alloc] init];
|
||||
#endif
|
||||
if (callStack)
|
||||
|
@ -2419,7 +2426,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
|
||||
id<MXCallAudioSessionConfigurator> audioSessionConfigurator;
|
||||
|
||||
#ifdef MX_CALL_STACK_JINGLE
|
||||
#ifdef CALL_STACK_JINGLE
|
||||
audioSessionConfigurator = [[MXJingleCallAudioSessionConfigurator alloc] init];
|
||||
#endif
|
||||
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
|
||||
#import <MatrixKit/MatrixKit.h>
|
||||
|
||||
#if __has_include(<MatrixSDK/MXJingleCallStack.h>)
|
||||
#define CALL_STACK_JINGLE
|
||||
#endif
|
||||
|
||||
@interface IntentHandler () <INStartAudioCallIntentHandling, INStartVideoCallIntentHandling, INSendMessageIntentHandling>
|
||||
|
||||
@end
|
||||
|
@ -60,7 +64,7 @@
|
|||
MXKAccount *account = [MXKAccountManager sharedManager].activeAccounts.firstObject;
|
||||
if (account)
|
||||
{
|
||||
#if defined MX_CALL_STACK_OPENWEBRTC || defined MX_CALL_STACK_ENDPOINT || defined MX_CALL_STACK_JINGLE
|
||||
#if defined MX_CALL_STACK_OPENWEBRTC || defined MX_CALL_STACK_ENDPOINT || defined CALL_STACK_JINGLE
|
||||
NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:NSStringFromClass([INStartAudioCallIntent class])];
|
||||
response = [[INStartAudioCallIntentResponse alloc] initWithCode:INStartAudioCallIntentResponseCodeReady userActivity:userActivity];
|
||||
#else
|
||||
|
@ -111,7 +115,7 @@
|
|||
MXKAccount *account = [MXKAccountManager sharedManager].activeAccounts.firstObject;
|
||||
if (account)
|
||||
{
|
||||
#if defined MX_CALL_STACK_OPENWEBRTC || defined MX_CALL_STACK_ENDPOINT || defined MX_CALL_STACK_JINGLE
|
||||
#if defined MX_CALL_STACK_OPENWEBRTC || defined MX_CALL_STACK_ENDPOINT || defined CALL_STACK_JINGLE
|
||||
NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:NSStringFromClass([INStartVideoCallIntent class])];
|
||||
response = [[INStartVideoCallIntentResponse alloc] initWithCode:INStartVideoCallIntentResponseCodeReady userActivity:userActivity];
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue