From 03bd42d7504e5352a699b25946f69ecff762e7a8 Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Mon, 3 Mar 2025 13:53:24 +0100 Subject: [PATCH] Move from Pod to SPM for linphone-sdk --- Linphone.xcodeproj/project.pbxproj | 39 +++++++++++++++++-- .../xcshareddata/xcschemes/Linphone.xcscheme | 6 +-- Linphone/Core/CoreContext.swift | 1 + .../Viewmodel/RegisterViewModel.swift | 1 + .../Call/Model/CallMediaEncryptionModel.swift | 1 + Linphone/UI/Call/Model/CallStatsModel.swift | 1 + Linphone/UI/Call/Model/ParticipantModel.swift | 1 + .../UI/Call/ViewModel/CallViewModel.swift | 1 + .../Contacts/ViewModel/ContactViewModel.swift | 1 + .../ViewModel/ContactsListViewModel.swift | 1 + .../ViewModel/EditContactViewModel.swift | 1 + .../FavoriteContactsListViewModel.swift | 1 + .../ConversationForwardMessageViewModel.swift | 1 + .../ConversationsListViewModel.swift | 1 + .../StartConversationViewModel.swift | 1 + .../Main/Help/ViewModel/HelpViewModel.swift | 1 + .../ViewModel/HistoryListViewModel.swift | 1 + .../ViewModel/StartCallViewModel.swift | 1 + .../Main/Meetings/Models/MeetingModel.swift | 1 + .../ViewModel/AccountProfileViewModel.swift | 1 + .../ViewModel/AccountSettingsViewModel.swift | 1 + .../ViewModel/SettingsViewModel.swift | 1 + .../Main/Viewmodel/SharedMainViewModel.swift | 1 + Linphone/Utils/Log.swift | 2 +- Linphone/Utils/MagicSearchSingleton.swift | 1 + Podfile | 6 --- 26 files changed, 61 insertions(+), 14 deletions(-) diff --git a/Linphone.xcodeproj/project.pbxproj b/Linphone.xcodeproj/project.pbxproj index 3d03fb826..d19a401d5 100644 --- a/Linphone.xcodeproj/project.pbxproj +++ b/Linphone.xcodeproj/project.pbxproj @@ -7,7 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 4ED1F0A881A9ACB5977A8987 /* (null) in Frameworks */ = {isa = PBXBuildFile; }; + 4ED1F0A881A9ACB5977A8987 /* BuildFile in Frameworks */ = {isa = PBXBuildFile; }; 660AAF7F2B839272004C0FA6 /* msgNotificationService.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 660AAF7B2B839271004C0FA6 /* msgNotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 660D8A712B517D260092694D /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 660D8A702B517D260092694D /* GoogleService-Info.plist */; }; 6613A0AE2BAEB7DF008923A4 /* MeetingFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6613A0AD2BAEB7DF008923A4 /* MeetingFragment.swift */; }; @@ -43,6 +43,8 @@ 66FBFC4B2B83BD7B00BC6AB1 /* CoreExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66C491FA2B24D32600CEA16D /* CoreExtension.swift */; }; 66FDB7812C7C689A00561566 /* EventEditViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66FDB7802C7C689A00561566 /* EventEditViewController.swift */; }; C60E8F192C0F649200A06DB8 /* UIApplicationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C60E8F182C0F649200A06DB8 /* UIApplicationExtension.swift */; }; + C618BF562D75CA03005A00E0 /* linphonesw in Frameworks */ = {isa = PBXBuildFile; productRef = C618BF552D75CA03005A00E0 /* linphonesw */; }; + C618BF582D75CA0D005A00E0 /* linphonesw in Frameworks */ = {isa = PBXBuildFile; productRef = C618BF572D75CA0D005A00E0 /* linphonesw */; }; C62817282C1B389700DBA646 /* SideMenuAccountRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = C62817272C1B389700DBA646 /* SideMenuAccountRow.swift */; }; C628172E2C1C3A3600DBA646 /* AccountExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C628172D2C1C3A3600DBA646 /* AccountExtension.swift */; }; C62817302C1C3DCC00DBA646 /* AccountModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C628172F2C1C3DCC00DBA646 /* AccountModel.swift */; }; @@ -405,6 +407,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + C618BF582D75CA0D005A00E0 /* linphonesw in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -412,7 +415,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4ED1F0A881A9ACB5977A8987 /* (null) in Frameworks */, + C618BF562D75CA03005A00E0 /* linphonesw in Frameworks */, + 4ED1F0A881A9ACB5977A8987 /* BuildFile in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1066,7 +1070,7 @@ }; }; }; - buildConfigurationList = D719ABAE2ABC67BF00B41C10 /* Build configuration list for PBXProject "Linphone" */; + buildConfigurationList = D719ABAE2ABC67BF00B41C10 /* Build configuration list for PBXProject "linphone" */; compatibilityVersion = "Xcode 14.0"; developmentRegion = en; hasScannedForEncodings = 0; @@ -1075,6 +1079,9 @@ Base, ); mainGroup = D719ABAA2ABC67BF00B41C10; + packageReferences = ( + C618BF542D75CA03005A00E0 /* XCRemoteSwiftPackageReference "linphone-sdk-swift-ios" */, + ); productRefGroup = D719ABB42ABC67BF00B41C10 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -1709,7 +1716,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - D719ABAE2ABC67BF00B41C10 /* Build configuration list for PBXProject "Linphone" */ = { + D719ABAE2ABC67BF00B41C10 /* Build configuration list for PBXProject "linphone" */ = { isa = XCConfigurationList; buildConfigurations = ( D719ABC02ABC67BF00B41C10 /* Debug */, @@ -1728,6 +1735,30 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + C618BF542D75CA03005A00E0 /* XCRemoteSwiftPackageReference "linphone-sdk-swift-ios" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://gitlab.linphone.org/BC/public/linphone-sdk-swift-ios.git"; + requirement = { + branch = beta; + kind = branch; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + C618BF552D75CA03005A00E0 /* linphonesw */ = { + isa = XCSwiftPackageProductDependency; + package = C618BF542D75CA03005A00E0 /* XCRemoteSwiftPackageReference "linphone-sdk-swift-ios" */; + productName = linphonesw; + }; + C618BF572D75CA0D005A00E0 /* linphonesw */ = { + isa = XCSwiftPackageProductDependency; + package = C618BF542D75CA03005A00E0 /* XCRemoteSwiftPackageReference "linphone-sdk-swift-ios" */; + productName = linphonesw; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = D719ABAB2ABC67BF00B41C10 /* Project object */; } diff --git a/Linphone.xcodeproj/xcshareddata/xcschemes/Linphone.xcscheme b/Linphone.xcodeproj/xcshareddata/xcschemes/Linphone.xcscheme index f5986b566..6c21053ec 100644 --- a/Linphone.xcodeproj/xcshareddata/xcschemes/Linphone.xcscheme +++ b/Linphone.xcodeproj/xcshareddata/xcschemes/Linphone.xcscheme @@ -17,7 +17,7 @@ BlueprintIdentifier = "D719ABB22ABC67BF00B41C10" BuildableName = "Linphone.app" BlueprintName = "Linphone" - ReferencedContainer = "container:Linphone.xcodeproj"> + ReferencedContainer = "container:linphone.xcodeproj"> @@ -46,7 +46,7 @@ BlueprintIdentifier = "D719ABB22ABC67BF00B41C10" BuildableName = "Linphone.app" BlueprintName = "Linphone" - ReferencedContainer = "container:Linphone.xcodeproj"> + ReferencedContainer = "container:linphone.xcodeproj"> @@ -63,7 +63,7 @@ BlueprintIdentifier = "D719ABB22ABC67BF00B41C10" BuildableName = "Linphone.app" BlueprintName = "Linphone" - ReferencedContainer = "container:Linphone.xcodeproj"> + ReferencedContainer = "container:linphone.xcodeproj"> diff --git a/Linphone/Core/CoreContext.swift b/Linphone/Core/CoreContext.swift index f01e2f2ac..275a64c19 100644 --- a/Linphone/Core/CoreContext.swift +++ b/Linphone/Core/CoreContext.swift @@ -26,6 +26,7 @@ import linphone // needed for unwrapped function linphone_core_set_push_and_app_ import Combine import UniformTypeIdentifiers import Network +import SwiftUI #if USE_CRASHLYTICS import Firebase diff --git a/Linphone/UI/Assistant/Viewmodel/RegisterViewModel.swift b/Linphone/UI/Assistant/Viewmodel/RegisterViewModel.swift index 205d5f4d5..6993992c1 100644 --- a/Linphone/UI/Assistant/Viewmodel/RegisterViewModel.swift +++ b/Linphone/UI/Assistant/Viewmodel/RegisterViewModel.swift @@ -20,6 +20,7 @@ import Foundation import linphonesw import Combine +import SwiftUI // swiftlint:disable line_length // swiftlint:disable type_body_length diff --git a/Linphone/UI/Call/Model/CallMediaEncryptionModel.swift b/Linphone/UI/Call/Model/CallMediaEncryptionModel.swift index 6795591e1..6bb362a1f 100644 --- a/Linphone/UI/Call/Model/CallMediaEncryptionModel.swift +++ b/Linphone/UI/Call/Model/CallMediaEncryptionModel.swift @@ -19,6 +19,7 @@ import Foundation import linphonesw +import SwiftUI class CallMediaEncryptionModel: ObservableObject { var coreContext = CoreContext.shared diff --git a/Linphone/UI/Call/Model/CallStatsModel.swift b/Linphone/UI/Call/Model/CallStatsModel.swift index cdc8950ad..a92a951d5 100644 --- a/Linphone/UI/Call/Model/CallStatsModel.swift +++ b/Linphone/UI/Call/Model/CallStatsModel.swift @@ -19,6 +19,7 @@ import Foundation import linphonesw +import SwiftUI class SentVideoWindow: ObservableObject { var widthFactor: CGFloat = 1 diff --git a/Linphone/UI/Call/Model/ParticipantModel.swift b/Linphone/UI/Call/Model/ParticipantModel.swift index 007d0ac9a..19e22432c 100644 --- a/Linphone/UI/Call/Model/ParticipantModel.swift +++ b/Linphone/UI/Call/Model/ParticipantModel.swift @@ -19,6 +19,7 @@ import Foundation import linphonesw +import SwiftUI class ParticipantModel: ObservableObject { diff --git a/Linphone/UI/Call/ViewModel/CallViewModel.swift b/Linphone/UI/Call/ViewModel/CallViewModel.swift index 2d7d591e2..89254489e 100644 --- a/Linphone/UI/Call/ViewModel/CallViewModel.swift +++ b/Linphone/UI/Call/ViewModel/CallViewModel.swift @@ -21,6 +21,7 @@ import SwiftUI import linphonesw import AVFAudio import Combine +import SwiftUI // swiftlint:disable line_length // swiftlint:disable type_body_length diff --git a/Linphone/UI/Main/Contacts/ViewModel/ContactViewModel.swift b/Linphone/UI/Main/Contacts/ViewModel/ContactViewModel.swift index 061e60269..da1285b32 100644 --- a/Linphone/UI/Main/Contacts/ViewModel/ContactViewModel.swift +++ b/Linphone/UI/Main/Contacts/ViewModel/ContactViewModel.swift @@ -19,6 +19,7 @@ import linphonesw import Combine +import SwiftUI // swiftlint:disable line_length class ContactViewModel: ObservableObject { diff --git a/Linphone/UI/Main/Contacts/ViewModel/ContactsListViewModel.swift b/Linphone/UI/Main/Contacts/ViewModel/ContactsListViewModel.swift index 3c59661d2..5381e8d82 100644 --- a/Linphone/UI/Main/Contacts/ViewModel/ContactsListViewModel.swift +++ b/Linphone/UI/Main/Contacts/ViewModel/ContactsListViewModel.swift @@ -18,6 +18,7 @@ */ import linphonesw +import SwiftUI class ContactsListViewModel: ObservableObject { diff --git a/Linphone/UI/Main/Contacts/ViewModel/EditContactViewModel.swift b/Linphone/UI/Main/Contacts/ViewModel/EditContactViewModel.swift index 25fa52755..0769741ae 100644 --- a/Linphone/UI/Main/Contacts/ViewModel/EditContactViewModel.swift +++ b/Linphone/UI/Main/Contacts/ViewModel/EditContactViewModel.swift @@ -18,6 +18,7 @@ */ import linphonesw +import SwiftUI class EditContactViewModel: ObservableObject { diff --git a/Linphone/UI/Main/Contacts/ViewModel/FavoriteContactsListViewModel.swift b/Linphone/UI/Main/Contacts/ViewModel/FavoriteContactsListViewModel.swift index 852da7946..8cd9f0224 100644 --- a/Linphone/UI/Main/Contacts/ViewModel/FavoriteContactsListViewModel.swift +++ b/Linphone/UI/Main/Contacts/ViewModel/FavoriteContactsListViewModel.swift @@ -18,6 +18,7 @@ */ import linphonesw +import SwiftUI class FavoriteContactsListViewModel: ObservableObject { diff --git a/Linphone/UI/Main/Conversations/ViewModel/ConversationForwardMessageViewModel.swift b/Linphone/UI/Main/Conversations/ViewModel/ConversationForwardMessageViewModel.swift index 90e866cc4..66463fab6 100644 --- a/Linphone/UI/Main/Conversations/ViewModel/ConversationForwardMessageViewModel.swift +++ b/Linphone/UI/Main/Conversations/ViewModel/ConversationForwardMessageViewModel.swift @@ -19,6 +19,7 @@ import linphonesw import Combine +import SwiftUI // swiftlint:disable line_length class ConversationForwardMessageViewModel: ObservableObject { diff --git a/Linphone/UI/Main/Conversations/ViewModel/ConversationsListViewModel.swift b/Linphone/UI/Main/Conversations/ViewModel/ConversationsListViewModel.swift index e6ca80fbe..d5476194a 100644 --- a/Linphone/UI/Main/Conversations/ViewModel/ConversationsListViewModel.swift +++ b/Linphone/UI/Main/Conversations/ViewModel/ConversationsListViewModel.swift @@ -20,6 +20,7 @@ import Foundation import linphonesw import Combine +import SwiftUI // swiftlint:disable line_length class ConversationsListViewModel: ObservableObject { diff --git a/Linphone/UI/Main/Conversations/ViewModel/StartConversationViewModel.swift b/Linphone/UI/Main/Conversations/ViewModel/StartConversationViewModel.swift index 760dce214..a3f8e7904 100644 --- a/Linphone/UI/Main/Conversations/ViewModel/StartConversationViewModel.swift +++ b/Linphone/UI/Main/Conversations/ViewModel/StartConversationViewModel.swift @@ -19,6 +19,7 @@ import linphonesw import Combine +import SwiftUI // swiftlint:disable line_length class StartConversationViewModel: ObservableObject { diff --git a/Linphone/UI/Main/Help/ViewModel/HelpViewModel.swift b/Linphone/UI/Main/Help/ViewModel/HelpViewModel.swift index 282314d62..00886b1a6 100644 --- a/Linphone/UI/Main/Help/ViewModel/HelpViewModel.swift +++ b/Linphone/UI/Main/Help/ViewModel/HelpViewModel.swift @@ -18,6 +18,7 @@ */ import linphonesw +import SwiftUI class HelpViewModel: ObservableObject { private let TAG = "[HelpViewModel]" diff --git a/Linphone/UI/Main/History/ViewModel/HistoryListViewModel.swift b/Linphone/UI/Main/History/ViewModel/HistoryListViewModel.swift index 5024321bf..002175504 100644 --- a/Linphone/UI/Main/History/ViewModel/HistoryListViewModel.swift +++ b/Linphone/UI/Main/History/ViewModel/HistoryListViewModel.swift @@ -19,6 +19,7 @@ import linphonesw import Combine +import SwiftUI class HistoryListViewModel: ObservableObject { diff --git a/Linphone/UI/Main/History/ViewModel/StartCallViewModel.swift b/Linphone/UI/Main/History/ViewModel/StartCallViewModel.swift index 2d920b253..9efe8afe2 100644 --- a/Linphone/UI/Main/History/ViewModel/StartCallViewModel.swift +++ b/Linphone/UI/Main/History/ViewModel/StartCallViewModel.swift @@ -19,6 +19,7 @@ import linphonesw import Combine +import SwiftUI // swiftlint:disable line_length class StartCallViewModel: ObservableObject { diff --git a/Linphone/UI/Main/Meetings/Models/MeetingModel.swift b/Linphone/UI/Main/Meetings/Models/MeetingModel.swift index d363a2dcd..2f63b2cb7 100644 --- a/Linphone/UI/Main/Meetings/Models/MeetingModel.swift +++ b/Linphone/UI/Main/Meetings/Models/MeetingModel.swift @@ -18,6 +18,7 @@ */ import linphonesw +import SwiftUI class MeetingModel: ObservableObject { diff --git a/Linphone/UI/Main/Settings/ViewModel/AccountProfileViewModel.swift b/Linphone/UI/Main/Settings/ViewModel/AccountProfileViewModel.swift index 71b303f3b..64c0f8d00 100644 --- a/Linphone/UI/Main/Settings/ViewModel/AccountProfileViewModel.swift +++ b/Linphone/UI/Main/Settings/ViewModel/AccountProfileViewModel.swift @@ -18,6 +18,7 @@ */ import linphonesw +import SwiftUI class AccountProfileViewModel: ObservableObject { diff --git a/Linphone/UI/Main/Settings/ViewModel/AccountSettingsViewModel.swift b/Linphone/UI/Main/Settings/ViewModel/AccountSettingsViewModel.swift index 92dfc499b..77b8b3208 100644 --- a/Linphone/UI/Main/Settings/ViewModel/AccountSettingsViewModel.swift +++ b/Linphone/UI/Main/Settings/ViewModel/AccountSettingsViewModel.swift @@ -18,6 +18,7 @@ */ import linphonesw +import SwiftUI class AccountSettingsViewModel: ObservableObject { diff --git a/Linphone/UI/Main/Settings/ViewModel/SettingsViewModel.swift b/Linphone/UI/Main/Settings/ViewModel/SettingsViewModel.swift index 7ac6830d5..61a110e41 100644 --- a/Linphone/UI/Main/Settings/ViewModel/SettingsViewModel.swift +++ b/Linphone/UI/Main/Settings/ViewModel/SettingsViewModel.swift @@ -18,6 +18,7 @@ */ import linphonesw +import SwiftUI class SettingsViewModel: ObservableObject { diff --git a/Linphone/UI/Main/Viewmodel/SharedMainViewModel.swift b/Linphone/UI/Main/Viewmodel/SharedMainViewModel.swift index 588994bcf..721107cfe 100644 --- a/Linphone/UI/Main/Viewmodel/SharedMainViewModel.swift +++ b/Linphone/UI/Main/Viewmodel/SharedMainViewModel.swift @@ -18,6 +18,7 @@ */ import linphonesw +import SwiftUI class SharedMainViewModel: ObservableObject { diff --git a/Linphone/Utils/Log.swift b/Linphone/Utils/Log.swift index a2351724c..28257cf37 100644 --- a/Linphone/Utils/Log.swift +++ b/Linphone/Utils/Log.swift @@ -96,7 +96,7 @@ class Log: LoggingServiceDelegate { #endif } - func onLogMessageWritten(logService: linphonesw.LoggingService, domain: String, level: linphonesw.LogLevel, message: String) { + func onLogMessageWritten(logService: LoggingService, domain: String, level: LogLevel, message: String) { output(message, level.rawValue, domain) } diff --git a/Linphone/Utils/MagicSearchSingleton.swift b/Linphone/Utils/MagicSearchSingleton.swift index f1d3b25e0..8db271542 100644 --- a/Linphone/Utils/MagicSearchSingleton.swift +++ b/Linphone/Utils/MagicSearchSingleton.swift @@ -19,6 +19,7 @@ import linphonesw import Combine +import SwiftUI final class MagicSearchSingleton: ObservableObject { diff --git a/Podfile b/Podfile index 196e3f81f..68caea8e4 100644 --- a/Podfile +++ b/Podfile @@ -4,12 +4,6 @@ source "https://gitlab.linphone.org/BC/public/podspec.git" source "https://github.com/CocoaPods/Specs.git" def basic_pods - if ENV['PODFILE_PATH'].nil? - pod 'linphone-sdk', '~> 5.4.0-alpha' - else - pod 'linphone-sdk', :path => ENV['PODFILE_PATH'] # local sdk - end - crashlytics end