diff --git a/Linphone/Contacts/ContactsManager.swift b/Linphone/Contacts/ContactsManager.swift index 1338effcc..adda9f5ee 100644 --- a/Linphone/Contacts/ContactsManager.swift +++ b/Linphone/Contacts/ContactsManager.swift @@ -424,18 +424,19 @@ final class ContactsManager: ObservableObject { var friend: Friend? if let friendList = self.friendList { - friend = friendList.friends.first(where: { $0.addresses.contains(where: { $0.asStringUriOnly() == sipUri }) }) + friend = friendList.friends.first(where: { $0.addresses.contains(where: { $0.asStringUriOnly() == sipUri }) || $0.phoneNumbers.contains(where: { $0 == address.username }) }) } + if friend == nil, let linphoneFriendList = self.linphoneFriendList { - friend = linphoneFriendList.friends.first(where: { $0.addresses.contains(where: { $0.asStringUriOnly() == sipUri }) }) + friend = linphoneFriendList.friends.first(where: { $0.addresses.contains(where: { $0.asStringUriOnly() == sipUri }) || $0.phoneNumbers.contains(where: { $0 == address.username }) }) } if friend == nil, let tempRemoteFriendList = self.tempRemoteFriendList { - friend = tempRemoteFriendList.friends.first(where: { $0.addresses.contains(where: { $0.asStringUriOnly() == sipUri }) }) + friend = tempRemoteFriendList.friends.first(where: { $0.addresses.contains(where: { $0.asStringUriOnly() == sipUri }) || $0.phoneNumbers.contains(where: { $0 == address.username }) }) } CoreContext.shared.mCore.friendsLists.forEach { friendList in if friendList.type == .CardDAV { - friend = friendList.friends.first(where: { $0.addresses.contains(where: { $0.asStringUriOnly() == sipUri }) }) + friend = friendList.friends.first(where: { $0.addresses.contains(where: { $0.asStringUriOnly() == sipUri }) || $0.phoneNumbers.contains(where: { $0 == address.username }) }) } } diff --git a/Linphone/Core/CoreContext.swift b/Linphone/Core/CoreContext.swift index 65a60a307..c7eae4e81 100644 --- a/Linphone/Core/CoreContext.swift +++ b/Linphone/Core/CoreContext.swift @@ -59,6 +59,8 @@ class CoreContext: ObservableObject { var digestAuthInfoPendingPasswordUpdate: AuthInfo? + @Published var reloadID = UUID() + private init() { do { try initialiseCore() @@ -120,7 +122,7 @@ class CoreContext: ObservableObject { coreQueue.async { LoggingService.Instance.logLevel = LogLevel.Debug - Factory.Instance.logCollectionPath = Factory.Instance.getConfigDir(context: nil) + Factory.Instance.logCollectionPath = Factory.Instance.getDataDir(context: UnsafeMutablePointer(mutating: (Config.appGroupName as NSString).utf8String)) Factory.Instance.enableLogCollection(state: LogCollectionState.Enabled) Log.info("Checking if linphonerc file exists already. If not, creating one as a copy of linphonerc-default") @@ -162,8 +164,6 @@ class CoreContext: ObservableObject { let userAgent = "LinphoneiOS/\(appGitTag) (\(UIDevice.current.localizedModel.replacingOccurrences(of: "'", with: ""))) LinphoneSDK" self.mCore.setUserAgent(name: userAgent, version: self.coreVersion) - self.mCore.videoCaptureEnabled = true - self.mCore.videoDisplayEnabled = true self.mCore.videoPreviewEnabled = false self.mCore.fecEnabled = true @@ -335,6 +335,7 @@ class CoreContext: ObservableObject { } self.accounts = accountModels ThemeManager.shared.applyTheme(named: themeMainColor) + self.reloadID = UUID() } } }, onLogCollectionUploadStateChanged: { (_: Core, _: Core.LogCollectionUploadState, info: String) in diff --git a/Linphone/GeneratedGit.swift b/Linphone/GeneratedGit.swift index 311fe7cd1..bf2defb49 100644 --- a/Linphone/GeneratedGit.swift +++ b/Linphone/GeneratedGit.swift @@ -1,7 +1,7 @@ import Foundation public enum AppGitInfo { - public static let branch = "feature/search_chat_message" - public static let commit = "4c79162b0" + public static let branch = "master" + public static let commit = "c5c970d17" public static let tag = "6.1.0-alpha" } diff --git a/Linphone/UI/Call/ViewModel/CallViewModel.swift b/Linphone/UI/Call/ViewModel/CallViewModel.swift index 4a9cb87b7..830684a0a 100644 --- a/Linphone/UI/Call/ViewModel/CallViewModel.swift +++ b/Linphone/UI/Call/ViewModel/CallViewModel.swift @@ -178,7 +178,9 @@ class CallViewModel: ObservableObject { let friend = ContactsManager.shared.getFriendWithAddress(address: self.currentCall!.remoteAddress) if friend != nil && friend!.address != nil && friend!.address!.displayName != nil { displayNameTmp = friend!.address!.displayName! - } else { + } else if friend != nil && friend?.name != nil { + displayNameTmp = friend?.name ?? "No name" + } else { if self.currentCall!.remoteAddress!.displayName != nil { displayNameTmp = self.currentCall!.remoteAddress!.displayName! } else if self.currentCall!.remoteAddress!.username != nil && displayNameTmp.isEmpty { diff --git a/Linphone/UI/Main/ContentView.swift b/Linphone/UI/Main/ContentView.swift index ddd8d984b..f65fc6f4b 100644 --- a/Linphone/UI/Main/ContentView.swift +++ b/Linphone/UI/Main/ContentView.swift @@ -1506,6 +1506,8 @@ struct ContentView: View { } } .onReceive(NotificationCenter.default.publisher(for: NSNotification.Name("ContactLoaded"))) { _ in + callViewModel.resetCallView() + if let conversationsListVM = conversationsListViewModel { conversationsListVM.updateChatRoomsList() } @@ -1583,6 +1585,7 @@ struct ContentView: View { } } } + .id(coreContext.reloadID) } func openMenu() { diff --git a/Linphone/Utils/Log.swift b/Linphone/Utils/Log.swift index e23bf81ab..d09da8240 100644 --- a/Linphone/Utils/Log.swift +++ b/Linphone/Utils/Log.swift @@ -37,7 +37,7 @@ class Log: LoggingServiceDelegate { private init() { service.domain = Bundle.main.bundleIdentifier! - Core.setLogCollectionPath(path: Factory.Instance.getDownloadDir(context: UnsafeMutablePointer(mutating: (Config.appGroupName as NSString).utf8String))) + Core.setLogCollectionPath(path: Factory.Instance.getDataDir(context: UnsafeMutablePointer(mutating: (Config.appGroupName as NSString).utf8String))) Core.enableLogCollection(state: LogCollectionState.Enabled) setMask() LoggingService.Instance.addDelegate(delegate: self) diff --git a/LinphoneApp.xcodeproj/project.pbxproj b/LinphoneApp.xcodeproj/project.pbxproj index 7f699ece3..d154f942d 100644 --- a/LinphoneApp.xcodeproj/project.pbxproj +++ b/LinphoneApp.xcodeproj/project.pbxproj @@ -1677,7 +1677,7 @@ CODE_SIGN_ENTITLEMENTS = msgNotificationService/msgNotificationService.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = Z2V957B3D6; ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu17; @@ -1720,7 +1720,7 @@ CODE_SIGN_ENTITLEMENTS = msgNotificationService/msgNotificationService.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = Z2V957B3D6; ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu17; @@ -1879,7 +1879,7 @@ ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; CODE_SIGN_ENTITLEMENTS = Linphone/Linphone.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = "\"Linphone/Preview Content\""; @@ -1943,7 +1943,7 @@ ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; CODE_SIGN_ENTITLEMENTS = Linphone/Linphone.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = "\"Linphone/Preview Content\""; DEVELOPMENT_TEAM = Z2V957B3D6; @@ -2003,7 +2003,7 @@ CODE_SIGN_ENTITLEMENTS = linphoneExtension/linphoneExtension.entitlements; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = Z2V957B3D6; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; @@ -2037,7 +2037,7 @@ CODE_SIGN_ENTITLEMENTS = linphoneExtension/linphoneExtension.entitlements; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = Z2V957B3D6; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; @@ -2070,7 +2070,7 @@ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = Z2V957B3D6; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; @@ -2085,7 +2085,7 @@ "@executable_path/../../Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; + MARKETING_VERSION = 6.1.0; PRODUCT_BUNDLE_IDENTIFIER = org.linphone.phone.intentsExtension; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -2106,7 +2106,7 @@ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = Z2V957B3D6; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; @@ -2121,7 +2121,7 @@ "@executable_path/../../Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; + MARKETING_VERSION = 6.1.0; PRODUCT_BUNDLE_IDENTIFIER = org.linphone.phone.intentsExtension; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; diff --git a/LinphoneApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/LinphoneApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 8b7063b70..7835adc44 100644 --- a/LinphoneApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/LinphoneApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -123,7 +123,7 @@ "location" : "https://gitlab.linphone.org/BC/public/linphone-sdk-swift-ios.git", "state" : { "branch" : "alpha", - "revision" : "e4ec19c845a0c0cfa71f39ca01b3f9ae822c296f" + "revision" : "0ee9cfc12080c8479a303ad275e8c24c3332572d" } }, { diff --git a/msgNotificationService/NotificationService.swift b/msgNotificationService/NotificationService.swift index f36c6406d..806542b62 100644 --- a/msgNotificationService/NotificationService.swift +++ b/msgNotificationService/NotificationService.swift @@ -87,8 +87,9 @@ class NotificationService: UNNotificationServiceExtension { bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent) LoggingService.Instance.logLevel = LogLevel.Debug - Factory.Instance.logCollectionPath = Factory.Instance.getConfigDir(context: nil) + Factory.Instance.logCollectionPath = Factory.Instance.getDataDir(context: UnsafeMutablePointer(mutating: (Config.appGroupName as NSString).utf8String)) Factory.Instance.enableLogCollection(state: LogCollectionState.Enabled) + Log.info("[msgNotificationService] start msgNotificationService extension") /* if (VFSUtil.vfsEnabled(groupName: Config.appGroupName) && !VFSUtil.activateVFS()) {