mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 15:09:31 +02:00
MESSENGER-6142 remove jitsi, sentry, posthog and sublibraries
This commit is contained in:
34
Podfile
34
Podfile
@@ -45,12 +45,6 @@ end
|
||||
|
||||
$matrixSDKVersionSpec = { :git => 'https://dl-gitlab.example.com/bwmessenger/bundesmessenger/bundesmessenger-ios-sdk', :tag => 'v2.17.0' }
|
||||
|
||||
# Method to import the MatrixSDK
|
||||
def import_MatrixSDK
|
||||
pod 'MatrixSDK', $matrixSDKVersionSpec, :inhibit_warnings => false
|
||||
pod 'MatrixSDK/JingleCallStack', $matrixSDKVersionSpec, :inhibit_warnings => false
|
||||
end
|
||||
|
||||
########################################
|
||||
|
||||
def import_MatrixKit_pods
|
||||
@@ -76,10 +70,6 @@ abstract_target 'RiotPods' do
|
||||
# Piwik for analytics
|
||||
pod 'MatomoTracker', '~> 7.5.2'
|
||||
|
||||
# PostHog for analytics
|
||||
pod 'PostHog', '~> 2.0.0'
|
||||
pod 'Sentry', '~> 7.15.0'
|
||||
|
||||
pod 'OLMKit'
|
||||
pod 'zxcvbn-ios'
|
||||
|
||||
@@ -89,7 +79,7 @@ abstract_target 'RiotPods' do
|
||||
pod 'SwiftFormat/CLI'
|
||||
|
||||
target "Riot" do
|
||||
import_MatrixSDK
|
||||
pod 'MatrixSDK', $matrixSDKVersionSpec, :inhibit_warnings => false
|
||||
import_MatrixKit_pods
|
||||
|
||||
import_SwiftUI_pods
|
||||
@@ -100,8 +90,6 @@ abstract_target 'RiotPods' do
|
||||
pod 'FlowCommoniOS', '~> 1.12.0'
|
||||
pod 'DTTJailbreakDetection', '~> 0.4.0'
|
||||
pod 'ReadMoreTextView', '~> 3.0.1'
|
||||
pod 'SwiftBase32', '~> 0.9.0'
|
||||
pod 'SwiftJWT', '~> 3.6.200'
|
||||
pod 'SideMenu', '~> 6.5'
|
||||
pod 'DSWaveformImage', '~> 6.1.1'
|
||||
|
||||
@@ -115,7 +103,7 @@ abstract_target 'RiotPods' do
|
||||
end
|
||||
|
||||
target "BundesMessenger" do
|
||||
import_MatrixSDK
|
||||
pod 'MatrixSDK', $matrixSDKVersionSpec, :inhibit_warnings => false
|
||||
import_MatrixKit_pods
|
||||
|
||||
import_SwiftUI_pods
|
||||
@@ -126,14 +114,12 @@ abstract_target 'RiotPods' do
|
||||
pod 'FlowCommoniOS', '~> 1.12.0'
|
||||
pod 'DTTJailbreakDetection', '~> 0.4.0'
|
||||
pod 'ReadMoreTextView', '~> 3.0.1'
|
||||
pod 'SwiftBase32', '~> 0.9.0'
|
||||
pod 'SwiftJWT', '~> 3.6.200'
|
||||
pod 'SideMenu', '~> 6.5'
|
||||
pod 'DSWaveformImage', '~> 6.1.1'
|
||||
end
|
||||
|
||||
target "BuM-Beta" do
|
||||
import_MatrixSDK
|
||||
pod 'MatrixSDK', $matrixSDKVersionSpec, :inhibit_warnings => false
|
||||
import_MatrixKit_pods
|
||||
|
||||
import_SwiftUI_pods
|
||||
@@ -144,14 +130,12 @@ abstract_target 'RiotPods' do
|
||||
pod 'FlowCommoniOS', '~> 1.12.0'
|
||||
pod 'DTTJailbreakDetection', '~> 0.4.0'
|
||||
pod 'ReadMoreTextView', '~> 3.0.1'
|
||||
pod 'SwiftBase32', '~> 0.9.0'
|
||||
pod 'SwiftJWT', '~> 3.6.200'
|
||||
pod 'SideMenu', '~> 6.5'
|
||||
pod 'DSWaveformImage', '~> 6.1.1'
|
||||
end
|
||||
|
||||
target "BuM-Open" do
|
||||
import_MatrixSDK
|
||||
pod 'MatrixSDK', $matrixSDKVersionSpec, :inhibit_warnings => false
|
||||
import_MatrixKit_pods
|
||||
|
||||
import_SwiftUI_pods
|
||||
@@ -162,14 +146,12 @@ abstract_target 'RiotPods' do
|
||||
pod 'FlowCommoniOS', '~> 1.12.0'
|
||||
pod 'DTTJailbreakDetection', '~> 0.4.0'
|
||||
pod 'ReadMoreTextView', '~> 3.0.1'
|
||||
pod 'SwiftBase32', '~> 0.9.0'
|
||||
pod 'SwiftJWT', '~> 3.6.200'
|
||||
pod 'SideMenu', '~> 6.5'
|
||||
pod 'DSWaveformImage', '~> 6.1.1'
|
||||
end
|
||||
|
||||
target "BuM-BWI-MDM" do
|
||||
import_MatrixSDK
|
||||
pod 'MatrixSDK', $matrixSDKVersionSpec, :inhibit_warnings => false
|
||||
import_MatrixKit_pods
|
||||
|
||||
import_SwiftUI_pods
|
||||
@@ -180,8 +162,6 @@ abstract_target 'RiotPods' do
|
||||
pod 'FlowCommoniOS', '~> 1.12.0'
|
||||
pod 'DTTJailbreakDetection', '~> 0.4.0'
|
||||
pod 'ReadMoreTextView', '~> 3.0.1'
|
||||
pod 'SwiftBase32', '~> 0.9.0'
|
||||
pod 'SwiftJWT', '~> 3.6.200'
|
||||
pod 'SideMenu', '~> 6.5'
|
||||
pod 'DSWaveformImage', '~> 6.1.1'
|
||||
end
|
||||
@@ -195,12 +175,12 @@ abstract_target 'RiotPods' do
|
||||
end
|
||||
|
||||
target "RiotNSE" do
|
||||
import_MatrixSDK
|
||||
pod 'MatrixSDK', $matrixSDKVersionSpec, :inhibit_warnings => false
|
||||
import_MatrixKit_pods
|
||||
end
|
||||
|
||||
target "BroadcastUploadExtension" do
|
||||
import_MatrixSDK
|
||||
pod 'MatrixSDK', $matrixSDKVersionSpec, :inhibit_warnings => false
|
||||
end
|
||||
|
||||
# Disabled due to crypto corruption issues.
|
||||
|
||||
95
Podfile.lock
95
Podfile.lock
@@ -14,9 +14,6 @@ PODS:
|
||||
- AFNetworking/Serialization (4.0.1)
|
||||
- AFNetworking/UIKit (4.0.1):
|
||||
- AFNetworking/NSURLSession
|
||||
- BlueCryptor (1.0.32)
|
||||
- BlueECC (1.2.5)
|
||||
- BlueRSA (1.0.200)
|
||||
- Down (0.11.0)
|
||||
- DSBottomSheet (0.3.0)
|
||||
- DSWaveformImage (6.1.1)
|
||||
@@ -42,20 +39,12 @@ PODS:
|
||||
- GBDeviceInfo (7.1.0):
|
||||
- GBDeviceInfo/Core (= 7.1.0)
|
||||
- GBDeviceInfo/Core (7.1.0)
|
||||
- GZIP (1.3.1)
|
||||
- Introspect (0.11.0)
|
||||
- JitsiMeetSDKLite (8.1.2-lite):
|
||||
- JitsiWebRTC (~> 111.0)
|
||||
- JitsiWebRTC (111.0.2)
|
||||
- GZIP (1.3.2)
|
||||
- Introspect (0.12.0)
|
||||
- KeychainAccess (4.2.2)
|
||||
- KituraContracts (1.2.1):
|
||||
- LoggerAPI (~> 1.7)
|
||||
- KTCenterFlowLayout (1.3.1)
|
||||
- libbase58 (0.1.4)
|
||||
- libPhoneNumber-iOS (0.9.15)
|
||||
- LoggerAPI (1.9.200):
|
||||
- Logging (~> 1.1)
|
||||
- Logging (1.4.0)
|
||||
- MatomoTracker (7.5.2):
|
||||
- MatomoTracker/Core (= 7.5.2)
|
||||
- MatomoTracker/Core (7.5.2)
|
||||
@@ -69,16 +58,12 @@ PODS:
|
||||
- OLMKit (~> 3.2.5)
|
||||
- Realm (= 10.27.0)
|
||||
- SwiftyBeaver (= 1.9.5)
|
||||
- MatrixSDK/JingleCallStack (0.27.5):
|
||||
- JitsiMeetSDKLite (= 8.1.2-lite)
|
||||
- MatrixSDK/Core
|
||||
- MatrixSDKCrypto (0.3.13)
|
||||
- OLMKit (3.2.12):
|
||||
- OLMKit/olmc (= 3.2.12)
|
||||
- OLMKit/olmcpp (= 3.2.12)
|
||||
- OLMKit/olmc (3.2.12)
|
||||
- OLMKit/olmcpp (3.2.12)
|
||||
- PostHog (2.0.0)
|
||||
- ReadMoreTextView (3.0.1)
|
||||
- Realm (10.27.0):
|
||||
- Realm/Headers (= 10.27.0)
|
||||
@@ -88,20 +73,10 @@ PODS:
|
||||
- Reusable/View (= 4.1.2)
|
||||
- Reusable/Storyboard (4.1.2)
|
||||
- Reusable/View (4.1.2)
|
||||
- Sentry (7.15.0):
|
||||
- Sentry/Core (= 7.15.0)
|
||||
- Sentry/Core (7.15.0)
|
||||
- SideMenu (6.5.0)
|
||||
- SwiftBase32 (0.9.0)
|
||||
- SwiftFormat/CLI (0.50.2)
|
||||
- SwiftGen (6.6.2)
|
||||
- SwiftJWT (3.6.200):
|
||||
- BlueCryptor (~> 1.0)
|
||||
- BlueECC (~> 1.1)
|
||||
- BlueRSA (~> 1.0)
|
||||
- KituraContracts (~> 1.2)
|
||||
- LoggerAPI (~> 1.7)
|
||||
- SwiftLint (0.49.1)
|
||||
- SwiftFormat/CLI (0.54.0)
|
||||
- SwiftGen (6.6.3)
|
||||
- SwiftLint (0.55.1)
|
||||
- SwiftyBeaver (1.9.5)
|
||||
- UICollectionViewLeftAlignedLayout (1.0.2)
|
||||
- UICollectionViewRightAlignedLayout (0.0.3)
|
||||
@@ -125,17 +100,12 @@ DEPENDENCIES:
|
||||
- libPhoneNumber-iOS (~> 0.9.13)
|
||||
- MatomoTracker (~> 7.5.2)
|
||||
- MatrixSDK (from `https://dl-gitlab.example.com/bwmessenger/bundesmessenger/bundesmessenger-ios-sdk`, tag `v2.17.0`)
|
||||
- MatrixSDK/JingleCallStack (from `https://dl-gitlab.example.com/bwmessenger/bundesmessenger/bundesmessenger-ios-sdk`, tag `v2.17.0`)
|
||||
- OLMKit
|
||||
- PostHog (~> 2.0.0)
|
||||
- ReadMoreTextView (~> 3.0.1)
|
||||
- Reusable (~> 4.1)
|
||||
- Sentry (~> 7.15.0)
|
||||
- SideMenu (~> 6.5)
|
||||
- SwiftBase32 (~> 0.9.0)
|
||||
- SwiftFormat/CLI
|
||||
- SwiftGen
|
||||
- SwiftJWT (~> 3.6.200)
|
||||
- SwiftLint
|
||||
- UICollectionViewLeftAlignedLayout (~> 1.0.2)
|
||||
- UICollectionViewRightAlignedLayout (~> 0.0.3)
|
||||
@@ -146,44 +116,31 @@ DEPENDENCIES:
|
||||
SPEC REPOS:
|
||||
https://github.com/CocoaPods/Specs.git:
|
||||
- AFNetworking
|
||||
- DTCoreText
|
||||
- DTFoundation
|
||||
- DTTJailbreakDetection
|
||||
- GZIP
|
||||
- JitsiMeetSDKLite
|
||||
- JitsiWebRTC
|
||||
- libbase58
|
||||
- MatomoTracker
|
||||
- MatrixSDKCrypto
|
||||
- Realm
|
||||
- SwiftyBeaver
|
||||
trunk:
|
||||
- BlueCryptor
|
||||
- BlueECC
|
||||
- BlueRSA
|
||||
- Down
|
||||
- DSBottomSheet
|
||||
- DSWaveformImage
|
||||
- DTCoreText
|
||||
- DTFoundation
|
||||
- DTTJailbreakDetection
|
||||
- FlowCommoniOS
|
||||
- GBDeviceInfo
|
||||
- GZIP
|
||||
- Introspect
|
||||
- KeychainAccess
|
||||
- KituraContracts
|
||||
- KTCenterFlowLayout
|
||||
- libbase58
|
||||
- libPhoneNumber-iOS
|
||||
- LoggerAPI
|
||||
- Logging
|
||||
- MatomoTracker
|
||||
- MatrixSDKCrypto
|
||||
- OLMKit
|
||||
- PostHog
|
||||
- ReadMoreTextView
|
||||
- Realm
|
||||
- Reusable
|
||||
- Sentry
|
||||
- SideMenu
|
||||
- SwiftBase32
|
||||
- SwiftFormat
|
||||
- SwiftGen
|
||||
- SwiftJWT
|
||||
- SwiftLint
|
||||
- SwiftyBeaver
|
||||
- UICollectionViewLeftAlignedLayout
|
||||
- UICollectionViewRightAlignedLayout
|
||||
- WeakDictionary
|
||||
@@ -202,9 +159,6 @@ CHECKOUT OPTIONS:
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58
|
||||
BlueCryptor: b0aee3d9b8f367b49b30de11cda90e1735571c24
|
||||
BlueECC: 0d18e93347d3ec6d41416de21c1ffa4d4cd3c2cc
|
||||
BlueRSA: dfeef51db96bcc4edec654956c1581adbda4e6a3
|
||||
Down: b6ba1bc985c9d2f4e15e3b293d2207766fa12612
|
||||
DSBottomSheet: ca0ac37eb5af2dd54663f86b84382ed90a59be2a
|
||||
DSWaveformImage: 3c718a0cf99291887ee70d1d0c18d80101d3d9ce
|
||||
@@ -213,32 +167,23 @@ SPEC CHECKSUMS:
|
||||
DTTJailbreakDetection: 5e356c5badc17995f65a83ed9483f787a0057b71
|
||||
FlowCommoniOS: ca92071ab526dc89905495a37844fd7e78d1a7f2
|
||||
GBDeviceInfo: 5d62fa85bdcce3ed288d83c28789adf1173e4376
|
||||
GZIP: e6922ed5bdd1d77d84589d50821ac34ea0c38d4b
|
||||
Introspect: 4cc1e4c34dd016540c8d86a591c231c09dafbee3
|
||||
JitsiMeetSDKLite: 895213158cf62342069a10634a41d2f1c00057f7
|
||||
JitsiWebRTC: 80f62908fcf2a1160e0d14b584323fb6e6be630b
|
||||
GZIP: 3c0abf794bfce8c7cb34ea05a1837752416c8868
|
||||
Introspect: b66b675de8a85d9ef832f3a710d8e3c7db186884
|
||||
KeychainAccess: c0c4f7f38f6fc7bbe58f5702e25f7bd2f65abf51
|
||||
KituraContracts: e845e60dc8627ad0a76fa55ef20a45451d8f830b
|
||||
KTCenterFlowLayout: 6e02b50ab2bd865025ae82fe266ed13b6d9eaf97
|
||||
libbase58: 8abc2a53ac38cd37720c0acbc53ef3660e9016c2
|
||||
libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75
|
||||
LoggerAPI: ad9c4a6f1e32f518fdb43a1347ac14d765ab5e3d
|
||||
Logging: beeb016c9c80cf77042d62e83495816847ef108b
|
||||
MatomoTracker: 1d98ddc58322fd9d65e1a6886b8e41363047bd13
|
||||
MatrixSDK: f92ffead50eda83c99786afefed9be739987f338
|
||||
MatrixSDKCrypto: bf08b72f2cd015d8749420a2b8b92fc0536bedf4
|
||||
OLMKit: da115f16582e47626616874e20f7bb92222c7a51
|
||||
PostHog: 660ec6c9d80cec17b685e148f17f6785a88b597d
|
||||
ReadMoreTextView: 19147adf93abce6d7271e14031a00303fe28720d
|
||||
Realm: 9ca328bd7e700cc19703799785e37f77d1a130f2
|
||||
Reusable: 6bae6a5e8aa793c9c441db0213c863a64bce9136
|
||||
Sentry: 63ca44f5e0c8cea0ee5a07686b02e56104f41ef7
|
||||
SideMenu: f583187d21c5b1dd04c72002be544b555a2627a2
|
||||
SwiftBase32: 9399c25a80666dc66b51e10076bf591e3bbb8f17
|
||||
SwiftFormat: 710117321c55c82675c0dc03055128efbb13c38f
|
||||
SwiftGen: 1366a7f71aeef49954ca5a63ba4bef6b0f24138c
|
||||
SwiftJWT: 88c412708f58c169d431d344c87bc79a87c830ae
|
||||
SwiftLint: 32ee33ded0636d0905ef6911b2b67bbaeeedafa5
|
||||
SwiftFormat: 0e0b577434e6aa63bc82a8905b40d9597b8452d4
|
||||
SwiftGen: 4993cbf71cbc4886f775e26f8d5c3a1188ec9f99
|
||||
SwiftLint: 3fe909719babe5537c552ee8181c0031392be933
|
||||
SwiftyBeaver: 84069991dd5dca07d7069100985badaca7f0ce82
|
||||
UICollectionViewLeftAlignedLayout: 830bf6fa5bab9f9b464f62e3384f9d2e00b3c0f6
|
||||
UICollectionViewRightAlignedLayout: 823eef8c567eba4a44c21bc2ffcb0d0d5f361e2d
|
||||
@@ -246,6 +191,6 @@ SPEC CHECKSUMS:
|
||||
zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c
|
||||
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5
|
||||
|
||||
PODFILE CHECKSUM: 6becaa723b08ad793b53fc0361096601413eb780
|
||||
PODFILE CHECKSUM: 3c3cad2e80e90b989d5bfc929c8cf68d8b656d04
|
||||
|
||||
COCOAPODS: 1.14.3
|
||||
|
||||
@@ -69,12 +69,16 @@ class CallPresenter: NSObject {
|
||||
}
|
||||
|
||||
private var activeCallVC: UIViewController? {
|
||||
#if canImport(JitsiMeetSDK)
|
||||
return callVCs.values.filter { (callVC) -> Bool in
|
||||
guard let call = callVC.mxCall else {
|
||||
return false
|
||||
}
|
||||
return !call.isOnHold
|
||||
}.first ?? jitsiVC
|
||||
#else
|
||||
return nil
|
||||
#endif
|
||||
}
|
||||
|
||||
private var onHoldCallVCs: [CallViewController] {
|
||||
@@ -172,6 +176,7 @@ class CallPresenter: NSObject {
|
||||
}
|
||||
|
||||
private func startJitsiCall(withWidget widget: Widget) {
|
||||
#if canImport(JitsiMeetSDK)
|
||||
MXLog.debug("[CallPresenter] startJitsiCall")
|
||||
|
||||
if let uuid = self.jitsiCalls.first(where: { $0.value.widgetId == widget.widgetId })?.key {
|
||||
@@ -215,9 +220,11 @@ class CallPresenter: NSObject {
|
||||
self.jitsiCalls[newUUID] = widget
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
func endActiveJitsiCall() {
|
||||
#if canImport(JitsiMeetSDK)
|
||||
MXLog.debug("[CallPresenter] endActiveJitsiCall")
|
||||
|
||||
guard let jitsiVC = jitsiVC else {
|
||||
@@ -258,9 +265,11 @@ class CallPresenter: NSObject {
|
||||
self.jitsiCalls.removeValue(forKey: uuid)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
func processWidgetEvent(_ event: MXEvent, inSession session: MXSession) {
|
||||
#if canImport(JitsiMeetSDK)
|
||||
MXLog.debug("[CallPresenter] processWidgetEvent")
|
||||
|
||||
guard let widget = Widget(widgetEvent: event, inMatrixSession: session) else {
|
||||
@@ -345,6 +354,7 @@ class CallPresenter: NSObject {
|
||||
JMCallKitProxy.reportCall(with: uuid, endedAt: nil, reason: .remoteEnded)
|
||||
self.jitsiCalls.removeValue(forKey: uuid)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
@@ -419,11 +429,13 @@ class CallPresenter: NSObject {
|
||||
}
|
||||
|
||||
private func logCallVC(_ callVC: UIViewController, log: String) {
|
||||
#if canImport(JitsiMeetSDK)
|
||||
if let callVC = callVC as? CallViewController {
|
||||
MXLog.debug("[CallPresenter] \(log): Matrix call: \(String(describing: callVC.mxCall?.callId))")
|
||||
} else if let callVC = callVC as? JitsiViewController {
|
||||
MXLog.debug("[CallPresenter] \(log): Jitsi call: \(callVC.widget.widgetId)")
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - Observers
|
||||
@@ -619,6 +631,7 @@ class CallPresenter: NSObject {
|
||||
|
||||
@objc
|
||||
private func groupCallTileTapped(_ notification: Notification) {
|
||||
#if canImport(JitsiMeetSDK)
|
||||
MXLog.debug("[CallPresenter] groupCallTileTapped")
|
||||
|
||||
guard let bubbleData = notification.object as? RoomBubbleCellData else {
|
||||
@@ -653,6 +666,7 @@ class CallPresenter: NSObject {
|
||||
} else {
|
||||
presentCallVC(jitsiVC)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - Call Screens
|
||||
@@ -728,10 +742,12 @@ class CallPresenter: NSObject {
|
||||
/// Should be used for calls that are not handled through JMCallKitProxy,
|
||||
/// as these should be removed regardless.
|
||||
private func hangupUnhandledCallIfNeeded(_ widget: Widget) {
|
||||
#if canImport(JitsiMeetSDK)
|
||||
guard !widget.isActive, widget.widgetId == jitsiVC?.widget.widgetId else { return }
|
||||
|
||||
MXLog.debug("[CallPresenter] hangupUnhandledCallIfNeeded: ending call with Widget id: %@", widget.widgetId)
|
||||
endActiveJitsiCall()
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain";
|
||||
failure(self.errorForUnavailableJitsiURL);
|
||||
return nil;
|
||||
}
|
||||
|
||||
#ifdef CALL_STACK_JINGLE
|
||||
JitsiService *jitsiService = JitsiService.shared;
|
||||
|
||||
operation = [jitsiService createJitsiWidgetContentWithJitsiServerURL:preferredJitsiServerUrl roomID:room.roomId isAudioOnly:!video success:^(NSDictionary * _Nonnull widgetContent) {
|
||||
@@ -306,6 +306,9 @@ NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain";
|
||||
}];
|
||||
|
||||
return operation;
|
||||
#else
|
||||
return nil;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (MXHTTPOperation *)closeWidget:(NSString *)widgetId inRoom:(MXRoom *)room success:(void (^)(void))success failure:(void (^)(NSError *))failure
|
||||
@@ -412,6 +415,8 @@ NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain";
|
||||
|
||||
// Broadcast the generic notification
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kWidgetManagerDidUpdateWidgetNotification object:widget];
|
||||
|
||||
#ifdef CALL_STACK_JINGLE
|
||||
// End jitsi call if a active call exists and widget has been updated to not be active
|
||||
if ([[AppDelegate theDelegate].callPresenter.jitsiVC.widget.widgetId isEqualToString: widget.widgetId] &&
|
||||
[[AppDelegate theDelegate].callPresenter.jitsiVC.widget.roomId isEqualToString: event.roomId] &&
|
||||
@@ -419,6 +424,7 @@ NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain";
|
||||
{
|
||||
[[AppDelegate theDelegate].callPresenter endActiveJitsiCall];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#if POSTHOG
|
||||
import PostHog
|
||||
#endif
|
||||
import AnalyticsEvents
|
||||
|
||||
/// A class responsible for managing a variety of analytics clients
|
||||
@@ -34,19 +36,28 @@ import AnalyticsEvents
|
||||
/// The singleton instance to be used within the Riot target.
|
||||
static let shared = Analytics()
|
||||
|
||||
#if POSTHOG
|
||||
/// The analytics client to send events with.
|
||||
private var client: AnalyticsClientProtocol = PostHogAnalyticsClient.shared
|
||||
#endif
|
||||
|
||||
#if SENTRY
|
||||
/// The monitoring client to track crashes, issues and performance
|
||||
private var monitoringClient = SentryMonitoringClient()
|
||||
|
||||
#endif
|
||||
/// The service used to interact with account data settings.
|
||||
private var service: AnalyticsService?
|
||||
|
||||
private var viewRoomActiveSpace: AnalyticsViewRoomActiveSpace = .home
|
||||
|
||||
/// Whether or not the object is enabled and sending events to the server.
|
||||
var isRunning: Bool { client.isRunning }
|
||||
var isRunning: Bool {
|
||||
#if POSTHOG
|
||||
client.isRunning
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Whether to show the user the analytics opt in prompt.
|
||||
var shouldShowAnalyticsPrompt: Bool {
|
||||
@@ -103,8 +114,12 @@ import AnalyticsEvents
|
||||
|
||||
// The order is important here. PostHog ignores the reset if stopped.
|
||||
reset()
|
||||
#if POSTHOG
|
||||
client.stop()
|
||||
#endif
|
||||
#if SENTRY
|
||||
monitoringClient.stop()
|
||||
#endif
|
||||
|
||||
MXLog.debug("[Analytics] Stopped.")
|
||||
}
|
||||
@@ -113,11 +128,18 @@ import AnalyticsEvents
|
||||
func startIfEnabled() {
|
||||
guard RiotSettings.shared.enableAnalytics, !isRunning else { return }
|
||||
|
||||
#if POSTHOG
|
||||
client.start()
|
||||
#endif
|
||||
#if SENTRY
|
||||
monitoringClient.start()
|
||||
|
||||
#endif
|
||||
// Sanity check in case something went wrong.
|
||||
#if POSTHOG
|
||||
guard client.isRunning else { return }
|
||||
#else
|
||||
return
|
||||
#endif
|
||||
|
||||
MXLog.debug("[Analytics] Started.")
|
||||
|
||||
@@ -162,8 +184,12 @@ import AnalyticsEvents
|
||||
/// account used isn't associated with the previous one.
|
||||
/// Note: **MUST** be called before stopping PostHog or the reset is ignored.
|
||||
func reset() {
|
||||
#if POSTHOG
|
||||
client.reset()
|
||||
#endif
|
||||
#if SENTRY
|
||||
monitoringClient.reset()
|
||||
#endif
|
||||
MXLog.debug("[Analytics] Reset.")
|
||||
RiotSettings.shared.isIdentifiedForAnalytics = false
|
||||
|
||||
@@ -175,7 +201,9 @@ import AnalyticsEvents
|
||||
/// Normally events are sent in batches. Call this method when you need an event
|
||||
/// to be sent immediately.
|
||||
func forceUpload() {
|
||||
#if POSTHOG
|
||||
client.flush()
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
@@ -187,8 +215,10 @@ import AnalyticsEvents
|
||||
MXLog.error("[Analytics] identify(with:) called before an ID has been generated.")
|
||||
return
|
||||
}
|
||||
|
||||
#if POSTHOG
|
||||
client.identify(id: id)
|
||||
#endif
|
||||
|
||||
MXLog.debug("[Analytics] Identified.")
|
||||
RiotSettings.shared.isIdentifiedForAnalytics = true
|
||||
}
|
||||
@@ -196,7 +226,9 @@ import AnalyticsEvents
|
||||
/// Capture an event in the `client`.
|
||||
/// - Parameter event: The event to capture.
|
||||
private func capture(event: AnalyticsEventProtocol) {
|
||||
#if POSTHOG
|
||||
client.capture(event)
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Update `viewRoomActiveSpace` property according to the current value of `exploringSpace` and `activeSpace` properties.
|
||||
@@ -244,7 +276,9 @@ extension Analytics {
|
||||
ftueUseCaseSelection: ftueUseCase?.analyticsName,
|
||||
numFavouriteRooms: numFavouriteRooms,
|
||||
numSpaces: numSpaces)
|
||||
#if POSTHOG
|
||||
client.updateUserProperties(userProperties)
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Track the registration of a new user.
|
||||
@@ -260,7 +294,9 @@ extension Analytics {
|
||||
/// - milliseconds: An optional value representing how long the screen was shown for in milliseconds.
|
||||
func trackScreen(_ screen: AnalyticsScreen, duration milliseconds: Int?) {
|
||||
let event = AnalyticsEvent.MobileScreen(durationMs: milliseconds, screenName: screen.screenName)
|
||||
#if POSTHOG
|
||||
client.screen(event)
|
||||
#endif
|
||||
}
|
||||
|
||||
/// The the presentation of a screen without including a duration
|
||||
@@ -276,7 +312,9 @@ extension Analytics {
|
||||
/// - index: The index of the element, if it's in a list of elements
|
||||
func trackInteraction(_ uiElement: AnalyticsUIElement, interactionType: AnalyticsEvent.Interaction.InteractionType, index: Int?) {
|
||||
let event = AnalyticsEvent.Interaction(index: index, interactionType: interactionType, name: uiElement.name)
|
||||
#if POSTHOG
|
||||
client.capture(event)
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Track an element that has been tapped without including an index
|
||||
@@ -296,7 +334,9 @@ extension Analytics {
|
||||
func trackAuthUnauthenticatedError(softLogout: Bool, refreshTokenAuth: Bool, errorCode: String, errorReason: String) {
|
||||
let errorCode = AnalyticsEvent.UnauthenticatedError.ErrorCode(rawValue: errorCode) ?? .M_UNKNOWN
|
||||
let event = AnalyticsEvent.UnauthenticatedError(errorCode: errorCode, errorReason: errorReason, refreshTokenAuth: refreshTokenAuth, softLogout: softLogout)
|
||||
#if POSTHOG
|
||||
client.capture(event)
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Track whether the user accepted or declined the terms to an identity server.
|
||||
@@ -346,7 +386,12 @@ extension Analytics: MXAnalyticsDelegate {
|
||||
}
|
||||
|
||||
func startDurationTracking(forName name: String, operation: String) -> StopDurationTracking {
|
||||
|
||||
#if SENTRY
|
||||
return monitoringClient.startPerformanceTracking(name: name, operation: operation)
|
||||
#else
|
||||
return {}
|
||||
#endif
|
||||
}
|
||||
|
||||
func trackCallStarted(withVideo isVideo: Bool, numberOfParticipants: Int, incoming isIncoming: Bool) {
|
||||
@@ -399,7 +444,9 @@ extension Analytics: MXAnalyticsDelegate {
|
||||
}
|
||||
|
||||
func trackNonFatalIssue(_ issue: String, details: [String: Any]?) {
|
||||
monitoringClient.trackNonFatalIssue(issue, details: details)
|
||||
#if SENTRY
|
||||
monitoringClient?.trackNonFatalIssue(issue, details: details)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#if POSTHOG
|
||||
import PostHog
|
||||
|
||||
extension PHGPostHogConfiguration {
|
||||
@@ -27,3 +28,4 @@ extension PHGPostHogConfiguration {
|
||||
return postHogConfiguration
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#if POSTHOG
|
||||
import PostHog
|
||||
import AnalyticsEvents
|
||||
|
||||
@@ -110,3 +111,4 @@ extension PostHogAnalyticsClient: RemoteFeaturesClientProtocol {
|
||||
postHog?.isFeatureEnabled(feature) == true
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#if SENTRY
|
||||
import Foundation
|
||||
import Sentry
|
||||
import MatrixSDK
|
||||
@@ -83,3 +84,4 @@ struct SentryMonitoringClient {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,10 @@
|
||||
#import "MatrixKit.h"
|
||||
|
||||
#import "MasterTabBarController.h"
|
||||
|
||||
#ifdef CALL_STACK_JINGLE
|
||||
#import "JitsiViewController.h"
|
||||
#endif
|
||||
|
||||
#import "RageShakeManager.h"
|
||||
|
||||
|
||||
@@ -85,7 +85,11 @@ NSString *const AppDelegateDidValidateEmailNotificationClientSecretKey = @"AppDe
|
||||
|
||||
NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUniversalLinkDidChangeNotification";
|
||||
|
||||
@interface LegacyAppDelegate () <GDPRConsentViewControllerDelegate, KeyVerificationCoordinatorBridgePresenterDelegate, PushNotificationServiceDelegate, SetPinCoordinatorBridgePresenterDelegate, CallPresenterDelegate, SpaceDetailPresenterDelegate, SecureBackupSetupCoordinatorBridgePresenterDelegate>
|
||||
@interface LegacyAppDelegate () <GDPRConsentViewControllerDelegate, KeyVerificationCoordinatorBridgePresenterDelegate, PushNotificationServiceDelegate, SetPinCoordinatorBridgePresenterDelegate,
|
||||
#ifdef CALL_STACK_JINGLE
|
||||
CallPresenterDelegate,
|
||||
#endif
|
||||
SpaceDetailPresenterDelegate, SecureBackupSetupCoordinatorBridgePresenterDelegate>
|
||||
{
|
||||
/**
|
||||
Reachability observer
|
||||
|
||||
@@ -52,7 +52,9 @@
|
||||
|
||||
#import "ReadReceiptsViewController.h"
|
||||
|
||||
#ifdef CALL_STACK_JINGLE
|
||||
#import "JitsiViewController.h"
|
||||
#endif
|
||||
|
||||
#import "RoomEmptyBubbleCell.h"
|
||||
#import "RoomMembershipExpandedBubbleCell.h"
|
||||
@@ -2917,7 +2919,11 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
|
||||
- (BOOL)isRoomHavingAJitsiCallForWidgetId:(NSString*)widgetId
|
||||
{
|
||||
#ifdef CALL_STACK_JINGLE
|
||||
return [[AppDelegate theDelegate].callPresenter.jitsiVC.widget.roomId isEqualToString:widgetId];
|
||||
#else
|
||||
return NO;
|
||||
#endif
|
||||
}
|
||||
|
||||
#pragma mark - Dialpad
|
||||
@@ -3991,10 +3997,12 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
}
|
||||
}];
|
||||
|
||||
#ifdef CALL_STACK_JINGLE
|
||||
MXEvent *widgetEvent = userInfo[kMXKRoomBubbleCellEventKey];
|
||||
Widget *widget = [[Widget alloc] initWithWidgetEvent:widgetEvent
|
||||
inMatrixSession:self.customizedRoomDataSource.mxSession];
|
||||
[[JitsiService shared] resetDeclineForWidgetWithId:widget.widgetId];
|
||||
#endif
|
||||
}
|
||||
else if ([actionIdentifier isEqualToString:RoomGroupCallStatusCell.leaveAction])
|
||||
{
|
||||
@@ -4003,11 +4011,13 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
}
|
||||
else if ([actionIdentifier isEqualToString:RoomGroupCallStatusCell.declineAction])
|
||||
{
|
||||
#ifdef CALL_STACK_JINGLE
|
||||
MXEvent *widgetEvent = userInfo[kMXKRoomBubbleCellEventKey];
|
||||
Widget *widget = [[Widget alloc] initWithWidgetEvent:widgetEvent
|
||||
inMatrixSession:self.customizedRoomDataSource.mxSession];
|
||||
[[JitsiService shared] declineWidgetWithId:widget.widgetId];
|
||||
[self reloadBubblesTable:YES];
|
||||
#endif
|
||||
}
|
||||
else if ([actionIdentifier isEqualToString:RoomCreationIntroCell.tapOnAvatarView])
|
||||
{
|
||||
|
||||
@@ -90,8 +90,12 @@ class RoomGroupCallStatusCell: RoomCallBaseCell {
|
||||
}
|
||||
|
||||
private var isJoined: Bool {
|
||||
#if canImport(JitsiMeetSDK)
|
||||
return widgetId != nil &&
|
||||
AppDelegate.theDelegate().callPresenter.jitsiVC?.widget.widgetId == widgetId
|
||||
AppDelegate.theDelegate().callPresenter.jitsiVC?.widget.widgetId == widgetId
|
||||
#else
|
||||
return false
|
||||
#endif
|
||||
}
|
||||
|
||||
private var actionUserInfo: [AnyHashable: Any]? {
|
||||
@@ -236,6 +240,7 @@ class RoomGroupCallStatusCell: RoomCallBaseCell {
|
||||
if isIncoming && !isJoined &&
|
||||
TimeInterval(widgetEvent.age)/MSEC_PER_SEC < Constants.secondsToDisplayAnswerDeclineOptions {
|
||||
|
||||
#if canImport(JitsiMeetSDK)
|
||||
if JitsiService.shared.isWidgetDeclined(withId: widgetId) {
|
||||
innerContentView.callerNameLabel.text = room.summary.displayName
|
||||
room.summary.setRoomAvatarImageIn(innerContentView.avatarImageView)
|
||||
@@ -256,6 +261,7 @@ class RoomGroupCallStatusCell: RoomCallBaseCell {
|
||||
viewState = .ringing
|
||||
statusText = nil
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
innerContentView.callerNameLabel.text = room.summary.displayName
|
||||
|
||||
@@ -296,6 +302,7 @@ class RoomGroupCallStatusCell: RoomCallBaseCell {
|
||||
} else if !self.isJoined &&
|
||||
TimeInterval(widgetEvent.age)/MSEC_PER_SEC < Constants.secondsToDisplayAnswerDeclineOptions {
|
||||
|
||||
#if canImport(JitsiMeetSDK)
|
||||
if JitsiService.shared.isWidgetDeclined(withId: widgetId) {
|
||||
self.viewState = .declined
|
||||
self.statusText = VectorL10n.eventFormatterCallYouDeclined
|
||||
@@ -303,6 +310,7 @@ class RoomGroupCallStatusCell: RoomCallBaseCell {
|
||||
self.viewState = .ringing
|
||||
self.statusText = nil
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
self.viewState = .active
|
||||
self.statusText = VectorL10n.eventFormatterCallActiveVideo
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#if canImport(JitsiMeetSDK)
|
||||
import Foundation
|
||||
import SwiftBase32
|
||||
|
||||
@@ -24,3 +25,4 @@ final class Base32Coder {
|
||||
return padding ? encodedString : encodedString.replacingOccurrences(of: "=", with: "")
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -89,6 +89,7 @@ targets:
|
||||
- "Modules/Room/EmojiPicker/Data/EmojiMart/EmojiJSONStore.swift"
|
||||
- "Modules/Analytics/Test/Unit/BWIAnalyticsTests.swift"
|
||||
- "**/*.strings" # Exclude all strings files
|
||||
- "Modules/Integrations/Widgets/Jitsi/*"
|
||||
- path: ../bwi
|
||||
excludes:
|
||||
- "Tests"
|
||||
|
||||
@@ -75,6 +75,7 @@ targets:
|
||||
- "Modules/Room/EmojiPicker/Data/EmojiMart/EmojiJSONStore.swift"
|
||||
- "Modules/Analytics/Test/Unit/BWIAnalyticsTests.swift"
|
||||
- "**/*.strings" # Exclude all strings files
|
||||
- "Modules/Integrations/Widgets/Jitsi/*"
|
||||
- path: ../bwi
|
||||
excludes:
|
||||
- "Tests"
|
||||
|
||||
@@ -74,6 +74,7 @@ targets:
|
||||
- "Modules/Room/EmojiPicker/Data/EmojiMart/EmojiJSONStore.swift"
|
||||
- "Modules/Analytics/Test/Unit/BWIAnalyticsTests.swift"
|
||||
- "**/*.strings" # Exclude all strings files
|
||||
- "Modules/Integrations/Widgets/Jitsi/*"
|
||||
- path: ../bwi
|
||||
excludes:
|
||||
- "Tests"
|
||||
|
||||
@@ -74,6 +74,7 @@ targets:
|
||||
- "Modules/Room/EmojiPicker/Data/EmojiMart/EmojiJSONStore.swift"
|
||||
- "Modules/Analytics/Test/Unit/BWIAnalyticsTests.swift"
|
||||
- "**/*.strings" # Exclude all strings files
|
||||
- "Modules/Integrations/Widgets/Jitsi/*"
|
||||
- path: ../bwi
|
||||
excludes:
|
||||
- "Tests"
|
||||
|
||||
@@ -87,6 +87,7 @@ targets:
|
||||
- "Modules/Room/EmojiPicker/Data/EmojiMart/EmojiJSONStore.swift"
|
||||
- "Modules/Analytics/Test/Unit/BWIAnalyticsTests.swift"
|
||||
- "**/*.strings" # Exclude all strings files
|
||||
- "Modules/Integrations/Widgets/Jitsi/*"
|
||||
- path: ../bwi
|
||||
excludes:
|
||||
- "Tests"
|
||||
|
||||
Reference in New Issue
Block a user