From e23309765a4ede0e3a9a79f3b602f6c6a4a7e93b Mon Sep 17 00:00:00 2001 From: QuentinArguillere Date: Tue, 16 Jan 2024 21:18:39 +0100 Subject: [PATCH] Remove lime, groupchat, conference, ephemeral capabilities from core. Also remove conference factory from account when we login. THIS SHOULD BE UNDONE WHEN PROCEEDING TO NEXT STEP OF THE 6.0 RELEASE --- Linphone/Core/CoreContext.swift | 18 ++++++++++++++---- .../Viewmodel/AccountLoginViewModel.swift | 6 ++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Linphone/Core/CoreContext.swift b/Linphone/Core/CoreContext.swift index a7211f1d6..8891a3254 100644 --- a/Linphone/Core/CoreContext.swift +++ b/Linphone/Core/CoreContext.swift @@ -120,6 +120,16 @@ final class CoreContext: ObservableObject { newParams?.pushNotificationConfig?.provider = "apns" + pushEnvironment account.params = newParams } + + // Remove specs for 6.0 first version + Log.info("Removing spec 'conference' from core for this version") + self.mCore.removeLinphoneSpec(spec: "conference") + Log.info("Removing spec 'ephemeral' from core for this version") + self.mCore.removeLinphoneSpec(spec: "ephemeral") + Log.info("Removing spec 'groupchat' from core for this version") + self.mCore.removeLinphoneSpec(spec: "groupchat") + Log.info("Removing spec 'lime' from core for this version") + self.mCore.removeLinphoneSpec(spec: "lime") } }) @@ -129,7 +139,7 @@ final class CoreContext: ObservableObject { // Create a Core listener to listen for the callback we need // In this case, we want to know about the account registration status self.mCoreSuscriptions.insert(self.mCore.publisher?.onConfiguringStatus?.postOnMainQueue { (cbVal: (core: Core, status: Config.ConfiguringState, message: String)) in - NSLog("New configuration state is \(cbVal.status) = \(cbVal.message)\n") + Log.info("New configuration state is \(cbVal.status) = \(cbVal.message)\n") if cbVal.status == Config.ConfiguringState.Successful { ToastViewModel.shared.toastMessage = "Successful" ToastViewModel.shared.displayToast = true @@ -145,7 +155,7 @@ final class CoreContext: ObservableObject { self.mCoreSuscriptions.insert(self.mCore.publisher?.onAccountRegistrationStateChanged?.postOnMainQueue { (cbVal: (core: Core, account: Account, state: RegistrationState, message: String)) in // If account has been configured correctly, we will go through Progress and Ok states // Otherwise, we will be Failed. - NSLog("New registration state is \(cbVal.state) for user id " + + Log.info("New registration state is \(cbVal.state) for user id " + "\( String(describing: cbVal.account.params?.identityAddress?.asString())) = \(cbVal.message)\n") if cbVal.state == .Ok { self.loggingInProgress = false @@ -227,7 +237,7 @@ final class CoreContext: ObservableObject { // We can't rely on defaultAccount?.params?.isPublishEnabled // as it will be modified by the SDK when changing the presence status if self.mCore.config!.getBool(section: "app", key: "publish_presence", defaultValue: true) { - NSLog("App is in foreground, PUBLISHING presence as Online") + Log.info("App is in foreground, PUBLISHING presence as Online") self.mCore.consolidatedPresence = ConsolidatedPresence.Online } } @@ -238,7 +248,7 @@ final class CoreContext: ObservableObject { // We can't rely on defaultAccount?.params?.isPublishEnabled // as it will be modified by the SDK when changing the presence status if self.mCore.config!.getBool(section: "app", key: "publish_presence", defaultValue: true) { - NSLog("App is in background, un-PUBLISHING presence info") + Log.info("App is in background, un-PUBLISHING presence info") // We don't use ConsolidatedPresence.Busy but Offline to do an unsubscribe, // Flexisip will handle the Busy status depending on other devices self.mCore.consolidatedPresence = ConsolidatedPresence.Offline diff --git a/Linphone/UI/Assistant/Viewmodel/AccountLoginViewModel.swift b/Linphone/UI/Assistant/Viewmodel/AccountLoginViewModel.swift index 819931bd3..98a4f43f9 100644 --- a/Linphone/UI/Assistant/Viewmodel/AccountLoginViewModel.swift +++ b/Linphone/UI/Assistant/Viewmodel/AccountLoginViewModel.swift @@ -98,6 +98,12 @@ class AccountLoginViewModel: ObservableObject { #endif accountParams.pushNotificationConfig?.provider = "apns" + pushEnvironment + // Temporary disable these features are they are not used for 6.0 first version + accountParams.conferenceFactoryUri = nil + accountParams.conferenceFactoryAddress = nil + accountParams.audioVideoConferenceFactoryAddress = nil + accountParams.limeServerUrl = nil + // Now that our AccountParams is configured, we can create the Account object let account = try core.createAccount(params: accountParams)