diff --git a/Linphone.xcodeproj/project.pbxproj b/Linphone.xcodeproj/project.pbxproj index 3e27fc401..8cf1f215c 100644 --- a/Linphone.xcodeproj/project.pbxproj +++ b/Linphone.xcodeproj/project.pbxproj @@ -18,6 +18,9 @@ D719ABC92ABC6FD700B41C10 /* CoreContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = D719ABC82ABC6FD700B41C10 /* CoreContext.swift */; }; D719ABCC2ABC769C00B41C10 /* AssistantView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D719ABCB2ABC769C00B41C10 /* AssistantView.swift */; }; D719ABCF2ABC779A00B41C10 /* AccountLoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D719ABCE2ABC779A00B41C10 /* AccountLoginViewModel.swift */; }; + D71FCA7F2AE1397200D2E43E /* ContactsListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D71FCA7E2AE1397200D2E43E /* ContactsListViewModel.swift */; }; + D71FCA812AE14CFC00D2E43E /* ContactsListFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D71FCA802AE14CFC00D2E43E /* ContactsListFragment.swift */; }; + D71FCA832AE14D6E00D2E43E /* ContactFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D71FCA822AE14D6E00D2E43E /* ContactFragment.swift */; }; D72250632ADE9615008FB426 /* HistoryViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D72250622ADE9615008FB426 /* HistoryViewModel.swift */; }; D72250692ADFBF2D008FB426 /* SideMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = D72250682ADFBF2D008FB426 /* SideMenu.swift */; }; D72343302ACEFEF8009AA24E /* QrCodeScannerFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D723432F2ACEFEF8009AA24E /* QrCodeScannerFragment.swift */; }; @@ -34,12 +37,16 @@ D74C9D012ACB098C0021626A /* PermissionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = D74C9D002ACB098C0021626A /* PermissionManager.swift */; }; D750D3392AD3E6EE00EC99C5 /* PopupLoadingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D750D3382AD3E6EE00EC99C5 /* PopupLoadingView.swift */; }; D7702EF22AC7205000557C00 /* WelcomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7702EF12AC7205000557C00 /* WelcomeView.swift */; }; - D78290B82ADD3910004AA85C /* ContactFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D78290B72ADD3910004AA85C /* ContactFragment.swift */; }; + D777DBB32AE12C5900565A99 /* ContactsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = D777DBB22AE12C5900565A99 /* ContactsManager.swift */; }; + D78290B82ADD3910004AA85C /* ContactsFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D78290B72ADD3910004AA85C /* ContactsFragment.swift */; }; D78290BB2ADD40B2004AA85C /* ContactViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D78290BA2ADD40B2004AA85C /* ContactViewModel.swift */; }; D7A03FBD2ACC2DB60081A588 /* ContactsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7A03FBC2ACC2DB60081A588 /* ContactsView.swift */; }; D7A03FC02ACC2E390081A588 /* HistoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7A03FBF2ACC2E390081A588 /* HistoryView.swift */; }; D7A03FC62ACC458A0081A588 /* SplashScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7A03FC52ACC458A0081A588 /* SplashScreen.swift */; }; D7A2EDD62AC18115005D90FC /* SharedMainViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7A2EDD52AC18115005D90FC /* SharedMainViewModel.swift */; }; + D7B5066D2AEFA9B900CEB4E9 /* ContactInnerFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7B5066C2AEFA9B900CEB4E9 /* ContactInnerFragment.swift */; }; + D7C365082AEFAB7F00FE6142 /* ContactListBottomSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7C365072AEFAB7F00FE6142 /* ContactListBottomSheet.swift */; }; + D7D1698C2AE66FA500109A5C /* MagicSearchSingleton.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7D1698B2AE66FA500109A5C /* MagicSearchSingleton.swift */; }; D7D24D132AC1B4E800C6F35B /* NotoSans-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D7D24D0D2AC1B4E800C6F35B /* NotoSans-Medium.ttf */; }; D7D24D142AC1B4E800C6F35B /* NotoSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D7D24D0E2AC1B4E800C6F35B /* NotoSans-Regular.ttf */; }; D7D24D152AC1B4E800C6F35B /* NotoSans-Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D7D24D0F2AC1B4E800C6F35B /* NotoSans-Light.ttf */; }; @@ -48,14 +55,16 @@ D7D24D182AC1B4E800C6F35B /* NotoSans-ExtraBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D7D24D122AC1B4E800C6F35B /* NotoSans-ExtraBold.ttf */; }; D7DA67622ACCB2FA00E95002 /* LoginFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DA67612ACCB2FA00E95002 /* LoginFragment.swift */; }; D7DA67642ACCB31700E95002 /* ProfileModeFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DA67632ACCB31700E95002 /* ProfileModeFragment.swift */; }; + D7E6D0492AE933AD00A57AAF /* FavoriteContactsListFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7E6D0482AE933AD00A57AAF /* FavoriteContactsListFragment.swift */; }; + D7E6D04B2AE9347D00A57AAF /* FavoriteContactsListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7E6D04A2AE9347D00A57AAF /* FavoriteContactsListViewModel.swift */; }; + D7E6D04D2AEBD77600A57AAF /* CustomBottomSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7E6D04C2AEBD77600A57AAF /* CustomBottomSheet.swift */; }; + D7E6D0512AEBDBD500A57AAF /* ContactsListBottomSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7E6D0502AEBDBD500A57AAF /* ContactsListBottomSheet.swift */; }; + D7E6D0552AEBFCCE00A57AAF /* ContactsInnerFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7E6D0542AEBFCCE00A57AAF /* ContactsInnerFragment.swift */; }; D7EAACCF2AD6ED8000AA6A8A /* PermissionsFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7EAACCE2AD6ED8000AA6A8A /* PermissionsFragment.swift */; }; D7FB55112AD447FD00A5AB15 /* RegisterFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7FB55102AD447FD00A5AB15 /* RegisterFragment.swift */; }; - F4BB8DFBA0FF08430EBA9351 /* Pods_Linphone.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F5B27C5576B1EAED2F205EB /* Pods_Linphone.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 377E0B5C2B1F38192E694334 /* Pods-Linphone.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Linphone.debug.xcconfig"; path = "Target Support Files/Pods-Linphone/Pods-Linphone.debug.xcconfig"; sourceTree = ""; }; - 6F5B27C5576B1EAED2F205EB /* Pods_Linphone.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Linphone.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D706BA812ADD72D100278F45 /* DeviceRotationViewModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceRotationViewModifier.swift; sourceTree = ""; }; D70C93DD2AC2D0F60063CA3B /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = ""; }; D717071D2AC5922E0037746F /* ColorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorExtension.swift; sourceTree = ""; }; @@ -69,6 +78,9 @@ D719ABC82ABC6FD700B41C10 /* CoreContext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoreContext.swift; sourceTree = ""; }; D719ABCB2ABC769C00B41C10 /* AssistantView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AssistantView.swift; sourceTree = ""; }; D719ABCE2ABC779A00B41C10 /* AccountLoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountLoginViewModel.swift; sourceTree = ""; }; + D71FCA7E2AE1397200D2E43E /* ContactsListViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactsListViewModel.swift; sourceTree = ""; }; + D71FCA802AE14CFC00D2E43E /* ContactsListFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactsListFragment.swift; sourceTree = ""; }; + D71FCA822AE14D6E00D2E43E /* ContactFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactFragment.swift; sourceTree = ""; }; D72250622ADE9615008FB426 /* HistoryViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryViewModel.swift; sourceTree = ""; }; D72250682ADFBF2D008FB426 /* SideMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SideMenu.swift; sourceTree = ""; }; D723432F2ACEFEF8009AA24E /* QrCodeScannerFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QrCodeScannerFragment.swift; sourceTree = ""; }; @@ -85,13 +97,17 @@ D74C9D002ACB098C0021626A /* PermissionManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermissionManager.swift; sourceTree = ""; }; D750D3382AD3E6EE00EC99C5 /* PopupLoadingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopupLoadingView.swift; sourceTree = ""; }; D7702EF12AC7205000557C00 /* WelcomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeView.swift; sourceTree = ""; }; - D78290B72ADD3910004AA85C /* ContactFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactFragment.swift; sourceTree = ""; }; + D777DBB22AE12C5900565A99 /* ContactsManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactsManager.swift; sourceTree = ""; }; + D78290B72ADD3910004AA85C /* ContactsFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactsFragment.swift; sourceTree = ""; }; D78290BA2ADD40B2004AA85C /* ContactViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactViewModel.swift; sourceTree = ""; }; D7A03FBC2ACC2DB60081A588 /* ContactsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactsView.swift; sourceTree = ""; }; D7A03FBF2ACC2E390081A588 /* HistoryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryView.swift; sourceTree = ""; }; D7A03FC52ACC458A0081A588 /* SplashScreen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SplashScreen.swift; sourceTree = ""; }; D7A2EDD52AC18115005D90FC /* SharedMainViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharedMainViewModel.swift; sourceTree = ""; }; D7A2EDDA2AC19EEC005D90FC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + D7B5066C2AEFA9B900CEB4E9 /* ContactInnerFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactInnerFragment.swift; sourceTree = ""; }; + D7C365072AEFAB7F00FE6142 /* ContactListBottomSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactListBottomSheet.swift; sourceTree = ""; }; + D7D1698B2AE66FA500109A5C /* MagicSearchSingleton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MagicSearchSingleton.swift; sourceTree = ""; }; D7D24D0D2AC1B4E800C6F35B /* NotoSans-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSans-Medium.ttf"; sourceTree = ""; }; D7D24D0E2AC1B4E800C6F35B /* NotoSans-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSans-Regular.ttf"; sourceTree = ""; }; D7D24D0F2AC1B4E800C6F35B /* NotoSans-Light.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSans-Light.ttf"; sourceTree = ""; }; @@ -100,9 +116,13 @@ D7D24D122AC1B4E800C6F35B /* NotoSans-ExtraBold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSans-ExtraBold.ttf"; sourceTree = ""; }; D7DA67612ACCB2FA00E95002 /* LoginFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginFragment.swift; sourceTree = ""; }; D7DA67632ACCB31700E95002 /* ProfileModeFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileModeFragment.swift; sourceTree = ""; }; + D7E6D0482AE933AD00A57AAF /* FavoriteContactsListFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavoriteContactsListFragment.swift; sourceTree = ""; }; + D7E6D04A2AE9347D00A57AAF /* FavoriteContactsListViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavoriteContactsListViewModel.swift; sourceTree = ""; }; + D7E6D04C2AEBD77600A57AAF /* CustomBottomSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomBottomSheet.swift; sourceTree = ""; }; + D7E6D0502AEBDBD500A57AAF /* ContactsListBottomSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactsListBottomSheet.swift; sourceTree = ""; }; + D7E6D0542AEBFCCE00A57AAF /* ContactsInnerFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactsInnerFragment.swift; sourceTree = ""; }; D7EAACCE2AD6ED8000AA6A8A /* PermissionsFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermissionsFragment.swift; sourceTree = ""; }; D7FB55102AD447FD00A5AB15 /* RegisterFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterFragment.swift; sourceTree = ""; }; - F76FB87556A3109F61F9E2D5 /* Pods-Linphone.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Linphone.release.xcconfig"; path = "Target Support Files/Pods-Linphone/Pods-Linphone.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -110,26 +130,15 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - F4BB8DFBA0FF08430EBA9351 /* Pods_Linphone.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 52EFCC310713B3CA01062945 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 6F5B27C5576B1EAED2F205EB /* Pods_Linphone.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; A31AF2AB8C6A3D7B7EA3B424 /* Pods */ = { isa = PBXGroup; children = ( - 377E0B5C2B1F38192E694334 /* Pods-Linphone.debug.xcconfig */, - F76FB87556A3109F61F9E2D5 /* Pods-Linphone.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -140,6 +149,7 @@ D717071D2AC5922E0037746F /* ColorExtension.swift */, D717071F2AC5989C0037746F /* TextExtension.swift */, D74C9D002ACB098C0021626A /* PermissionManager.swift */, + D7D1698B2AE66FA500109A5C /* MagicSearchSingleton.swift */, ); path = Utils; sourceTree = ""; @@ -150,7 +160,6 @@ D719ABB52ABC67BF00B41C10 /* Linphone */, D719ABB42ABC67BF00B41C10 /* Products */, A31AF2AB8C6A3D7B7EA3B424 /* Pods */, - 52EFCC310713B3CA01062945 /* Frameworks */, ); sourceTree = ""; }; @@ -167,6 +176,7 @@ children = ( D7A03FC52ACC458A0081A588 /* SplashScreen.swift */, D719ABB62ABC67BF00B41C10 /* LinphoneApp.swift */, + D777DBB12AE12C4000565A99 /* Contacts */, D719ABC72ABC6FB200B41C10 /* Core */, D719ABC52ABC6EE800B41C10 /* UI */, D717071C2AC591EF0037746F /* Utils */, @@ -272,6 +282,7 @@ D750D3382AD3E6EE00EC99C5 /* PopupLoadingView.swift */, D706BA812ADD72D100278F45 /* DeviceRotationViewModifier.swift */, D72250682ADFBF2D008FB426 /* SideMenu.swift */, + D7E6D04C2AEBD77600A57AAF /* CustomBottomSheet.swift */, ); path = Fragments; sourceTree = ""; @@ -285,10 +296,25 @@ path = Welcome; sourceTree = ""; }; + D777DBB12AE12C4000565A99 /* Contacts */ = { + isa = PBXGroup; + children = ( + D777DBB22AE12C5900565A99 /* ContactsManager.swift */, + ); + path = Contacts; + sourceTree = ""; + }; D78290B62ADD38F9004AA85C /* Fragments */ = { isa = PBXGroup; children = ( - D78290B72ADD3910004AA85C /* ContactFragment.swift */, + D78290B72ADD3910004AA85C /* ContactsFragment.swift */, + D71FCA802AE14CFC00D2E43E /* ContactsListFragment.swift */, + D71FCA822AE14D6E00D2E43E /* ContactFragment.swift */, + D7E6D0482AE933AD00A57AAF /* FavoriteContactsListFragment.swift */, + D7E6D0502AEBDBD500A57AAF /* ContactsListBottomSheet.swift */, + D7E6D0542AEBFCCE00A57AAF /* ContactsInnerFragment.swift */, + D7B5066C2AEFA9B900CEB4E9 /* ContactInnerFragment.swift */, + D7C365072AEFAB7F00FE6142 /* ContactListBottomSheet.swift */, ); path = Fragments; sourceTree = ""; @@ -297,6 +323,8 @@ isa = PBXGroup; children = ( D78290BA2ADD40B2004AA85C /* ContactViewModel.swift */, + D71FCA7E2AE1397200D2E43E /* ContactsListViewModel.swift */, + D7E6D04A2AE9347D00A57AAF /* FavoriteContactsListViewModel.swift */, ); path = ViewModel; sourceTree = ""; @@ -363,12 +391,10 @@ isa = PBXNativeTarget; buildConfigurationList = D719ABC22ABC67BF00B41C10 /* Build configuration list for PBXNativeTarget "Linphone" */; buildPhases = ( - 6FE8573A5CFC1DA89D3172B5 /* [CP] Check Pods Manifest.lock */, D719ABAF2ABC67BF00B41C10 /* Sources */, D719ABB02ABC67BF00B41C10 /* Frameworks */, D719ABB12ABC67BF00B41C10 /* Resources */, D7FB55122AD53FE200A5AB15 /* Run Script */, - 230129DD87A6EBB04DF458AD /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -432,45 +458,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 230129DD87A6EBB04DF458AD /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Linphone/Pods-Linphone-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Linphone/Pods-Linphone-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Linphone/Pods-Linphone-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 6FE8573A5CFC1DA89D3172B5 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Linphone-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; D7FB55122AD53FE200A5AB15 /* Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -499,35 +486,47 @@ files = ( D71707202AC5989C0037746F /* TextExtension.swift in Sources */, D719ABB92ABC67BF00B41C10 /* ContentView.swift in Sources */, + D71FCA832AE14D6E00D2E43E /* ContactFragment.swift in Sources */, D750D3392AD3E6EE00EC99C5 /* PopupLoadingView.swift in Sources */, + D7E6D0492AE933AD00A57AAF /* FavoriteContactsListFragment.swift in Sources */, D706BA822ADD72D100278F45 /* DeviceRotationViewModifier.swift in Sources */, D719ABC92ABC6FD700B41C10 /* CoreContext.swift in Sources */, D7EAACCF2AD6ED8000AA6A8A /* PermissionsFragment.swift in Sources */, + D777DBB32AE12C5900565A99 /* ContactsManager.swift in Sources */, D7A03FBD2ACC2DB60081A588 /* ContactsView.swift in Sources */, D719ABCF2ABC779A00B41C10 /* AccountLoginViewModel.swift in Sources */, D78290BB2ADD40B2004AA85C /* ContactViewModel.swift in Sources */, D72992392ADD7F68003AF125 /* HistoryContactFragment.swift in Sources */, + D7B5066D2AEFA9B900CEB4E9 /* ContactInnerFragment.swift in Sources */, + D7E6D04D2AEBD77600A57AAF /* CustomBottomSheet.swift in Sources */, D74C9D012ACB098C0021626A /* PermissionManager.swift in Sources */, D7702EF22AC7205000557C00 /* WelcomeView.swift in Sources */, + D71FCA7F2AE1397200D2E43E /* ContactsListViewModel.swift in Sources */, + D71FCA812AE14CFC00D2E43E /* ContactsListFragment.swift in Sources */, D719ABB72ABC67BF00B41C10 /* LinphoneApp.swift in Sources */, D72250632ADE9615008FB426 /* HistoryViewModel.swift in Sources */, + D7E6D0512AEBDBD500A57AAF /* ContactsListBottomSheet.swift in Sources */, D7A2EDD62AC18115005D90FC /* SharedMainViewModel.swift in Sources */, D7A03FC62ACC458A0081A588 /* SplashScreen.swift in Sources */, D7A03FC02ACC2E390081A588 /* HistoryView.swift in Sources */, D748BF2E2ACD82E7004844EB /* ThirdPartySipAccountWarningFragment.swift in Sources */, D748BF2C2ACD82D2004844EB /* ThirdPartySipAccountLoginFragment.swift in Sources */, D74C9CF82ACACECE0021626A /* WelcomePage1Fragment.swift in Sources */, + D7E6D0552AEBFCCE00A57AAF /* ContactsInnerFragment.swift in Sources */, D72343362AD037AF009AA24E /* ToastView.swift in Sources */, D7FB55112AD447FD00A5AB15 /* RegisterFragment.swift in Sources */, D72343322ACEFF58009AA24E /* QRScannerController.swift in Sources */, D72343342ACEFFC3009AA24E /* QRScanner.swift in Sources */, D72343302ACEFEF8009AA24E /* QrCodeScannerFragment.swift in Sources */, + D7D1698C2AE66FA500109A5C /* MagicSearchSingleton.swift in Sources */, D72250692ADFBF2D008FB426 /* SideMenu.swift in Sources */, D717071E2AC5922E0037746F /* ColorExtension.swift in Sources */, - D78290B82ADD3910004AA85C /* ContactFragment.swift in Sources */, + D78290B82ADD3910004AA85C /* ContactsFragment.swift in Sources */, D7DA67642ACCB31700E95002 /* ProfileModeFragment.swift in Sources */, D74C9CFC2ACACF370021626A /* WelcomePage3Fragment.swift in Sources */, D719ABCC2ABC769C00B41C10 /* AssistantView.swift in Sources */, + D7C365082AEFAB7F00FE6142 /* ContactListBottomSheet.swift in Sources */, + D7E6D04B2AE9347D00A57AAF /* FavoriteContactsListViewModel.swift in Sources */, D74C9CFA2ACACF2D0021626A /* WelcomePage2Fragment.swift in Sources */, D74C9CFF2ACAEC5E0021626A /* PopupView.swift in Sources */, D7DA67622ACCB2FA00E95002 /* LoginFragment.swift in Sources */, @@ -541,6 +540,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; @@ -601,6 +601,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; @@ -652,7 +653,6 @@ }; D719ABC32ABC67BF00B41C10 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 377E0B5C2B1F38192E694334 /* Pods-Linphone.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -668,7 +668,8 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Linphone/Info.plist; INFOPLIST_KEY_NSCameraUsageDescription = "Share photos with your friends and customize avatars"; - INFOPLIST_KEY_NSPhotoLibraryUsageDescription = ""; + INFOPLIST_KEY_NSContactsUsageDescription = "Make calls with your friends"; + INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "Share photos with your friends and customize avatars"; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; @@ -696,7 +697,6 @@ }; D719ABC42ABC67BF00B41C10 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F76FB87556A3109F61F9E2D5 /* Pods-Linphone.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -712,7 +712,8 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Linphone/Info.plist; INFOPLIST_KEY_NSCameraUsageDescription = "Share photos with your friends and customize avatars"; - INFOPLIST_KEY_NSPhotoLibraryUsageDescription = ""; + INFOPLIST_KEY_NSContactsUsageDescription = "Make calls with your friends"; + INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "Share photos with your friends and customize avatars"; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; diff --git a/Linphone.xcodeproj/xcshareddata/xcschemes/Linphone.xcscheme b/Linphone.xcodeproj/xcshareddata/xcschemes/Linphone.xcscheme new file mode 100644 index 000000000..f5986b566 --- /dev/null +++ b/Linphone.xcodeproj/xcshareddata/xcschemes/Linphone.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Linphone/Assets.xcassets/address-book.imageset/address-book.svg b/Linphone/Assets.xcassets/address-book.imageset/address-book.svg index 9dc0b9ec9..11cabcde0 100644 --- a/Linphone/Assets.xcassets/address-book.imageset/address-book.svg +++ b/Linphone/Assets.xcassets/address-book.imageset/address-book.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/arrow-bend-up-left-bold.imageset/Contents.json b/Linphone/Assets.xcassets/arrow-bend-up-left-bold.imageset/Contents.json new file mode 100644 index 000000000..43dd1a3fe --- /dev/null +++ b/Linphone/Assets.xcassets/arrow-bend-up-left-bold.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "arrow-bend-up-left-bold.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/arrow-bend-up-left-bold.imageset/arrow-bend-up-left-bold.svg b/Linphone/Assets.xcassets/arrow-bend-up-left-bold.imageset/arrow-bend-up-left-bold.svg new file mode 100644 index 000000000..e22cf2edb --- /dev/null +++ b/Linphone/Assets.xcassets/arrow-bend-up-left-bold.imageset/arrow-bend-up-left-bold.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/arrow-bend-up-right-bold.imageset/Contents.json b/Linphone/Assets.xcassets/arrow-bend-up-right-bold.imageset/Contents.json new file mode 100644 index 000000000..48d90733f --- /dev/null +++ b/Linphone/Assets.xcassets/arrow-bend-up-right-bold.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "arrow-bend-up-right-bold.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/arrow-bend-up-right-bold.imageset/arrow-bend-up-right-bold.svg b/Linphone/Assets.xcassets/arrow-bend-up-right-bold.imageset/arrow-bend-up-right-bold.svg new file mode 100644 index 000000000..42532ea02 --- /dev/null +++ b/Linphone/Assets.xcassets/arrow-bend-up-right-bold.imageset/arrow-bend-up-right-bold.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/arrow-clockwise.imageset/Contents.json b/Linphone/Assets.xcassets/arrow-clockwise.imageset/Contents.json new file mode 100644 index 000000000..707dc5691 --- /dev/null +++ b/Linphone/Assets.xcassets/arrow-clockwise.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "arrow-clockwise.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/arrow-clockwise.imageset/arrow-clockwise.svg b/Linphone/Assets.xcassets/arrow-clockwise.imageset/arrow-clockwise.svg new file mode 100644 index 000000000..a8c631b3e --- /dev/null +++ b/Linphone/Assets.xcassets/arrow-clockwise.imageset/arrow-clockwise.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/arrow-right-fill.imageset/Contents.json b/Linphone/Assets.xcassets/arrow-right-fill.imageset/Contents.json new file mode 100644 index 000000000..8ce3f8e70 --- /dev/null +++ b/Linphone/Assets.xcassets/arrow-right-fill.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "arrow-right-fill.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/arrow-right-fill.imageset/arrow-right-fill.svg b/Linphone/Assets.xcassets/arrow-right-fill.imageset/arrow-right-fill.svg new file mode 100644 index 000000000..fb031f4b7 --- /dev/null +++ b/Linphone/Assets.xcassets/arrow-right-fill.imageset/arrow-right-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/backspace-fill.imageset/Contents.json b/Linphone/Assets.xcassets/backspace-fill.imageset/Contents.json new file mode 100644 index 000000000..dccf64ee3 --- /dev/null +++ b/Linphone/Assets.xcassets/backspace-fill.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "backspace-fill.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/backspace-fill.imageset/backspace-fill.svg b/Linphone/Assets.xcassets/backspace-fill.imageset/backspace-fill.svg new file mode 100644 index 000000000..580b7f307 --- /dev/null +++ b/Linphone/Assets.xcassets/backspace-fill.imageset/backspace-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/bell-ringing.imageset/bell-ringing.svg b/Linphone/Assets.xcassets/bell-ringing.imageset/bell-ringing.svg index 247d2a164..0d7b4de7d 100644 --- a/Linphone/Assets.xcassets/bell-ringing.imageset/bell-ringing.svg +++ b/Linphone/Assets.xcassets/bell-ringing.imageset/bell-ringing.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/bell-simple-slash.imageset/Contents.json b/Linphone/Assets.xcassets/bell-simple-slash.imageset/Contents.json new file mode 100644 index 000000000..6584d4567 --- /dev/null +++ b/Linphone/Assets.xcassets/bell-simple-slash.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "bell-simple-slash.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/bell-simple-slash.imageset/bell-simple-slash.svg b/Linphone/Assets.xcassets/bell-simple-slash.imageset/bell-simple-slash.svg new file mode 100644 index 000000000..89c649e7a --- /dev/null +++ b/Linphone/Assets.xcassets/bell-simple-slash.imageset/bell-simple-slash.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/bell-simple.imageset/Contents.json b/Linphone/Assets.xcassets/bell-simple.imageset/Contents.json new file mode 100644 index 000000000..5fe23f349 --- /dev/null +++ b/Linphone/Assets.xcassets/bell-simple.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "bell-simple.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/bell-simple.imageset/bell-simple.svg b/Linphone/Assets.xcassets/bell-simple.imageset/bell-simple.svg new file mode 100644 index 000000000..1c026c3b7 --- /dev/null +++ b/Linphone/Assets.xcassets/bell-simple.imageset/bell-simple.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/bluetooth.imageset/Contents.json b/Linphone/Assets.xcassets/bluetooth.imageset/Contents.json new file mode 100644 index 000000000..a7c7ca0fc --- /dev/null +++ b/Linphone/Assets.xcassets/bluetooth.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "bluetooth.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/bluetooth.imageset/bluetooth.svg b/Linphone/Assets.xcassets/bluetooth.imageset/bluetooth.svg new file mode 100644 index 000000000..c1133c92f --- /dev/null +++ b/Linphone/Assets.xcassets/bluetooth.imageset/bluetooth.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/calendar-blank.imageset/Contents.json b/Linphone/Assets.xcassets/calendar-blank.imageset/Contents.json new file mode 100644 index 000000000..5a415f801 --- /dev/null +++ b/Linphone/Assets.xcassets/calendar-blank.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "calendar-blank.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/calendar-blank.imageset/calendar-blank.svg b/Linphone/Assets.xcassets/calendar-blank.imageset/calendar-blank.svg new file mode 100644 index 000000000..81024d312 --- /dev/null +++ b/Linphone/Assets.xcassets/calendar-blank.imageset/calendar-blank.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/contacts.imageset/Contents.json b/Linphone/Assets.xcassets/calendar.imageset/Contents.json similarity index 88% rename from Linphone/Assets.xcassets/contacts.imageset/Contents.json rename to Linphone/Assets.xcassets/calendar.imageset/Contents.json index 4289db091..14f636381 100644 --- a/Linphone/Assets.xcassets/contacts.imageset/Contents.json +++ b/Linphone/Assets.xcassets/calendar.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "contacts.svg", + "filename" : "calendar.svg", "idiom" : "universal", "scale" : "1x" }, diff --git a/Linphone/Assets.xcassets/calendar.imageset/calendar.svg b/Linphone/Assets.xcassets/calendar.imageset/calendar.svg new file mode 100644 index 000000000..5caacdbef --- /dev/null +++ b/Linphone/Assets.xcassets/calendar.imageset/calendar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/camera-rotate.imageset/Contents.json b/Linphone/Assets.xcassets/camera-rotate.imageset/Contents.json new file mode 100644 index 000000000..61ef9a849 --- /dev/null +++ b/Linphone/Assets.xcassets/camera-rotate.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "camera-rotate.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/camera-rotate.imageset/camera-rotate.svg b/Linphone/Assets.xcassets/camera-rotate.imageset/camera-rotate.svg new file mode 100644 index 000000000..742615869 --- /dev/null +++ b/Linphone/Assets.xcassets/camera-rotate.imageset/camera-rotate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/search.imageset/Contents.json b/Linphone/Assets.xcassets/camera.imageset/Contents.json similarity index 89% rename from Linphone/Assets.xcassets/search.imageset/Contents.json rename to Linphone/Assets.xcassets/camera.imageset/Contents.json index 6e7791884..5375d722d 100644 --- a/Linphone/Assets.xcassets/search.imageset/Contents.json +++ b/Linphone/Assets.xcassets/camera.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "search.svg", + "filename" : "camera.svg", "idiom" : "universal", "scale" : "1x" }, diff --git a/Linphone/Assets.xcassets/camera.imageset/camera.svg b/Linphone/Assets.xcassets/camera.imageset/camera.svg new file mode 100644 index 000000000..7a8d0ac40 --- /dev/null +++ b/Linphone/Assets.xcassets/camera.imageset/camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/caret-down.imageset/caret-down.svg b/Linphone/Assets.xcassets/caret-down.imageset/caret-down.svg index 42f37b716..5b5218a2f 100644 --- a/Linphone/Assets.xcassets/caret-down.imageset/caret-down.svg +++ b/Linphone/Assets.xcassets/caret-down.imageset/caret-down.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/caret-left.imageset/caret-left.svg b/Linphone/Assets.xcassets/caret-left.imageset/caret-left.svg index a3a1e39a6..178311847 100644 --- a/Linphone/Assets.xcassets/caret-left.imageset/caret-left.svg +++ b/Linphone/Assets.xcassets/caret-left.imageset/caret-left.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/caret-right.imageset/Contents.json b/Linphone/Assets.xcassets/caret-right.imageset/Contents.json new file mode 100644 index 000000000..e4a5b260d --- /dev/null +++ b/Linphone/Assets.xcassets/caret-right.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "caret-right.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/caret-right.imageset/caret-right.svg b/Linphone/Assets.xcassets/caret-right.imageset/caret-right.svg new file mode 100644 index 000000000..e291c0ebe --- /dev/null +++ b/Linphone/Assets.xcassets/caret-right.imageset/caret-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/caret-up.imageset/Contents.json b/Linphone/Assets.xcassets/caret-up.imageset/Contents.json new file mode 100644 index 000000000..c7fea1d89 --- /dev/null +++ b/Linphone/Assets.xcassets/caret-up.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "caret-up.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/caret-up.imageset/caret-up.svg b/Linphone/Assets.xcassets/caret-up.imageset/caret-up.svg new file mode 100644 index 000000000..27a7d9701 --- /dev/null +++ b/Linphone/Assets.xcassets/caret-up.imageset/caret-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/cell-signal-full.imageset/Contents.json b/Linphone/Assets.xcassets/cell-signal-full.imageset/Contents.json new file mode 100644 index 000000000..cc8c45142 --- /dev/null +++ b/Linphone/Assets.xcassets/cell-signal-full.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "cell-signal-full.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/cell-signal-full.imageset/cell-signal-full.svg b/Linphone/Assets.xcassets/cell-signal-full.imageset/cell-signal-full.svg new file mode 100644 index 000000000..8a04f8fed --- /dev/null +++ b/Linphone/Assets.xcassets/cell-signal-full.imageset/cell-signal-full.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/cell-signal-low.imageset/Contents.json b/Linphone/Assets.xcassets/cell-signal-low.imageset/Contents.json new file mode 100644 index 000000000..19bbefaf2 --- /dev/null +++ b/Linphone/Assets.xcassets/cell-signal-low.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "cell-signal-low.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/cell-signal-low.imageset/cell-signal-low.svg b/Linphone/Assets.xcassets/cell-signal-low.imageset/cell-signal-low.svg new file mode 100644 index 000000000..fac7f934c --- /dev/null +++ b/Linphone/Assets.xcassets/cell-signal-low.imageset/cell-signal-low.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/chat-dots.imageset/Contents.json b/Linphone/Assets.xcassets/chat-dots.imageset/Contents.json new file mode 100644 index 000000000..539c622ea --- /dev/null +++ b/Linphone/Assets.xcassets/chat-dots.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "chat-dots.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/chat-dots.imageset/chat-dots.svg b/Linphone/Assets.xcassets/chat-dots.imageset/chat-dots.svg new file mode 100644 index 000000000..481d876d2 --- /dev/null +++ b/Linphone/Assets.xcassets/chat-dots.imageset/chat-dots.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/chat-teardrop-text-slash.imageset/Contents.json b/Linphone/Assets.xcassets/chat-teardrop-text-slash.imageset/Contents.json new file mode 100644 index 000000000..7f5561e86 --- /dev/null +++ b/Linphone/Assets.xcassets/chat-teardrop-text-slash.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "chat-teardrop-text-slash.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/conversation.imageset/conversation.svg b/Linphone/Assets.xcassets/chat-teardrop-text-slash.imageset/chat-teardrop-text-slash.svg similarity index 100% rename from Linphone/Assets.xcassets/conversation.imageset/conversation.svg rename to Linphone/Assets.xcassets/chat-teardrop-text-slash.imageset/chat-teardrop-text-slash.svg diff --git a/Linphone/Assets.xcassets/chat-teardrop-text.imageset/Contents.json b/Linphone/Assets.xcassets/chat-teardrop-text.imageset/Contents.json new file mode 100644 index 000000000..0a273d5fb --- /dev/null +++ b/Linphone/Assets.xcassets/chat-teardrop-text.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "chat-teardrop-text.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/chat-teardrop-text.imageset/chat-teardrop-text.svg b/Linphone/Assets.xcassets/chat-teardrop-text.imageset/chat-teardrop-text.svg new file mode 100644 index 000000000..d07e384d6 --- /dev/null +++ b/Linphone/Assets.xcassets/chat-teardrop-text.imageset/chat-teardrop-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/chat-text.imageset/Contents.json b/Linphone/Assets.xcassets/chat-text.imageset/Contents.json new file mode 100644 index 000000000..1fb54e400 --- /dev/null +++ b/Linphone/Assets.xcassets/chat-text.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "chat-text.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/chat-text.imageset/chat-text.svg b/Linphone/Assets.xcassets/chat-text.imageset/chat-text.svg new file mode 100644 index 000000000..6be649cbe --- /dev/null +++ b/Linphone/Assets.xcassets/chat-text.imageset/chat-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/check-square-offset.imageset/Contents.json b/Linphone/Assets.xcassets/check-square-offset.imageset/Contents.json new file mode 100644 index 000000000..02d20b1ef --- /dev/null +++ b/Linphone/Assets.xcassets/check-square-offset.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "check-square-offset.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/check-square-offset.imageset/check-square-offset.svg b/Linphone/Assets.xcassets/check-square-offset.imageset/check-square-offset.svg new file mode 100644 index 000000000..518a1dc54 --- /dev/null +++ b/Linphone/Assets.xcassets/check-square-offset.imageset/check-square-offset.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/danger.imageset/Contents.json b/Linphone/Assets.xcassets/check.imageset/Contents.json similarity index 89% rename from Linphone/Assets.xcassets/danger.imageset/Contents.json rename to Linphone/Assets.xcassets/check.imageset/Contents.json index 63a1157a7..17203ccbd 100644 --- a/Linphone/Assets.xcassets/danger.imageset/Contents.json +++ b/Linphone/Assets.xcassets/check.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "danger.svg", + "filename" : "check.svg", "idiom" : "universal", "scale" : "1x" }, diff --git a/Linphone/Assets.xcassets/check.imageset/check.svg b/Linphone/Assets.xcassets/check.imageset/check.svg new file mode 100644 index 000000000..2e308611c --- /dev/null +++ b/Linphone/Assets.xcassets/check.imageset/check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/filtres.imageset/Contents.json b/Linphone/Assets.xcassets/checks.imageset/Contents.json similarity index 88% rename from Linphone/Assets.xcassets/filtres.imageset/Contents.json rename to Linphone/Assets.xcassets/checks.imageset/Contents.json index 49440ce83..79cbf5b7a 100644 --- a/Linphone/Assets.xcassets/filtres.imageset/Contents.json +++ b/Linphone/Assets.xcassets/checks.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "filtres.svg", + "filename" : "checks.svg", "idiom" : "universal", "scale" : "1x" }, diff --git a/Linphone/Assets.xcassets/checks.imageset/checks.svg b/Linphone/Assets.xcassets/checks.imageset/checks.svg new file mode 100644 index 000000000..11d157d02 --- /dev/null +++ b/Linphone/Assets.xcassets/checks.imageset/checks.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/clock-countdown.imageset/Contents.json b/Linphone/Assets.xcassets/clock-countdown.imageset/Contents.json new file mode 100644 index 000000000..c3c8e0139 --- /dev/null +++ b/Linphone/Assets.xcassets/clock-countdown.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "clock-countdown.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/clock-countdown.imageset/clock-countdown.svg b/Linphone/Assets.xcassets/clock-countdown.imageset/clock-countdown.svg new file mode 100644 index 000000000..548aeabcd --- /dev/null +++ b/Linphone/Assets.xcassets/clock-countdown.imageset/clock-countdown.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/clock.imageset/Contents.json b/Linphone/Assets.xcassets/clock.imageset/Contents.json new file mode 100644 index 000000000..c78a16f5e --- /dev/null +++ b/Linphone/Assets.xcassets/clock.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "clock.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/clock.imageset/clock.svg b/Linphone/Assets.xcassets/clock.imageset/clock.svg new file mode 100644 index 000000000..18f1a5b97 --- /dev/null +++ b/Linphone/Assets.xcassets/clock.imageset/clock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/contacts.imageset/contacts.svg b/Linphone/Assets.xcassets/contacts.imageset/contacts.svg deleted file mode 100644 index f1706dc95..000000000 --- a/Linphone/Assets.xcassets/contacts.imageset/contacts.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Linphone/Assets.xcassets/more.imageset/Contents.json b/Linphone/Assets.xcassets/copy.imageset/Contents.json similarity index 89% rename from Linphone/Assets.xcassets/more.imageset/Contents.json rename to Linphone/Assets.xcassets/copy.imageset/Contents.json index 259aa12c1..be85778ce 100644 --- a/Linphone/Assets.xcassets/more.imageset/Contents.json +++ b/Linphone/Assets.xcassets/copy.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "more.svg", + "filename" : "copy.svg", "idiom" : "universal", "scale" : "1x" }, diff --git a/Linphone/Assets.xcassets/copy.imageset/copy.svg b/Linphone/Assets.xcassets/copy.imageset/copy.svg new file mode 100644 index 000000000..f371da500 --- /dev/null +++ b/Linphone/Assets.xcassets/copy.imageset/copy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/danger.imageset/danger.svg b/Linphone/Assets.xcassets/danger.imageset/danger.svg deleted file mode 100644 index 7f47d7312..000000000 --- a/Linphone/Assets.xcassets/danger.imageset/danger.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Linphone/Assets.xcassets/detective.imageset/Contents.json b/Linphone/Assets.xcassets/detective.imageset/Contents.json new file mode 100644 index 000000000..3b2845e51 --- /dev/null +++ b/Linphone/Assets.xcassets/detective.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "detective.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/detective.imageset/detective.svg b/Linphone/Assets.xcassets/detective.imageset/detective.svg new file mode 100644 index 000000000..7eb7f87d2 --- /dev/null +++ b/Linphone/Assets.xcassets/detective.imageset/detective.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/dots-three-vertical.imageset/Contents.json b/Linphone/Assets.xcassets/dots-three-vertical.imageset/Contents.json new file mode 100644 index 000000000..b45f32020 --- /dev/null +++ b/Linphone/Assets.xcassets/dots-three-vertical.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "dots-three-vertical.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/dots-three-vertical.imageset/dots-three-vertical.svg b/Linphone/Assets.xcassets/dots-three-vertical.imageset/dots-three-vertical.svg new file mode 100644 index 000000000..00e6090fb --- /dev/null +++ b/Linphone/Assets.xcassets/dots-three-vertical.imageset/dots-three-vertical.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/ear.imageset/Contents.json b/Linphone/Assets.xcassets/ear.imageset/Contents.json new file mode 100644 index 000000000..d092470f2 --- /dev/null +++ b/Linphone/Assets.xcassets/ear.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "ear.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/ear.imageset/ear.svg b/Linphone/Assets.xcassets/ear.imageset/ear.svg new file mode 100644 index 000000000..15ff6531c --- /dev/null +++ b/Linphone/Assets.xcassets/ear.imageset/ear.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/envelope-simple-open.imageset/Contents.json b/Linphone/Assets.xcassets/envelope-simple-open.imageset/Contents.json new file mode 100644 index 000000000..0524ea689 --- /dev/null +++ b/Linphone/Assets.xcassets/envelope-simple-open.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "envelope-simple-open.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/envelope-simple-open.imageset/envelope-simple-open.svg b/Linphone/Assets.xcassets/envelope-simple-open.imageset/envelope-simple-open.svg new file mode 100644 index 000000000..5c826c63b --- /dev/null +++ b/Linphone/Assets.xcassets/envelope-simple-open.imageset/envelope-simple-open.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/envelope-simple.imageset/Contents.json b/Linphone/Assets.xcassets/envelope-simple.imageset/Contents.json new file mode 100644 index 000000000..7f415c5bd --- /dev/null +++ b/Linphone/Assets.xcassets/envelope-simple.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "envelope-simple.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/envelope-simple.imageset/envelope-simple.svg b/Linphone/Assets.xcassets/envelope-simple.imageset/envelope-simple.svg new file mode 100644 index 000000000..ada3da40b --- /dev/null +++ b/Linphone/Assets.xcassets/envelope-simple.imageset/envelope-simple.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/eye-slash.imageset/eye-slash.svg b/Linphone/Assets.xcassets/eye-slash.imageset/eye-slash.svg index 6dc0e47a4..aadbe3ca5 100644 --- a/Linphone/Assets.xcassets/eye-slash.imageset/eye-slash.svg +++ b/Linphone/Assets.xcassets/eye-slash.imageset/eye-slash.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/eye.imageset/eye.svg b/Linphone/Assets.xcassets/eye.imageset/eye.svg index 36ed4da10..61b225273 100644 --- a/Linphone/Assets.xcassets/eye.imageset/eye.svg +++ b/Linphone/Assets.xcassets/eye.imageset/eye.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/file-text.imageset/Contents.json b/Linphone/Assets.xcassets/file-text.imageset/Contents.json new file mode 100644 index 000000000..f52ed3162 --- /dev/null +++ b/Linphone/Assets.xcassets/file-text.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "file-text.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/file-text.imageset/file-text.svg b/Linphone/Assets.xcassets/file-text.imageset/file-text.svg new file mode 100644 index 000000000..0b256101e --- /dev/null +++ b/Linphone/Assets.xcassets/file-text.imageset/file-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/filtres.imageset/filtres.svg b/Linphone/Assets.xcassets/filtres.imageset/filtres.svg deleted file mode 100644 index 032a19982..000000000 --- a/Linphone/Assets.xcassets/filtres.imageset/filtres.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Linphone/Assets.xcassets/funnel.imageset/Contents.json b/Linphone/Assets.xcassets/funnel.imageset/Contents.json new file mode 100644 index 000000000..a6781a2c1 --- /dev/null +++ b/Linphone/Assets.xcassets/funnel.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "funnel.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/funnel.imageset/funnel.svg b/Linphone/Assets.xcassets/funnel.imageset/funnel.svg new file mode 100644 index 000000000..8ae63bc99 --- /dev/null +++ b/Linphone/Assets.xcassets/funnel.imageset/funnel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/gear.imageset/Contents.json b/Linphone/Assets.xcassets/gear.imageset/Contents.json new file mode 100644 index 000000000..90c5ae20b --- /dev/null +++ b/Linphone/Assets.xcassets/gear.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "gear.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/gear.imageset/gear.svg b/Linphone/Assets.xcassets/gear.imageset/gear.svg new file mode 100644 index 000000000..2781afab4 --- /dev/null +++ b/Linphone/Assets.xcassets/gear.imageset/gear.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/globe-hemisphere-west.imageset/Contents.json b/Linphone/Assets.xcassets/globe-hemisphere-west.imageset/Contents.json new file mode 100644 index 000000000..3af8b9f04 --- /dev/null +++ b/Linphone/Assets.xcassets/globe-hemisphere-west.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "globe-hemisphere-west.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/globe-hemisphere-west.imageset/globe-hemisphere-west.svg b/Linphone/Assets.xcassets/globe-hemisphere-west.imageset/globe-hemisphere-west.svg new file mode 100644 index 000000000..61c122a7e --- /dev/null +++ b/Linphone/Assets.xcassets/globe-hemisphere-west.imageset/globe-hemisphere-west.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/green-check.imageset/Contents.json b/Linphone/Assets.xcassets/green-check.imageset/Contents.json new file mode 100644 index 000000000..f4e39fa87 --- /dev/null +++ b/Linphone/Assets.xcassets/green-check.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "green-check.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/green-check.imageset/green-check.svg b/Linphone/Assets.xcassets/green-check.imageset/green-check.svg new file mode 100644 index 000000000..1d42925ba --- /dev/null +++ b/Linphone/Assets.xcassets/green-check.imageset/green-check.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/Assets.xcassets/headset.imageset/Contents.json b/Linphone/Assets.xcassets/headset.imageset/Contents.json new file mode 100644 index 000000000..f302ef8ae --- /dev/null +++ b/Linphone/Assets.xcassets/headset.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "headset.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/headset.imageset/headset.svg b/Linphone/Assets.xcassets/headset.imageset/headset.svg new file mode 100644 index 000000000..40e5e753e --- /dev/null +++ b/Linphone/Assets.xcassets/headset.imageset/headset.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/heart-fill.imageset/Contents.json b/Linphone/Assets.xcassets/heart-fill.imageset/Contents.json new file mode 100644 index 000000000..2d59cc5d7 --- /dev/null +++ b/Linphone/Assets.xcassets/heart-fill.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "heart-fill.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/heart-fill.imageset/heart-fill.svg b/Linphone/Assets.xcassets/heart-fill.imageset/heart-fill.svg new file mode 100644 index 000000000..04ca5ba3c --- /dev/null +++ b/Linphone/Assets.xcassets/heart-fill.imageset/heart-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/heart.imageset/Contents.json b/Linphone/Assets.xcassets/heart.imageset/Contents.json new file mode 100644 index 000000000..0b277d7d6 --- /dev/null +++ b/Linphone/Assets.xcassets/heart.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "heart.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/heart.imageset/heart.svg b/Linphone/Assets.xcassets/heart.imageset/heart.svg new file mode 100644 index 000000000..89f2caf8e --- /dev/null +++ b/Linphone/Assets.xcassets/heart.imageset/heart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/illus-belledonne.imageset/Contents.json b/Linphone/Assets.xcassets/illus-belledonne.imageset/Contents.json new file mode 100644 index 000000000..867b2dc3e --- /dev/null +++ b/Linphone/Assets.xcassets/illus-belledonne.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "illus-belledonne.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/illus-belledonne1.imageset/illus-belledonne1.svg b/Linphone/Assets.xcassets/illus-belledonne.imageset/illus-belledonne.svg similarity index 100% rename from Linphone/Assets.xcassets/illus-belledonne1.imageset/illus-belledonne1.svg rename to Linphone/Assets.xcassets/illus-belledonne.imageset/illus-belledonne.svg diff --git a/Linphone/Assets.xcassets/illus-belledonne1.imageset/Contents.json b/Linphone/Assets.xcassets/illus-belledonne1.imageset/Contents.json deleted file mode 100644 index ca2746c0a..000000000 --- a/Linphone/Assets.xcassets/illus-belledonne1.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "illus-belledonne1.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Linphone/Assets.xcassets/in-progress.imageset/Contents.json b/Linphone/Assets.xcassets/in-progress.imageset/Contents.json new file mode 100644 index 000000000..c8a089b4c --- /dev/null +++ b/Linphone/Assets.xcassets/in-progress.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "in_progress.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/in-progress.imageset/in_progress.svg b/Linphone/Assets.xcassets/in-progress.imageset/in_progress.svg new file mode 100644 index 000000000..0738d048a --- /dev/null +++ b/Linphone/Assets.xcassets/in-progress.imageset/in_progress.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Linphone/Assets.xcassets/incoming-call-missed.imageset/Contents.json b/Linphone/Assets.xcassets/incoming-call-missed.imageset/Contents.json new file mode 100644 index 000000000..6482c5867 --- /dev/null +++ b/Linphone/Assets.xcassets/incoming-call-missed.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "incoming_call_missed.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/incoming-call-missed.imageset/incoming_call_missed.svg b/Linphone/Assets.xcassets/incoming-call-missed.imageset/incoming_call_missed.svg new file mode 100644 index 000000000..4faa85b70 --- /dev/null +++ b/Linphone/Assets.xcassets/incoming-call-missed.imageset/incoming_call_missed.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/Assets.xcassets/incoming-call-rejected.imageset/Contents.json b/Linphone/Assets.xcassets/incoming-call-rejected.imageset/Contents.json new file mode 100644 index 000000000..7ea4c1b04 --- /dev/null +++ b/Linphone/Assets.xcassets/incoming-call-rejected.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "incoming_call_rejected.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/incoming-call-rejected.imageset/incoming_call_rejected.svg b/Linphone/Assets.xcassets/incoming-call-rejected.imageset/incoming_call_rejected.svg new file mode 100644 index 000000000..c64a80ebd --- /dev/null +++ b/Linphone/Assets.xcassets/incoming-call-rejected.imageset/incoming_call_rejected.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/Assets.xcassets/incoming-call.imageset/Contents.json b/Linphone/Assets.xcassets/incoming-call.imageset/Contents.json new file mode 100644 index 000000000..479ca7f96 --- /dev/null +++ b/Linphone/Assets.xcassets/incoming-call.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "incoming_call.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/incoming-call.imageset/incoming_call.svg b/Linphone/Assets.xcassets/incoming-call.imageset/incoming_call.svg new file mode 100644 index 000000000..5dab38385 --- /dev/null +++ b/Linphone/Assets.xcassets/incoming-call.imageset/incoming_call.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/Assets.xcassets/info.imageset/info.svg b/Linphone/Assets.xcassets/info.imageset/info.svg index 40cce74f7..2f26d80a1 100644 --- a/Linphone/Assets.xcassets/info.imageset/info.svg +++ b/Linphone/Assets.xcassets/info.imageset/info.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/keyboard.imageset/Contents.json b/Linphone/Assets.xcassets/keyboard.imageset/Contents.json new file mode 100644 index 000000000..a9ae5f1ed --- /dev/null +++ b/Linphone/Assets.xcassets/keyboard.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "keyboard.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/keyboard.imageset/keyboard.svg b/Linphone/Assets.xcassets/keyboard.imageset/keyboard.svg new file mode 100644 index 000000000..e7aa36dd0 --- /dev/null +++ b/Linphone/Assets.xcassets/keyboard.imageset/keyboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/linphone.imageset/linphone.svg b/Linphone/Assets.xcassets/linphone.imageset/linphone.svg index 44f54349b..005da361d 100644 --- a/Linphone/Assets.xcassets/linphone.imageset/linphone.svg +++ b/Linphone/Assets.xcassets/linphone.imageset/linphone.svg @@ -1,4 +1,6 @@ - - + + + + diff --git a/Linphone/Assets.xcassets/magnifying-glass.imageset/Contents.json b/Linphone/Assets.xcassets/magnifying-glass.imageset/Contents.json new file mode 100644 index 000000000..c684c02fd --- /dev/null +++ b/Linphone/Assets.xcassets/magnifying-glass.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "magnifying-glass.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/magnifying-glass.imageset/magnifying-glass.svg b/Linphone/Assets.xcassets/magnifying-glass.imageset/magnifying-glass.svg new file mode 100644 index 000000000..39a3b251d --- /dev/null +++ b/Linphone/Assets.xcassets/magnifying-glass.imageset/magnifying-glass.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/media-encryption-srtp.imageset/Contents.json b/Linphone/Assets.xcassets/media-encryption-srtp.imageset/Contents.json new file mode 100644 index 000000000..0417d3217 --- /dev/null +++ b/Linphone/Assets.xcassets/media-encryption-srtp.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "media_encryption_srtp.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/media-encryption-srtp.imageset/media_encryption_srtp.svg b/Linphone/Assets.xcassets/media-encryption-srtp.imageset/media_encryption_srtp.svg new file mode 100644 index 000000000..37df36fc3 --- /dev/null +++ b/Linphone/Assets.xcassets/media-encryption-srtp.imageset/media_encryption_srtp.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Linphone/Assets.xcassets/media-encryption-zrtp-pq.imageset/Contents.json b/Linphone/Assets.xcassets/media-encryption-zrtp-pq.imageset/Contents.json new file mode 100644 index 000000000..2296357bc --- /dev/null +++ b/Linphone/Assets.xcassets/media-encryption-zrtp-pq.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "media_encryption_zrtp_pq.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/media-encryption-zrtp-pq.imageset/media_encryption_zrtp_pq.svg b/Linphone/Assets.xcassets/media-encryption-zrtp-pq.imageset/media_encryption_zrtp_pq.svg new file mode 100644 index 000000000..23acb2599 --- /dev/null +++ b/Linphone/Assets.xcassets/media-encryption-zrtp-pq.imageset/media_encryption_zrtp_pq.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Linphone/Assets.xcassets/microphone-slash.imageset/Contents.json b/Linphone/Assets.xcassets/microphone-slash.imageset/Contents.json new file mode 100644 index 000000000..2333803cf --- /dev/null +++ b/Linphone/Assets.xcassets/microphone-slash.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "microphone-slash.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/microphone-slash.imageset/microphone-slash.svg b/Linphone/Assets.xcassets/microphone-slash.imageset/microphone-slash.svg new file mode 100644 index 000000000..406de1e82 --- /dev/null +++ b/Linphone/Assets.xcassets/microphone-slash.imageset/microphone-slash.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/microphone-stage.imageset/Contents.json b/Linphone/Assets.xcassets/microphone-stage.imageset/Contents.json new file mode 100644 index 000000000..810efc4ce --- /dev/null +++ b/Linphone/Assets.xcassets/microphone-stage.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "microphone-stage.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/microphone-stage.imageset/microphone-stage.svg b/Linphone/Assets.xcassets/microphone-stage.imageset/microphone-stage.svg new file mode 100644 index 000000000..dd4ba119d --- /dev/null +++ b/Linphone/Assets.xcassets/microphone-stage.imageset/microphone-stage.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/microphone.imageset/microphone.svg b/Linphone/Assets.xcassets/microphone.imageset/microphone.svg index c4aeceaeb..36f7b4e0a 100644 --- a/Linphone/Assets.xcassets/microphone.imageset/microphone.svg +++ b/Linphone/Assets.xcassets/microphone.imageset/microphone.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/more.imageset/more.svg b/Linphone/Assets.xcassets/more.imageset/more.svg deleted file mode 100644 index c9321f60f..000000000 --- a/Linphone/Assets.xcassets/more.imageset/more.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Linphone/Assets.xcassets/mountains.imageset/Contents.json b/Linphone/Assets.xcassets/mountains.imageset/Contents.json new file mode 100644 index 000000000..fbcb6f1f0 --- /dev/null +++ b/Linphone/Assets.xcassets/mountains.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "mountains.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/mountains.imageset/mountains.svg b/Linphone/Assets.xcassets/mountains.imageset/mountains.svg new file mode 100644 index 000000000..fdb0ecf8d --- /dev/null +++ b/Linphone/Assets.xcassets/mountains.imageset/mountains.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/Linphone/Assets.xcassets/not-trusted.imageset/Contents.json b/Linphone/Assets.xcassets/not-trusted.imageset/Contents.json new file mode 100644 index 000000000..919aa20b8 --- /dev/null +++ b/Linphone/Assets.xcassets/not-trusted.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "not_trusted.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/not-trusted.imageset/not_trusted.svg b/Linphone/Assets.xcassets/not-trusted.imageset/not_trusted.svg new file mode 100644 index 000000000..b16dc774d --- /dev/null +++ b/Linphone/Assets.xcassets/not-trusted.imageset/not_trusted.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/Linphone/Assets.xcassets/open-source.imageset/Contents.json b/Linphone/Assets.xcassets/open-source.imageset/Contents.json index f63666669..a65928f62 100644 --- a/Linphone/Assets.xcassets/open-source.imageset/Contents.json +++ b/Linphone/Assets.xcassets/open-source.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "open-source.svg", + "filename" : "open_source.svg", "idiom" : "universal", "scale" : "1x" }, diff --git a/Linphone/Assets.xcassets/open-source.imageset/open-source.svg b/Linphone/Assets.xcassets/open-source.imageset/open-source.svg deleted file mode 100644 index 9bbb7658b..000000000 --- a/Linphone/Assets.xcassets/open-source.imageset/open-source.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Linphone/Assets.xcassets/open-source.imageset/open_source.svg b/Linphone/Assets.xcassets/open-source.imageset/open_source.svg new file mode 100644 index 000000000..5f9b9ae0b --- /dev/null +++ b/Linphone/Assets.xcassets/open-source.imageset/open_source.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/Assets.xcassets/outgoing-call-missed.imageset/Contents.json b/Linphone/Assets.xcassets/outgoing-call-missed.imageset/Contents.json new file mode 100644 index 000000000..52b286e00 --- /dev/null +++ b/Linphone/Assets.xcassets/outgoing-call-missed.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "outgoing_call_missed.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/outgoing-call-missed.imageset/outgoing_call_missed.svg b/Linphone/Assets.xcassets/outgoing-call-missed.imageset/outgoing_call_missed.svg new file mode 100644 index 000000000..a5433e0d3 --- /dev/null +++ b/Linphone/Assets.xcassets/outgoing-call-missed.imageset/outgoing_call_missed.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/Assets.xcassets/outgoing-call-rejected.imageset/Contents.json b/Linphone/Assets.xcassets/outgoing-call-rejected.imageset/Contents.json new file mode 100644 index 000000000..2af078bf0 --- /dev/null +++ b/Linphone/Assets.xcassets/outgoing-call-rejected.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "outgoing_call_rejected.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/outgoing-call-rejected.imageset/outgoing_call_rejected.svg b/Linphone/Assets.xcassets/outgoing-call-rejected.imageset/outgoing_call_rejected.svg new file mode 100644 index 000000000..39fa5aeac --- /dev/null +++ b/Linphone/Assets.xcassets/outgoing-call-rejected.imageset/outgoing_call_rejected.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/Assets.xcassets/outgoing-call.imageset/Contents.json b/Linphone/Assets.xcassets/outgoing-call.imageset/Contents.json new file mode 100644 index 000000000..3423e59e1 --- /dev/null +++ b/Linphone/Assets.xcassets/outgoing-call.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "outgoing_call.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/outgoing-call.imageset/outgoing_call.svg b/Linphone/Assets.xcassets/outgoing-call.imageset/outgoing_call.svg new file mode 100644 index 000000000..21bb7c7da --- /dev/null +++ b/Linphone/Assets.xcassets/outgoing-call.imageset/outgoing_call.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/Assets.xcassets/paper-plane-tilt.imageset/Contents.json b/Linphone/Assets.xcassets/paper-plane-tilt.imageset/Contents.json new file mode 100644 index 000000000..74767b869 --- /dev/null +++ b/Linphone/Assets.xcassets/paper-plane-tilt.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "paper-plane-tilt.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/paper-plane-tilt.imageset/paper-plane-tilt.svg b/Linphone/Assets.xcassets/paper-plane-tilt.imageset/paper-plane-tilt.svg new file mode 100644 index 000000000..73f7dedd3 --- /dev/null +++ b/Linphone/Assets.xcassets/paper-plane-tilt.imageset/paper-plane-tilt.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/paperclip.imageset/Contents.json b/Linphone/Assets.xcassets/paperclip.imageset/Contents.json new file mode 100644 index 000000000..f901e0f92 --- /dev/null +++ b/Linphone/Assets.xcassets/paperclip.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "paperclip.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/paperclip.imageset/paperclip.svg b/Linphone/Assets.xcassets/paperclip.imageset/paperclip.svg new file mode 100644 index 000000000..8ed525881 --- /dev/null +++ b/Linphone/Assets.xcassets/paperclip.imageset/paperclip.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/pause.imageset/Contents.json b/Linphone/Assets.xcassets/pause.imageset/Contents.json new file mode 100644 index 000000000..61f53a7c2 --- /dev/null +++ b/Linphone/Assets.xcassets/pause.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "pause.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/pause.imageset/pause.svg b/Linphone/Assets.xcassets/pause.imageset/pause.svg new file mode 100644 index 000000000..2ba53b7c4 --- /dev/null +++ b/Linphone/Assets.xcassets/pause.imageset/pause.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/pencil-simple.imageset/Contents.json b/Linphone/Assets.xcassets/pencil-simple.imageset/Contents.json new file mode 100644 index 000000000..fb2e28212 --- /dev/null +++ b/Linphone/Assets.xcassets/pencil-simple.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "pencil-simple.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/pencil-simple.imageset/pencil-simple.svg b/Linphone/Assets.xcassets/pencil-simple.imageset/pencil-simple.svg new file mode 100644 index 000000000..35cfc71c7 --- /dev/null +++ b/Linphone/Assets.xcassets/pencil-simple.imageset/pencil-simple.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/phone-call.imageset/Contents.json b/Linphone/Assets.xcassets/phone-call.imageset/Contents.json new file mode 100644 index 000000000..caac2f414 --- /dev/null +++ b/Linphone/Assets.xcassets/phone-call.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "phone-call.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/phone-call.imageset/phone-call.svg b/Linphone/Assets.xcassets/phone-call.imageset/phone-call.svg new file mode 100644 index 000000000..abba91e83 --- /dev/null +++ b/Linphone/Assets.xcassets/phone-call.imageset/phone-call.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/phone-disconnect.imageset/Contents.json b/Linphone/Assets.xcassets/phone-disconnect.imageset/Contents.json new file mode 100644 index 000000000..b0f43cd14 --- /dev/null +++ b/Linphone/Assets.xcassets/phone-disconnect.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "phone-disconnect.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/phone-disconnect.imageset/phone-disconnect.svg b/Linphone/Assets.xcassets/phone-disconnect.imageset/phone-disconnect.svg new file mode 100644 index 000000000..5e42636c4 --- /dev/null +++ b/Linphone/Assets.xcassets/phone-disconnect.imageset/phone-disconnect.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/phone-plus.imageset/Contents.json b/Linphone/Assets.xcassets/phone-plus.imageset/Contents.json new file mode 100644 index 000000000..409aac10b --- /dev/null +++ b/Linphone/Assets.xcassets/phone-plus.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "phone-plus.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/phone-plus.imageset/phone-plus.svg b/Linphone/Assets.xcassets/phone-plus.imageset/phone-plus.svg new file mode 100644 index 000000000..e9bad66df --- /dev/null +++ b/Linphone/Assets.xcassets/phone-plus.imageset/phone-plus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/phone.imageset/phone.svg b/Linphone/Assets.xcassets/phone.imageset/phone.svg index 6eb862926..ac3ff5a1c 100644 --- a/Linphone/Assets.xcassets/phone.imageset/phone.svg +++ b/Linphone/Assets.xcassets/phone.imageset/phone.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/play.imageset/Contents.json b/Linphone/Assets.xcassets/play.imageset/Contents.json new file mode 100644 index 000000000..b17e13df5 --- /dev/null +++ b/Linphone/Assets.xcassets/play.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "play.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/play.imageset/play.svg b/Linphone/Assets.xcassets/play.imageset/play.svg new file mode 100644 index 000000000..9df4f4c24 --- /dev/null +++ b/Linphone/Assets.xcassets/play.imageset/play.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/plus-circle.imageset/Contents.json b/Linphone/Assets.xcassets/plus-circle.imageset/Contents.json new file mode 100644 index 000000000..1775f9ba2 --- /dev/null +++ b/Linphone/Assets.xcassets/plus-circle.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "plus-circle.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/plus-circle.imageset/plus-circle.svg b/Linphone/Assets.xcassets/plus-circle.imageset/plus-circle.svg new file mode 100644 index 000000000..051b34cda --- /dev/null +++ b/Linphone/Assets.xcassets/plus-circle.imageset/plus-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/profil-picture-default.imageset/Contents.json b/Linphone/Assets.xcassets/profil-picture-default.imageset/Contents.json new file mode 100644 index 000000000..68bdd056b --- /dev/null +++ b/Linphone/Assets.xcassets/profil-picture-default.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "profil-picture-default.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/profil-picture-default.imageset/profil-picture-default.svg b/Linphone/Assets.xcassets/profil-picture-default.imageset/profil-picture-default.svg new file mode 100644 index 000000000..b2bea3b29 --- /dev/null +++ b/Linphone/Assets.xcassets/profil-picture-default.imageset/profil-picture-default.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/Linphone/Assets.xcassets/qr-code.imageset/qr-code.svg b/Linphone/Assets.xcassets/qr-code.imageset/qr-code.svg index d5cd44274..2d6248f02 100644 --- a/Linphone/Assets.xcassets/qr-code.imageset/qr-code.svg +++ b/Linphone/Assets.xcassets/qr-code.imageset/qr-code.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/question.imageset/Contents.json b/Linphone/Assets.xcassets/question.imageset/Contents.json new file mode 100644 index 000000000..893d8a3b3 --- /dev/null +++ b/Linphone/Assets.xcassets/question.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "question.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/question.imageset/question.svg b/Linphone/Assets.xcassets/question.imageset/question.svg new file mode 100644 index 000000000..6d8013ceb --- /dev/null +++ b/Linphone/Assets.xcassets/question.imageset/question.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/record-fill.imageset/Contents.json b/Linphone/Assets.xcassets/record-fill.imageset/Contents.json new file mode 100644 index 000000000..81bfe4345 --- /dev/null +++ b/Linphone/Assets.xcassets/record-fill.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "record-fill.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/record-fill.imageset/record-fill.svg b/Linphone/Assets.xcassets/record-fill.imageset/record-fill.svg new file mode 100644 index 000000000..72d18e999 --- /dev/null +++ b/Linphone/Assets.xcassets/record-fill.imageset/record-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/search.imageset/search.svg b/Linphone/Assets.xcassets/search.imageset/search.svg deleted file mode 100644 index 201e5000d..000000000 --- a/Linphone/Assets.xcassets/search.imageset/search.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Linphone/Assets.xcassets/secure-image.imageset/Contents.json b/Linphone/Assets.xcassets/secure-image.imageset/Contents.json deleted file mode 100644 index ade67196d..000000000 --- a/Linphone/Assets.xcassets/secure-image.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "secure-image.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Linphone/Assets.xcassets/secure-image.imageset/secure-image.svg b/Linphone/Assets.xcassets/secure-image.imageset/secure-image.svg deleted file mode 100644 index 7c8d6ee3a..000000000 --- a/Linphone/Assets.xcassets/secure-image.imageset/secure-image.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Linphone/Assets.xcassets/secured.imageset/Contents.json b/Linphone/Assets.xcassets/secured.imageset/Contents.json new file mode 100644 index 000000000..ce5927e0f --- /dev/null +++ b/Linphone/Assets.xcassets/secured.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "secured.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/secured.imageset/secured.svg b/Linphone/Assets.xcassets/secured.imageset/secured.svg new file mode 100644 index 000000000..212c4e527 --- /dev/null +++ b/Linphone/Assets.xcassets/secured.imageset/secured.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Linphone/Assets.xcassets/share-network.imageset/Contents.json b/Linphone/Assets.xcassets/share-network.imageset/Contents.json new file mode 100644 index 000000000..46fe445fb --- /dev/null +++ b/Linphone/Assets.xcassets/share-network.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "share-network.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/share-network.imageset/share-network.svg b/Linphone/Assets.xcassets/share-network.imageset/share-network.svg new file mode 100644 index 000000000..02d8619a1 --- /dev/null +++ b/Linphone/Assets.xcassets/share-network.imageset/share-network.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/sign-out.imageset/Contents.json b/Linphone/Assets.xcassets/sign-out.imageset/Contents.json new file mode 100644 index 000000000..19f1bacac --- /dev/null +++ b/Linphone/Assets.xcassets/sign-out.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "sign-out.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/sign-out.imageset/sign-out.svg b/Linphone/Assets.xcassets/sign-out.imageset/sign-out.svg new file mode 100644 index 000000000..ffd423eec --- /dev/null +++ b/Linphone/Assets.xcassets/sign-out.imageset/sign-out.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/slideshow.imageset/Contents.json b/Linphone/Assets.xcassets/slideshow.imageset/Contents.json new file mode 100644 index 000000000..97341936c --- /dev/null +++ b/Linphone/Assets.xcassets/slideshow.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "slideshow.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/slideshow.imageset/slideshow.svg b/Linphone/Assets.xcassets/slideshow.imageset/slideshow.svg new file mode 100644 index 000000000..d52a4aeaa --- /dev/null +++ b/Linphone/Assets.xcassets/slideshow.imageset/slideshow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/smiley.imageset/Contents.json b/Linphone/Assets.xcassets/smiley.imageset/Contents.json new file mode 100644 index 000000000..a7632c4ec --- /dev/null +++ b/Linphone/Assets.xcassets/smiley.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "smiley.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/smiley.imageset/smiley.svg b/Linphone/Assets.xcassets/smiley.imageset/smiley.svg new file mode 100644 index 000000000..cc0711829 --- /dev/null +++ b/Linphone/Assets.xcassets/smiley.imageset/smiley.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/conversation.imageset/Contents.json b/Linphone/Assets.xcassets/speaker-high.imageset/Contents.json similarity index 87% rename from Linphone/Assets.xcassets/conversation.imageset/Contents.json rename to Linphone/Assets.xcassets/speaker-high.imageset/Contents.json index 949fb1205..d1d2b5aba 100644 --- a/Linphone/Assets.xcassets/conversation.imageset/Contents.json +++ b/Linphone/Assets.xcassets/speaker-high.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "conversation.svg", + "filename" : "speaker-high.svg", "idiom" : "universal", "scale" : "1x" }, diff --git a/Linphone/Assets.xcassets/speaker-high.imageset/speaker-high.svg b/Linphone/Assets.xcassets/speaker-high.imageset/speaker-high.svg new file mode 100644 index 000000000..1633bdcc0 --- /dev/null +++ b/Linphone/Assets.xcassets/speaker-high.imageset/speaker-high.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/speaker-slash.imageset/Contents.json b/Linphone/Assets.xcassets/speaker-slash.imageset/Contents.json new file mode 100644 index 000000000..a924518d6 --- /dev/null +++ b/Linphone/Assets.xcassets/speaker-slash.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "speaker-slash.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/speaker-slash.imageset/speaker-slash.svg b/Linphone/Assets.xcassets/speaker-slash.imageset/speaker-slash.svg new file mode 100644 index 000000000..17f3c6a80 --- /dev/null +++ b/Linphone/Assets.xcassets/speaker-slash.imageset/speaker-slash.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/success.imageset/Contents.json b/Linphone/Assets.xcassets/success.imageset/Contents.json deleted file mode 100644 index a4aa98205..000000000 --- a/Linphone/Assets.xcassets/success.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "success.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Linphone/Assets.xcassets/success.imageset/success.svg b/Linphone/Assets.xcassets/success.imageset/success.svg deleted file mode 100644 index 633f0687c..000000000 --- a/Linphone/Assets.xcassets/success.imageset/success.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Linphone/Assets.xcassets/trash-simple.imageset/Contents.json b/Linphone/Assets.xcassets/trash-simple.imageset/Contents.json new file mode 100644 index 000000000..3c4c29331 --- /dev/null +++ b/Linphone/Assets.xcassets/trash-simple.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "trash-simple.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/trash-simple.imageset/trash-simple.svg b/Linphone/Assets.xcassets/trash-simple.imageset/trash-simple.svg new file mode 100644 index 000000000..0c2db4850 --- /dev/null +++ b/Linphone/Assets.xcassets/trash-simple.imageset/trash-simple.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/trusted.imageset/Contents.json b/Linphone/Assets.xcassets/trusted.imageset/Contents.json new file mode 100644 index 000000000..658577d02 --- /dev/null +++ b/Linphone/Assets.xcassets/trusted.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "trusted.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/trusted.imageset/trusted.svg b/Linphone/Assets.xcassets/trusted.imageset/trusted.svg new file mode 100644 index 000000000..f39d5a034 --- /dev/null +++ b/Linphone/Assets.xcassets/trusted.imageset/trusted.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Linphone/Assets.xcassets/user-circle-gear.imageset/Contents.json b/Linphone/Assets.xcassets/user-circle-gear.imageset/Contents.json new file mode 100644 index 000000000..b6ccf2c11 --- /dev/null +++ b/Linphone/Assets.xcassets/user-circle-gear.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "user-circle-gear.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/user-circle-gear.imageset/user-circle-gear.svg b/Linphone/Assets.xcassets/user-circle-gear.imageset/user-circle-gear.svg new file mode 100644 index 000000000..c406aac63 --- /dev/null +++ b/Linphone/Assets.xcassets/user-circle-gear.imageset/user-circle-gear.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/user-circle.imageset/Contents.json b/Linphone/Assets.xcassets/user-circle.imageset/Contents.json new file mode 100644 index 000000000..6a3349d4a --- /dev/null +++ b/Linphone/Assets.xcassets/user-circle.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "user-circle.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/user-circle.imageset/user-circle.svg b/Linphone/Assets.xcassets/user-circle.imageset/user-circle.svg new file mode 100644 index 000000000..761ce7d97 --- /dev/null +++ b/Linphone/Assets.xcassets/user-circle.imageset/user-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/user-plus.imageset/Contents.json b/Linphone/Assets.xcassets/user-plus.imageset/Contents.json new file mode 100644 index 000000000..bd1b1d0c2 --- /dev/null +++ b/Linphone/Assets.xcassets/user-plus.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "user-plus.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/user-plus.imageset/user-plus.svg b/Linphone/Assets.xcassets/user-plus.imageset/user-plus.svg new file mode 100644 index 000000000..9602ea863 --- /dev/null +++ b/Linphone/Assets.xcassets/user-plus.imageset/user-plus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/user-square.imageset/Contents.json b/Linphone/Assets.xcassets/user-square.imageset/Contents.json new file mode 100644 index 000000000..bee096e14 --- /dev/null +++ b/Linphone/Assets.xcassets/user-square.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "user-square.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/user-square.imageset/user-square.svg b/Linphone/Assets.xcassets/user-square.imageset/user-square.svg new file mode 100644 index 000000000..71c8534fd --- /dev/null +++ b/Linphone/Assets.xcassets/user-square.imageset/user-square.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/users-three.imageset/Contents.json b/Linphone/Assets.xcassets/users-three.imageset/Contents.json new file mode 100644 index 000000000..e8bec92c5 --- /dev/null +++ b/Linphone/Assets.xcassets/users-three.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "users-three.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/users-three.imageset/users-three.svg b/Linphone/Assets.xcassets/users-three.imageset/users-three.svg new file mode 100644 index 000000000..ba001446a --- /dev/null +++ b/Linphone/Assets.xcassets/users-three.imageset/users-three.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/users.imageset/Contents.json b/Linphone/Assets.xcassets/users.imageset/Contents.json new file mode 100644 index 000000000..8e987b946 --- /dev/null +++ b/Linphone/Assets.xcassets/users.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "users.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/users.imageset/users.svg b/Linphone/Assets.xcassets/users.imageset/users.svg new file mode 100644 index 000000000..353aca80f --- /dev/null +++ b/Linphone/Assets.xcassets/users.imageset/users.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/video-call.imageset/Contents.json b/Linphone/Assets.xcassets/video-call.imageset/Contents.json deleted file mode 100644 index 0617b9467..000000000 --- a/Linphone/Assets.xcassets/video-call.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "VideoCall.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Linphone/Assets.xcassets/video-call.imageset/VideoCall.svg b/Linphone/Assets.xcassets/video-call.imageset/VideoCall.svg deleted file mode 100644 index 5bfd91cd2..000000000 --- a/Linphone/Assets.xcassets/video-call.imageset/VideoCall.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Linphone/Assets.xcassets/video-camera-slash.imageset/Contents.json b/Linphone/Assets.xcassets/video-camera-slash.imageset/Contents.json new file mode 100644 index 000000000..6b8eb58cb --- /dev/null +++ b/Linphone/Assets.xcassets/video-camera-slash.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "video-camera-slash.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/video-camera-slash.imageset/video-camera-slash.svg b/Linphone/Assets.xcassets/video-camera-slash.imageset/video-camera-slash.svg new file mode 100644 index 000000000..942e907f3 --- /dev/null +++ b/Linphone/Assets.xcassets/video-camera-slash.imageset/video-camera-slash.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/video-camera.imageset/video-camera.svg b/Linphone/Assets.xcassets/video-camera.imageset/video-camera.svg index 1f42d14cc..0383a7c7b 100644 --- a/Linphone/Assets.xcassets/video-camera.imageset/video-camera.svg +++ b/Linphone/Assets.xcassets/video-camera.imageset/video-camera.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/warning-circle.imageset/Contents.json b/Linphone/Assets.xcassets/warning-circle.imageset/Contents.json new file mode 100644 index 000000000..5338e468d --- /dev/null +++ b/Linphone/Assets.xcassets/warning-circle.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "warning-circle.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/warning-circle.imageset/warning-circle.svg b/Linphone/Assets.xcassets/warning-circle.imageset/warning-circle.svg new file mode 100644 index 000000000..a04e6ff79 --- /dev/null +++ b/Linphone/Assets.xcassets/warning-circle.imageset/warning-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/wifi-high.imageset/Contents.json b/Linphone/Assets.xcassets/wifi-high.imageset/Contents.json new file mode 100644 index 000000000..807290f00 --- /dev/null +++ b/Linphone/Assets.xcassets/wifi-high.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "wifi-high.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/wifi-high.imageset/wifi-high.svg b/Linphone/Assets.xcassets/wifi-high.imageset/wifi-high.svg new file mode 100644 index 000000000..200030e09 --- /dev/null +++ b/Linphone/Assets.xcassets/wifi-high.imageset/wifi-high.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/wifi-low.imageset/Contents.json b/Linphone/Assets.xcassets/wifi-low.imageset/Contents.json new file mode 100644 index 000000000..99cd6f07b --- /dev/null +++ b/Linphone/Assets.xcassets/wifi-low.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "wifi-low.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/wifi-low.imageset/wifi-low.svg b/Linphone/Assets.xcassets/wifi-low.imageset/wifi-low.svg new file mode 100644 index 000000000..d8b0173bc --- /dev/null +++ b/Linphone/Assets.xcassets/wifi-low.imageset/wifi-low.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/wrench.imageset/Contents.json b/Linphone/Assets.xcassets/wrench.imageset/Contents.json new file mode 100644 index 000000000..67601ecd0 --- /dev/null +++ b/Linphone/Assets.xcassets/wrench.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "wrench.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/wrench.imageset/wrench.svg b/Linphone/Assets.xcassets/wrench.imageset/wrench.svg new file mode 100644 index 000000000..71b09f566 --- /dev/null +++ b/Linphone/Assets.xcassets/wrench.imageset/wrench.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Assets.xcassets/x-circle.imageset/Contents.json b/Linphone/Assets.xcassets/x-circle.imageset/Contents.json new file mode 100644 index 000000000..b5bc90bda --- /dev/null +++ b/Linphone/Assets.xcassets/x-circle.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "x-circle.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/x-circle.imageset/x-circle.svg b/Linphone/Assets.xcassets/x-circle.imageset/x-circle.svg new file mode 100644 index 000000000..3de6a876d --- /dev/null +++ b/Linphone/Assets.xcassets/x-circle.imageset/x-circle.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/Assets.xcassets/x.imageset/Contents.json b/Linphone/Assets.xcassets/x.imageset/Contents.json new file mode 100644 index 000000000..74ec74c05 --- /dev/null +++ b/Linphone/Assets.xcassets/x.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "x.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/x.imageset/x.svg b/Linphone/Assets.xcassets/x.imageset/x.svg new file mode 100644 index 000000000..52756cbd9 --- /dev/null +++ b/Linphone/Assets.xcassets/x.imageset/x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/Contacts/ContactsManager.swift b/Linphone/Contacts/ContactsManager.swift new file mode 100644 index 000000000..770c4a72a --- /dev/null +++ b/Linphone/Contacts/ContactsManager.swift @@ -0,0 +1,244 @@ +/* + * Copyright (c) 2010-2023 Belledonne Communications SARL. + * + * This file is part of Linphone + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import linphonesw +import Contacts +import SwiftUI + +final class ContactsManager: ObservableObject { + + static let shared = ContactsManager() + + private var coreContext = CoreContext.shared + private var magicSearch = MagicSearchSingleton.shared + + private let nativeAddressBookFriendList = "Native address-book" + let linphoneAddressBookFirendList = "Linphone address-book" + + @Published var friendList: FriendList? + + private init() { + fetchContacts() + } + + func fetchContacts() { + coreContext.doOnCoreQueue { core in + if core.globalState == GlobalState.Shutdown || core.globalState == GlobalState.Off { + print("$TAG Core is being stopped or already destroyed, abort") + } else { + print("$TAG ${friends.size} friends created") + + self.friendList = core.getFriendListByName(name: self.nativeAddressBookFriendList) + if self.friendList == nil { + do { + self.friendList = try core.createFriendList() + } catch let error { + print("Failed to enumerate contact", error) + } + } + + if self.friendList!.displayName == nil || self.friendList!.displayName!.isEmpty { + print( + "$TAG Friend list [$nativeAddressBookFriendList] didn't exist yet, let's create it" + ) + + self.friendList!.databaseStorageEnabled = false // We don't want to store local address-book in DB + + self.friendList!.displayName = self.nativeAddressBookFriendList + core.addFriendList(list: self.friendList!) + } else { + print( + "$TAG Friend list [$LINPHONE_ADDRESS_BOOK_FRIEND_LIST] found, removing existing friends if any" + ) + self.friendList!.friends.forEach { friend in + _ = self.friendList!.removeFriend(linphoneFriend: friend) + } + } + } + + let store = CNContactStore() + store.requestAccess(for: .contacts) { (granted, error) in + if let error = error { + print("failed to request access", error) + return + } + if granted { + let keys = [CNContactEmailAddressesKey, CNContactPhoneNumbersKey, + CNContactFamilyNameKey, CNContactGivenNameKey, CNContactNicknameKey, + CNContactPostalAddressesKey, CNContactIdentifierKey, + CNInstantMessageAddressUsernameKey, CNContactInstantMessageAddressesKey, + CNContactImageDataKey, CNContactThumbnailImageDataKey, CNContactOrganizationNameKey] + let request = CNContactFetchRequest(keysToFetch: keys as [CNKeyDescriptor]) + do { + try store.enumerateContacts(with: request, usingBlock: { (contact, _) in + + DispatchQueue.main.sync { + let newContact = Contact( + firstName: contact.givenName, + lastName: contact.familyName, + organizationName: contact.organizationName, + displayName: contact.nickname, + sipAddresses: contact.instantMessageAddresses.map { $0.value.service == "SIP" ? $0.value.username : "" }, + phoneNumbers: contact.phoneNumbers.map { PhoneNumber(numLabel: $0.label ?? "", num: $0.value.stringValue)}, + imageData: "" + ) + + self.saveImage( + image: + UIImage(data: contact.thumbnailImageData ?? Data()) + ?? self.textToImage( + firstName: contact.givenName.isEmpty + && contact.familyName.isEmpty + && contact.phoneNumbers.first?.value.stringValue != nil + ? contact.phoneNumbers.first!.value.stringValue + : contact.givenName, lastName: contact.familyName), + name: contact.givenName + contact.familyName + String(Int.random(in: 1...1000)), + contact: newContact) + } + }) + + } catch let error { + print("Failed to enumerate contact", error) + } + + } else { + print("access denied") + } + } + self.magicSearch.searchForContacts(sourceFlags: MagicSearch.Source.Friends.rawValue | MagicSearch.Source.LdapServers.rawValue) + } + } + + func textToImage(firstName: String, lastName: String) -> UIImage { + let lblNameInitialize = UILabel() + lblNameInitialize.frame.size = CGSize(width: 100.0, height: 100.0) + lblNameInitialize.font = UIFont(name: "NotoSans-ExtraBold", size: 40) + lblNameInitialize.textColor = UIColor(Color.grayMain2c600) + + var textToDisplay = "" + if firstName.first != nil { + textToDisplay += String(firstName.first!) + } + if lastName.first != nil { + textToDisplay += String(lastName.first!) + } + + lblNameInitialize.text = textToDisplay.uppercased() + lblNameInitialize.textAlignment = .center + lblNameInitialize.backgroundColor = UIColor(Color.grayMain2c200) + lblNameInitialize.layer.cornerRadius = 10.0 + + var IBImgViewUserProfile = UIImage() + UIGraphicsBeginImageContext(lblNameInitialize.frame.size) + lblNameInitialize.layer.render(in: UIGraphicsGetCurrentContext()!) + IBImgViewUserProfile = UIGraphicsGetImageFromCurrentImageContext()! + UIGraphicsEndImageContext() + + return IBImgViewUserProfile + } + + func saveImage(image: UIImage, name: String, contact: Contact) { + guard let data = image.jpegData(compressionQuality: 1) ?? image.pngData() else { + return + } + + awaitDataWrite(data: data, name: name) { _, result in + + self.coreContext.doOnCoreQueue() { core in + do { + var friend = try core.createFriend() + + friend.edit() + try friend.setName(newValue: contact.firstName + " " + contact.lastName) + friend.organization = contact.organizationName + + var friendAddresses: [Address] = [] + contact.sipAddresses.forEach { sipAddress in + let address = core.interpretUrl(url: sipAddress, applyInternationalPrefix: true) + + if address != nil && ((friendAddresses.firstIndex(where: {$0.asString() == address?.asString()})) == nil) { + friend.addAddress(address: address!) + friendAddresses.append(address!) + } + } + + var friendPhoneNumbers: [PhoneNumber] = [] + contact.phoneNumbers.forEach { phone in + do { + if (friendPhoneNumbers.firstIndex(where: {$0.numLabel == phone.numLabel})) == nil { + let labelDrop = String(phone.numLabel.dropFirst(4).dropLast(4)) + let phoneNumber = try Factory.Instance.createFriendPhoneNumber(phoneNumber: phone.num, label: labelDrop) + friend.addPhoneNumberWithLabel(phoneNumber: phoneNumber) + friendPhoneNumbers.append(phone) + } + } catch let error { + print("Failed to enumerate contact", error) + } + } + + let contactImage = result.dropFirst(8) + friend.photo = "file:/" + contactImage + + friend.organization = contact.organizationName + + friend.done() + + DispatchQueue.main.async { + _ = self.friendList!.addLocalFriend(linphoneFriend: friend) + + self.friendList!.updateSubscriptions() + } + } catch let error { + print("Failed to enumerate contact", error) + } + + } + } + } + + func awaitDataWrite(data: Data, name: String, completion: @escaping ((), String) -> Void) { + let directory = FileManager.default.temporaryDirectory + + DispatchQueue.main.async { + do { + let decodedData: () = try data.write(to: directory.appendingPathComponent(name + ".png")) + completion(decodedData, directory.appendingPathComponent(name + ".png").absoluteString) // <--- here, return the results + } catch { + print("Error: ", error) // need to deal with errors + completion((), "") // <--- here, should return the error + } + } + } +} + +struct PhoneNumber { + var numLabel: String + var num: String +} + +struct Contact: Identifiable { + var id = UUID() + var firstName: String + var lastName: String + var organizationName: String + var displayName: String + var sipAddresses: [String] = [] + var phoneNumbers: [PhoneNumber] = [] + var imageData: String +} diff --git a/Linphone/Core/CoreContext.swift b/Linphone/Core/CoreContext.swift index f20316b7f..a68b25127 100644 --- a/Linphone/Core/CoreContext.swift +++ b/Linphone/Core/CoreContext.swift @@ -17,62 +17,104 @@ * along with this program. If not, see . */ +// swiftlint:disable large_tuple import linphonesw +import Combine final class CoreContext: ObservableObject { static let shared = CoreContext() - var mCore: Core! - var mRegistrationDelegate: CoreDelegate! - var mConfigurationDelegate: CoreDelegate! - var coreVersion: String = Core.getVersion @Published var loggedIn: Bool = false @Published var loggingInProgress: Bool = false @Published var toastMessage: String = "" + @Published var defaultAccount: Account? + + private var mCore: Core! + private var mIteratePublisher: AnyCancellable? private init() {} - func initialiseCore() async throws { + func doOnCoreQueue(synchronous : Bool = false, lambda: @escaping (Core) -> Void) { + if synchronous { + coreQueue.sync { + lambda(self.mCore) + } + } else { + coreQueue.async { + lambda(self.mCore) + } + } + } + + func initialiseCore() throws { LoggingService.Instance.logLevel = LogLevel.Debug - let factory = Factory.Instance - let configDir = factory.getConfigDir(context: nil) - try? mCore = Factory.Instance.createCore(configPath: "\(configDir)/MyConfig", factoryConfigPath: "", systemContext: nil) - try? mCore.start() - - // Create a Core listener to listen for the callback we need - // In this case, we want to know about the account registration status - - mRegistrationDelegate = - CoreDelegateStub( - onConfiguringStatus: {(_: Core, state: Config.ConfiguringState, message: String) in - NSLog("New configuration state is \(state) = \(message)\n") - if state == .Successful { + coreQueue.async { + let configDir = Factory.Instance.getConfigDir(context: nil) + try? self.mCore = Factory.Instance.createCore(configPath: "\(configDir)/MyConfig", factoryConfigPath: "", systemContext: nil) + self.mCore.autoIterateEnabled = false + self.mCore.friendsDatabasePath = "\(configDir)/friends.db" + + self.mCore.publisher?.onGlobalStateChanged?.postOnMainQueue { (cbVal: (core: Core, state: GlobalState, message: String)) in + if cbVal.state == GlobalState.On { + self.defaultAccount = self.mCore.defaultAccount + } else if cbVal.state == GlobalState.Off { + self.defaultAccount = nil + } + } + try? self.mCore.start() + + // Create a Core listener to listen for the callback we need + // In this case, we want to know about the account registration status + self.mCore.publisher?.onConfiguringStatus?.postOnMainQueue { (cbVal: (core: Core, status: Config.ConfiguringState, message: String)) in + NSLog("New configuration state is \(cbVal.status) = \(cbVal.message)\n") + if cbVal.status == Config.ConfiguringState.Successful { self.toastMessage = "Successful" } else { self.toastMessage = "Failed" } - }, + } - onAccountRegistrationStateChanged: {(_: Core, account: Account, state: RegistrationState, message: String) in + 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 \(state) for user id \( String(describing: account.params?.identityAddress?.asString())) = \(message)\n") - if state == .Ok { + NSLog("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 self.loggedIn = true - } else if state == .Progress { + } else if cbVal.state == .Progress { self.loggingInProgress = true } else { self.toastMessage = "Registration failed" self.loggingInProgress = false self.loggedIn = false } + }.postOnCoreQueue { (cbVal: (core: Core, account: Account, state: RegistrationState, message: String)) in + // If registration failed, remove account from core + if cbVal.state != .Ok && cbVal.state != .Progress { + let params = cbVal.account.params + let clonedParams = params?.clone() + clonedParams?.registerEnabled = false + cbVal.account.params = clonedParams + + cbVal.core.removeAccount(account: cbVal.account) + cbVal.core.clearAccounts() + cbVal.core.clearAllAuthInfo() + } } - ) - - mCore.addDelegate(delegate: mRegistrationDelegate) + + self.mIteratePublisher = Timer.publish(every: 0.02, on: .main, in: .common) + .autoconnect() + .receive(on: coreQueue) + .sink { _ in + self.mCore.iterate() + } + + } } } + +// swiftlint:enable large_tuple diff --git a/Linphone/LinphoneApp.swift b/Linphone/LinphoneApp.swift index 3dda9cf64..17257a99f 100644 --- a/Linphone/LinphoneApp.swift +++ b/Linphone/LinphoneApp.swift @@ -23,13 +23,22 @@ import SwiftUI struct LinphoneApp: App { @ObservedObject private var coreContext = CoreContext.shared + @ObservedObject private var sharedMainViewModel = SharedMainViewModel() + @State private var isActive = false var body: some Scene { WindowGroup { if isActive { - ContentView(sharedMainViewModel: SharedMainViewModel(), contactViewModel: ContactViewModel(), historyViewModel: HistoryViewModel()) - .toast(isShowing: $coreContext.toastMessage) + if !sharedMainViewModel.welcomeViewDisplayed { + WelcomeView(sharedMainViewModel: sharedMainViewModel) + } else if coreContext.defaultAccount == nil || sharedMainViewModel.displayProfileMode { + AssistantView(sharedMainViewModel: sharedMainViewModel) + .toast(isShowing: $coreContext.toastMessage) + } else if coreContext.defaultAccount != nil { + ContentView(contactViewModel: ContactViewModel(), historyViewModel: HistoryViewModel()) + .toast(isShowing: $coreContext.toastMessage) + } } else { SplashScreen(isActive: $isActive) } diff --git a/Linphone/Localizable.xcstrings b/Linphone/Localizable.xcstrings index 8bd88f0a8..79915ed4f 100644 --- a/Linphone/Localizable.xcstrings +++ b/Linphone/Localizable.xcstrings @@ -27,6 +27,9 @@ }, "**Camera** : Pour capturer votre vidéo lors des appels vidéo et conférence." : { + }, + "**Company :** %@" : { + }, "**Contacts** : Pour vous afficher vos contacts et retrouver qui utilise Linphone." : { @@ -36,9 +39,6 @@ }, "**Notifications** : Pour vous informé quand vous recevez un message ou un appel." : { - }, - "%lld" : { - }, "%lld Book (Example)" : { "extractionState" : "manual", @@ -95,6 +95,15 @@ }, "Accept all" : { + }, + "Add to favourites" : { + + }, + "All contacts" : { + + }, + "Appel" : { + }, "assistant_account_login" : { "extractionState" : "manual", @@ -112,9 +121,21 @@ } } } + }, + "Block" : { + + }, + "Block the address" : { + + }, + "Block the number" : { + }, "Calls" : { + }, + "Cancel" : { + }, "Ce mode vous permet d’être interopérable avec d’autres services SIP.\nVos communications seront chiffrées de point à point. " : { @@ -133,6 +154,12 @@ }, "Continue" : { + }, + "Copy address" : { + + }, + "Copy number" : { + }, "D'accord" : { @@ -142,6 +169,15 @@ }, "Default mode" : { + }, + "Delete" : { + + }, + "Delete %@?" : { + + }, + "Delete this contact" : { + }, "Demande d’autorisations" : { @@ -154,12 +190,24 @@ }, "Domain" : { + }, + "Edit" : { + }, "En continuant, vous acceptez ces conditions, " : { + }, + "En ligne" : { + }, "Error" : { + }, + "Error Name" : { + + }, + "Favourites" : { + }, "History Contact fragment" : { @@ -169,6 +217,9 @@ }, "I understand" : { + }, + "Information" : { + }, "Interoperable" : { @@ -181,6 +232,9 @@ }, "Invalide URI" : { + }, + "Invitation" : { + }, "Linphone" : { @@ -190,6 +244,12 @@ }, "Logout" : { + }, + "Message" : { + + }, + "Mute" : { + }, "My Profile" : { @@ -205,12 +265,18 @@ }, "Not account yet?" : { + }, + "Ok" : { + }, "Open source" : { }, "Opération en cours..." : { + }, + "Other actions" : { + }, "password" : { "extractionState" : "manual", @@ -231,6 +297,9 @@ }, "Personnalize your profil mode" : { + }, + "Phone (%@) :" : { + }, "Plus tard" : { @@ -246,12 +315,27 @@ }, "Register" : { + }, + "Remove to favourites" : { + }, "Scan QR code" : { }, "Sécurisé" : { + }, + "See all" : { + + }, + "See Linphone contact" : { + + }, + "Share" : { + + }, + "SIP address :" : { + }, "sip.linphone.org" : { @@ -267,6 +351,9 @@ }, "The user name or password is incorrects" : { + }, + "This contact will be deleted definitively." : { + }, "TLS" : { @@ -308,6 +395,9 @@ } } } + }, + "Video Call" : { + }, "Vos communications sont en sécurité grâce aux **Chiffrement de bout en bout**." : { diff --git a/Linphone/SplashScreen.swift b/Linphone/SplashScreen.swift index 64d59e258..350fc93ad 100644 --- a/Linphone/SplashScreen.swift +++ b/Linphone/SplashScreen.swift @@ -40,7 +40,7 @@ struct SplashScreen: View { .ignoresSafeArea(.all) .onAppear { Task { - try await coreContext.initialiseCore() + try coreContext.initialiseCore() withAnimation { self.isActive = true } diff --git a/Linphone/UI/Assistant/Fragments/LoginFragment.swift b/Linphone/UI/Assistant/Fragments/LoginFragment.swift index 0d5cac6b9..61677f584 100644 --- a/Linphone/UI/Assistant/Fragments/LoginFragment.swift +++ b/Linphone/UI/Assistant/Fragments/LoginFragment.swift @@ -117,6 +117,7 @@ struct LoginFragment: View { .padding(.bottom) Button(action: { + sharedMainViewModel.changeDisplayProfileMode() self.accountLoginViewModel.login() }, label: { Text(coreContext.loggedIn ? "Log out" : "assistant_account_login") @@ -280,23 +281,11 @@ struct LoginFragment: View { } } } - .onAppear { - sharedMainViewModel.changeDisplayProfileMode() - } if coreContext.loggingInProgress { PopupLoadingView(sharedMainViewModel: sharedMainViewModel) .background(.black.opacity(0.65)) } - - if !coreContext.loggingInProgress && !coreContext.loggedIn { - ZStack { - - }.onAppear { - self.accountLoginViewModel.unregister() - self.accountLoginViewModel.delete() - } - } } } .navigationViewStyle(StackNavigationViewStyle()) diff --git a/Linphone/UI/Assistant/Fragments/PermissionsFragment.swift b/Linphone/UI/Assistant/Fragments/PermissionsFragment.swift index cbb56aa76..efb732cd4 100644 --- a/Linphone/UI/Assistant/Fragments/PermissionsFragment.swift +++ b/Linphone/UI/Assistant/Fragments/PermissionsFragment.swift @@ -79,11 +79,6 @@ struct PermissionsFragment: View { .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 20, height: 20, alignment: .leading) - .onTapGesture { - withAnimation { - dismiss() - } - } } .padding(16) .background(Color.grayMain2c200) @@ -102,11 +97,6 @@ struct PermissionsFragment: View { .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 20, height: 20, alignment: .leading) - .onTapGesture { - withAnimation { - dismiss() - } - } } .padding(16) .background(Color.grayMain2c200) @@ -125,11 +115,6 @@ struct PermissionsFragment: View { .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 20, height: 20, alignment: .leading) - .onTapGesture { - withAnimation { - dismiss() - } - } } .padding(16) .background(Color.grayMain2c200) @@ -148,11 +133,6 @@ struct PermissionsFragment: View { .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 20, height: 20, alignment: .leading) - .onTapGesture { - withAnimation { - dismiss() - } - } } .padding(16) .background(Color.grayMain2c200) @@ -192,6 +172,7 @@ struct PermissionsFragment: View { .padding(.horizontal) Button { + permissionManager.contactsRequestPermission() permissionManager.cameraRequestPermission() } label: { Text("D'accord") diff --git a/Linphone/UI/Assistant/Fragments/ThirdPartySipAccountWarningFragment.swift b/Linphone/UI/Assistant/Fragments/ThirdPartySipAccountWarningFragment.swift index 4ce290e27..3d85dcd02 100644 --- a/Linphone/UI/Assistant/Fragments/ThirdPartySipAccountWarningFragment.swift +++ b/Linphone/UI/Assistant/Fragments/ThirdPartySipAccountWarningFragment.swift @@ -72,16 +72,11 @@ struct ThirdPartySipAccountWarningFragment: View { HStack { Spacer() HStack(alignment: .center) { - Image("conversation") + Image("chat-teardrop-text-slash") .renderingMode(.template) .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 20, height: 20, alignment: .leading) - .onTapGesture { - withAnimation { - dismiss() - } - } } .padding(16) .background(Color.grayMain2c200) @@ -89,16 +84,11 @@ struct ThirdPartySipAccountWarningFragment: View { .padding(.horizontal) HStack(alignment: .center) { - Image("video-call") + Image("video-camera-slash") .renderingMode(.template) .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 20, height: 20, alignment: .leading) - .onTapGesture { - withAnimation { - dismiss() - } - } } .padding(16) .background(Color.grayMain2c200) diff --git a/Linphone/UI/Assistant/Viewmodel/AccountLoginViewModel.swift b/Linphone/UI/Assistant/Viewmodel/AccountLoginViewModel.swift index 6f778145a..d85b4233e 100644 --- a/Linphone/UI/Assistant/Viewmodel/AccountLoginViewModel.swift +++ b/Linphone/UI/Assistant/Viewmodel/AccountLoginViewModel.swift @@ -33,83 +33,95 @@ class AccountLoginViewModel: ObservableObject { init() {} func login() { - do { - // Get the transport protocol to use. - // TLS is strongly recommended - // Only use UDP if you don't have the choice - var transport: TransportType - if transportType == "TLS" { - transport = TransportType.Tls - } else if transportType == "TCP" { - transport = TransportType.Tcp - } else { transport = TransportType.Udp } - - // To configure a SIP account, we need an Account object and an AuthInfo object - // The first one is how to connect to the proxy server, the second one stores the credentials - - // The auth info can be created from the Factory as it's only a data class - // userID is set to null as it's the same as the username in our case - // ha1 is set to null as we are using the clear text password. Upon first register, the hash will be computed automatically. - // The realm will be determined automatically from the first register, as well as the algorithm - let authInfo = try Factory.Instance.createAuthInfo(username: username, userid: "", passwd: passwd, ha1: "", realm: "", domain: domain) - - // Account object replaces deprecated ProxyConfig object - // Account object is configured through an AccountParams object that we can obtain from the Core - - let accountParams = try coreContext.mCore!.createAccountParams() - - // A SIP account is identified by an identity address that we can construct from the username and domain - let identity = try Factory.Instance.createAddress(addr: String("sip:" + username + "@" + domain)) - try accountParams.setIdentityaddress(newValue: identity) - - // We also need to configure where the proxy server is located - let address = try Factory.Instance.createAddress(addr: String("sip:" + domain)) - - // We use the Address object to easily set the transport protocol - try address.setTransport(newValue: transport) - try accountParams.setServeraddress(newValue: address) - // And we ensure the account will start the registration process - accountParams.registerEnabled = true - - // Now that our AccountParams is configured, we can create the Account object - let account = try coreContext.mCore!.createAccount(params: accountParams) - - // Now let's add our objects to the Core - coreContext.mCore!.addAuthInfo(info: authInfo) - try coreContext.mCore!.addAccount(account: account) - - // Also set the newly added account as default - coreContext.mCore!.defaultAccount = account - - } catch { NSLog(error.localizedDescription) } + coreContext.doOnCoreQueue { core in + do { + // Get the transport protocol to use. + // TLS is strongly recommended + // Only use UDP if you don't have the choice + var transport: TransportType + if self.transportType == "TLS" { + transport = TransportType.Tls + } else if self.transportType == "TCP" { + transport = TransportType.Tcp + } else { transport = TransportType.Udp } + + // To configure a SIP account, we need an Account object and an AuthInfo object + // The first one is how to connect to the proxy server, the second one stores the credentials + + // The auth info can be created from the Factory as it's only a data class + // userID is set to null as it's the same as the username in our case + // ha1 is set to null as we are using the clear text password. Upon first register, the hash will be computed automatically. + // The realm will be determined automatically from the first register, as well as the algorithm + let authInfo = try Factory.Instance.createAuthInfo(username: self.username, userid: "", passwd: self.passwd, ha1: "", realm: "", domain: self.domain) + + // Account object replaces deprecated ProxyConfig object + // Account object is configured through an AccountParams object that we can obtain from the Core + + let accountParams = try core.createAccountParams() + + // A SIP account is identified by an identity address that we can construct from the username and domain + let identity = try Factory.Instance.createAddress(addr: String("sip:" + self.username + "@" + self.domain)) + try accountParams.setIdentityaddress(newValue: identity) + + // We also need to configure where the proxy server is located + let address = try Factory.Instance.createAddress(addr: String("sip:" + self.domain)) + + // We use the Address object to easily set the transport protocol + try address.setTransport(newValue: transport) + try accountParams.setServeraddress(newValue: address) + // And we ensure the account will start the registration process + accountParams.registerEnabled = true + + // Now that our AccountParams is configured, we can create the Account object + let account = try core.createAccount(params: accountParams) + + // Now let's add our objects to the Core + core.addAuthInfo(info: authInfo) + try core.addAccount(account: account) + + // Also set the newly added account as default + core.defaultAccount = account + DispatchQueue.main.async { + self.coreContext.defaultAccount = account + } + + } catch { NSLog(error.localizedDescription) } + } } func unregister() { - // Here we will disable the registration of our Account - if let account = coreContext.mCore!.defaultAccount { - - let params = account.params - // Returned params object is const, so to make changes we first need to clone it - let clonedParams = params?.clone() - - // Now let's make our changes - clonedParams?.registerEnabled = false - - // And apply them - account.params = clonedParams + coreContext.doOnCoreQueue { core in + // Here we will disable the registration of our Account + if let account = core.defaultAccount { + + let params = account.params + // Returned params object is const, so to make changes we first need to clone it + let clonedParams = params?.clone() + + // Now let's make our changes + clonedParams?.registerEnabled = false + + // And apply them + account.params = clonedParams + } } } func delete() { - // To completely remove an Account - if let account = coreContext.mCore!.defaultAccount { - coreContext.mCore!.removeAccount(account: account) - - // To remove all accounts use - coreContext.mCore!.clearAccounts() - - // Same for auth info - coreContext.mCore!.clearAllAuthInfo() + coreContext.doOnCoreQueue { core in + // To completely remove an Account + if let account = core.defaultAccount { + core.removeAccount(account: account) + DispatchQueue.main.async { + self.coreContext.defaultAccount = nil + } + + // To remove all accounts use + core.clearAccounts() + + // Same for auth info + core.clearAllAuthInfo() + } } } } diff --git a/Linphone/UI/Assistant/Viewmodel/QRScanner.swift b/Linphone/UI/Assistant/Viewmodel/QRScanner.swift index d5dd78159..5d546ef96 100644 --- a/Linphone/UI/Assistant/Viewmodel/QRScanner.swift +++ b/Linphone/UI/Assistant/Viewmodel/QRScanner.swift @@ -70,14 +70,11 @@ class Coordinator: NSObject, AVCaptureMetadataOutputObjectsDelegate { if let url = NSURL(string: result) { if UIApplication.shared.canOpenURL(url as URL) { lastResult = result - do { - try coreContext.mCore.setProvisioninguri(newValue: result) - coreContext.mCore.stop() - try coreContext.mCore.start() - } catch { - + coreContext.doOnCoreQueue { core in + try? core.setProvisioninguri(newValue: result) + core.stop() + try? core.start() } - } else { coreContext.toastMessage = "Invalide URI" } diff --git a/Linphone/UI/Main/Contacts/ContactsView.swift b/Linphone/UI/Main/Contacts/ContactsView.swift index cecad9f2a..4d00f8bdb 100644 --- a/Linphone/UI/Main/Contacts/ContactsView.swift +++ b/Linphone/UI/Main/Contacts/ContactsView.swift @@ -24,62 +24,18 @@ struct ContactsView: View { @ObservedObject var contactViewModel: ContactViewModel @ObservedObject var historyViewModel: HistoryViewModel - @State private var orientation = UIDevice.current.orientation - @State private var selectedIndex = 0 - - var objects: [Int] = [ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 - ] + @Binding var isShowDeletePopup: Bool var body: some View { NavigationView { ZStack(alignment: .bottomTrailing) { - VStack(spacing: 0) { - VStack { - List { - ForEach(objects, id: \.self) { index in - Button { - withAnimation { - contactViewModel.contactTitle = String(index) - } - } label: { - Text("\(index)") - .frame( maxWidth: .infinity, alignment: .leading) - .foregroundStyle(Color.orangeMain500) - } - .buttonStyle(.borderless) - .listRowSeparator(.hidden) - } - } - .listStyle(.plain) - .overlay( - VStack { - if objects.isEmpty { - Spacer() - Image("illus-belledonne1") - .resizable() - .scaledToFit() - .clipped() - .padding(.all) - Text("No contacts for the moment...") - .default_text_style_800(styleSize: 16) - Spacer() - Spacer() - } - } - .padding(.all) - ) - } - } - .onRotate { newOrientation in - orientation = newOrientation - } + + ContactsFragment(contactViewModel: contactViewModel, isShowDeletePopup: $isShowDeletePopup) Button { // Action } label: { - Image("contacts") + Image("user-plus") .padding() .background(.white) .clipShape(Circle()) @@ -94,5 +50,5 @@ struct ContactsView: View { } #Preview { - ContactsView(contactViewModel: ContactViewModel(), historyViewModel: HistoryViewModel()) + ContactsView(contactViewModel: ContactViewModel(), historyViewModel: HistoryViewModel(), isShowDeletePopup: .constant(false)) } diff --git a/Linphone/UI/Main/Contacts/Fragments/ContactFragment.swift b/Linphone/UI/Main/Contacts/Fragments/ContactFragment.swift index 9168b860e..042169629 100644 --- a/Linphone/UI/Main/Contacts/Fragments/ContactFragment.swift +++ b/Linphone/UI/Main/Contacts/Fragments/ContactFragment.swift @@ -23,55 +23,27 @@ struct ContactFragment: View { @ObservedObject var contactViewModel: ContactViewModel - @State private var orientation = UIDevice.current.orientation + @Binding var isShowDeletePopup: Bool - var body: some View { - VStack(alignment: .leading) { - - if !(orientation == .landscapeLeft || orientation == .landscapeRight || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height) { - HStack { - Image("caret-left") - .renderingMode(.template) - .resizable() - .foregroundStyle(Color.grayMain2c500) - .frame(width: 25, height: 25, alignment: .leading) - .padding(.top, 20) - .onTapGesture { - withAnimation { - contactViewModel.contactTitle = "" - } - } - - Spacer() + @State private var showingSheet = false + + var body: some View { + if #available(iOS 16.0, *) { + ContactInnerFragment(contactViewModel: contactViewModel, isShowDeletePopup: $isShowDeletePopup, showingSheet: $showingSheet) + .sheet(isPresented: $showingSheet) { + ContactListBottomSheet(contactViewModel: contactViewModel, showingSheet: $showingSheet) + .presentationDetents([.fraction(0.2)]) } - .padding(.leading) - } - - Spacer() - - Text(contactViewModel.contactTitle) - .frame(maxWidth: .infinity) - - List { - ForEach(1...40, id: \.self) { index in - Button { - contactViewModel.contactTitle = String(index) - } label: { - Text("\(index)") - .frame( maxWidth: .infinity, alignment: .leading) - } - .buttonStyle(.borderless) - } - } + } else { + ContactInnerFragment(contactViewModel: contactViewModel, isShowDeletePopup: $isShowDeletePopup, showingSheet: $showingSheet) + .halfSheet(showSheet: $showingSheet) { + ContactListBottomSheet(contactViewModel: contactViewModel, showingSheet: $showingSheet) + } onDismiss: {} } - .navigationBarHidden(true) - .onRotate { newOrientation in - orientation = newOrientation - } - - } + + } } #Preview { - ContactFragment(contactViewModel: ContactViewModel()) + ContactFragment(contactViewModel: ContactViewModel(), isShowDeletePopup: .constant(false)) } diff --git a/Linphone/UI/Main/Contacts/Fragments/ContactInnerFragment.swift b/Linphone/UI/Main/Contacts/Fragments/ContactInnerFragment.swift new file mode 100644 index 000000000..dc31e9c35 --- /dev/null +++ b/Linphone/UI/Main/Contacts/Fragments/ContactInnerFragment.swift @@ -0,0 +1,565 @@ +/* + * Copyright (c) 2010-2023 Belledonne Communications SARL. + * + * This file is part of linphone-iphone + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import SwiftUI + +struct ContactInnerFragment: View { + + @ObservedObject var contactViewModel: ContactViewModel + + @State private var orientation = UIDevice.current.orientation + + @State private var informationIsOpen = true + + @Binding var isShowDeletePopup: Bool + + @Binding var showingSheet: Bool + + var body: some View { + VStack(spacing: 1) { + Rectangle() + .foregroundColor(Color.orangeMain500) + .edgesIgnoringSafeArea(.top) + .frame(height: 0) + + HStack { + if !(orientation == .landscapeLeft + || orientation == .landscapeRight + || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height) { + Image("caret-left") + .renderingMode(.template) + .resizable() + .foregroundStyle(Color.orangeMain500) + .frame(width: 25, height: 25, alignment: .leading) + .padding(.top, 2) + .onTapGesture { + withAnimation { + contactViewModel.displayedFriend = nil + } + } + } + + Spacer() + + Image("pencil-simple") + .renderingMode(.template) + .resizable() + .foregroundStyle(Color.orangeMain500) + .frame(width: 25, height: 25, alignment: .leading) + .padding(.top, 2) + .onTapGesture { + withAnimation { + + } + } + } + .frame(maxWidth: .infinity) + .frame(height: 50) + .padding(.horizontal) + .padding(.bottom, 4) + .background(.white) + + ScrollView { + VStack(spacing: 0) { + VStack(spacing: 0) { + if contactViewModel.displayedFriend != nil + && contactViewModel.displayedFriend!.photo != nil + && !contactViewModel.displayedFriend!.photo!.isEmpty { + AsyncImage(url: URL(string: contactViewModel.displayedFriend!.photo!)) { image in + switch image { + case .empty: + ProgressView() + .frame(width: 100, height: 100) + case .success(let image): + image + .resizable() + .frame(width: 100, height: 100) + .clipShape(Circle()) + case .failure: + Image("profil-picture-default") + .resizable() + .frame(width: 100, height: 100) + .clipShape(Circle()) + @unknown default: + EmptyView() + } + } + } else if contactViewModel.displayedFriend != nil { + Image("profil-picture-default") + .resizable() + .frame(width: 100, height: 100) + .clipShape(Circle()) + } + if contactViewModel.displayedFriend != nil && contactViewModel.displayedFriend?.name != nil { + Text((contactViewModel.displayedFriend?.name)!) + .foregroundStyle(Color.grayMain2c700) + .multilineTextAlignment(.center) + .default_text_style(styleSize: 14) + .frame(maxWidth: .infinity) + .padding(.top, 10) + + Text("En ligne") + .foregroundStyle(Color.greenSuccess500) + .multilineTextAlignment(.center) + .default_text_style_300(styleSize: 12) + .frame(maxWidth: .infinity) + } + + } + .frame(minHeight: 150) + .frame(maxWidth: .infinity) + .padding(.top, 10) + .background(Color.gray100) + + HStack { + Spacer() + + Button(action: { + + }, label: { + VStack { + HStack(alignment: .center) { + Image("phone") + .renderingMode(.template) + .resizable() + .foregroundStyle(Color.grayMain2c600) + .frame(width: 25, height: 25) + .onTapGesture { + withAnimation { + + } + } + } + .padding(16) + .background(Color.grayMain2c200) + .cornerRadius(40) + + Text("Appel") + .default_text_style(styleSize: 14) + } + }) + + Spacer() + + Button(action: { + + }, label: { + VStack { + HStack(alignment: .center) { + Image("chat-teardrop-text") + .renderingMode(.template) + .resizable() + .foregroundStyle(Color.grayMain2c600) + .frame(width: 25, height: 25) + .onTapGesture { + withAnimation { + + } + } + } + .padding(16) + .background(Color.grayMain2c200) + .cornerRadius(40) + + Text("Message") + .default_text_style(styleSize: 14) + } + }) + + Spacer() + + Button(action: { + + }, label: { + VStack { + HStack(alignment: .center) { + Image("video-camera") + .renderingMode(.template) + .resizable() + .foregroundStyle(Color.grayMain2c600) + .frame(width: 25, height: 25) + .onTapGesture { + withAnimation { + + } + } + } + .padding(16) + .background(Color.grayMain2c200) + .cornerRadius(40) + + Text("Video Call") + .default_text_style(styleSize: 14) + } + }) + + Spacer() + } + .padding(.top, 20) + .frame(maxWidth: .infinity) + .background(Color.gray100) + + HStack(alignment: .center) { + Text("Information") + .default_text_style_800(styleSize: 16) + + Spacer() + + Image(informationIsOpen ? "caret-up" : "caret-down") + .renderingMode(.template) + .resizable() + .foregroundStyle(Color.grayMain2c600) + .frame(width: 25, height: 25, alignment: .leading) + } + .padding(.top, 30) + .padding(.bottom, 10) + .padding(.horizontal, 16) + .background(Color.gray100) + .onTapGesture { + withAnimation { + informationIsOpen.toggle() + } + } + + if informationIsOpen { + VStack(spacing: 0) { + if contactViewModel.displayedFriend != nil { + ForEach(0... + */ + +import SwiftUI +import UniformTypeIdentifiers + +struct ContactListBottomSheet: View { + + @ObservedObject var magicSearch = MagicSearchSingleton.shared + + @ObservedObject var contactViewModel: ContactViewModel + + @State private var orientation = UIDevice.current.orientation + + @Environment(\.dismiss) var dismiss + + @Binding var showingSheet: Bool + + var body: some View { + VStack(alignment: .leading) { + if orientation == .landscapeLeft + || orientation == .landscapeRight + || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height { + Spacer() + HStack { + Spacer() + Button("Close") { + if #available(iOS 16.0, *) { + showingSheet.toggle() + } else { + showingSheet.toggle() + dismiss() + } + } + } + .padding(.trailing) + } + + Spacer() + Button { + UIPasteboard.general.setValue( + contactViewModel.stringToCopy.prefix(4) == "sip:" + ? contactViewModel.stringToCopy.dropFirst(4) + : contactViewModel.stringToCopy, + forPasteboardType: UTType.plainText.identifier) + + if #available(iOS 16.0, *) { + showingSheet.toggle() + } else { + showingSheet.toggle() + dismiss() + } + } label: { + HStack { + Image("copy") + .renderingMode(.template) + .resizable() + .foregroundStyle(Color.grayMain2c500) + .frame(width: 25, height: 25, alignment: .leading) + Text(contactViewModel.stringToCopy.prefix(4) == "sip:" + ? "Copy address" : "Copy number") + .default_text_style(styleSize: 16) + Spacer() + } + .frame(maxHeight: .infinity) + } + .padding(.horizontal, 30) + .background(Color.gray100) + + VStack { + Divider() + } + .frame(maxWidth: .infinity) + + if contactViewModel.stringToCopy.prefix(4) != "sip:" { + Button { + if #available(iOS 16.0, *) { + showingSheet.toggle() + } else { + showingSheet.toggle() + dismiss() + } + } label: { + HStack { + Image("envelope-simple-open") + .renderingMode(.template) + .resizable() + .foregroundStyle(Color.grayMain2c500) + .frame(width: 25, height: 25, alignment: .leading) + Text("Invitation") + .default_text_style(styleSize: 16) + Spacer() + } + .frame(maxHeight: .infinity) + } + .padding(.horizontal, 30) + .background(Color.gray100) + + VStack { + Divider() + } + .frame(maxWidth: .infinity) + } + + Button { + if #available(iOS 16.0, *) { + showingSheet.toggle() + } else { + showingSheet.toggle() + dismiss() + } + } label: { + HStack { + Image("x-circle") + .renderingMode(.template) + .resizable() + .foregroundStyle(Color.grayMain2c500) + .frame(width: 25, height: 25, alignment: .leading) + Text(contactViewModel.stringToCopy.prefix(4) == "sip:" + ? "Block the address" : "Block the number") + .default_text_style(styleSize: 16) + Spacer() + } + .frame(maxHeight: .infinity) + } + .padding(.horizontal, 30) + .background(Color.gray100) + + } + .onRotate { newOrientation in + orientation = newOrientation + } + .background(Color.gray100) + .frame(maxWidth: .infinity) + } +} + +#Preview { + ContactListBottomSheet(contactViewModel: ContactViewModel(), showingSheet: .constant(false)) +} diff --git a/Linphone/UI/Main/Contacts/Fragments/ContactsFragment.swift b/Linphone/UI/Main/Contacts/Fragments/ContactsFragment.swift new file mode 100644 index 000000000..9196f23cc --- /dev/null +++ b/Linphone/UI/Main/Contacts/Fragments/ContactsFragment.swift @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2010-2023 Belledonne Communications SARL. + * + * This file is part of linphone-iphone + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import SwiftUI + +struct ContactsFragment: View { + + @ObservedObject var contactViewModel: ContactViewModel + + @Binding var isShowDeletePopup: Bool + + @State private var showingSheet = false + + var body: some View { + ZStack { + if #available(iOS 16.0, *) { + ContactsInnerFragment(contactViewModel: contactViewModel, showingSheet: $showingSheet) + .sheet(isPresented: $showingSheet) { + ContactsListBottomSheet(contactViewModel: contactViewModel, isShowDeletePopup: $isShowDeletePopup, showingSheet: $showingSheet) + .presentationDetents([.fraction(0.2)]) + } + } else { + ContactsInnerFragment(contactViewModel: contactViewModel, showingSheet: $showingSheet) + .halfSheet(showSheet: $showingSheet) { + ContactsListBottomSheet(contactViewModel: contactViewModel, isShowDeletePopup: $isShowDeletePopup, showingSheet: $showingSheet) + } onDismiss: {} + } + } + } +} + +#Preview { + ContactsFragment(contactViewModel: ContactViewModel(), isShowDeletePopup: .constant(false)) +} diff --git a/Linphone/UI/Main/Contacts/Fragments/ContactsInnerFragment.swift b/Linphone/UI/Main/Contacts/Fragments/ContactsInnerFragment.swift new file mode 100644 index 000000000..abfd51b4d --- /dev/null +++ b/Linphone/UI/Main/Contacts/Fragments/ContactsInnerFragment.swift @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2010-2023 Belledonne Communications SARL. + * + * This file is part of linphone-iphone + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import SwiftUI + +struct ContactsInnerFragment: View { + + @ObservedObject var magicSearch = MagicSearchSingleton.shared + @ObservedObject var contactViewModel: ContactViewModel + + @State private var isFavoriteOpen = true + + @Binding var showingSheet: Bool + + var body: some View { + VStack(alignment: .leading) { + if !magicSearch.lastSearch.filter({ $0.friend?.starred == true }).isEmpty { + HStack(alignment: .center) { + Text("Favourites") + .default_text_style_800(styleSize: 16) + + Spacer() + + Image(isFavoriteOpen ? "caret-up" : "caret-down") + .renderingMode(.template) + .resizable() + .foregroundStyle(Color.grayMain2c600) + .frame(width: 25, height: 25, alignment: .leading) + } + .padding(.top, 30) + .padding(.horizontal, 16) + .background(.white) + .onTapGesture { + withAnimation { + isFavoriteOpen.toggle() + } + } + + if isFavoriteOpen { + FavoriteContactsListFragment( + contactViewModel: contactViewModel, + favoriteContactsListViewModel: FavoriteContactsListViewModel(), + showingSheet: $showingSheet) + .zIndex(-1) + .transition(.move(edge: .top)) + } + + HStack(alignment: .center) { + Text("All contacts") + .default_text_style_800(styleSize: 16) + + Spacer() + } + .padding(.top, 10) + .padding(.horizontal, 16) + } + ContactsListFragment(contactViewModel: contactViewModel, contactsListViewModel: ContactsListViewModel(), showingSheet: $showingSheet) + } + .navigationBarHidden(true) + } +} + +#Preview { + ContactsInnerFragment(contactViewModel: ContactViewModel(), showingSheet: .constant(false)) +} diff --git a/Linphone/UI/Main/Contacts/Fragments/ContactsListBottomSheet.swift b/Linphone/UI/Main/Contacts/Fragments/ContactsListBottomSheet.swift new file mode 100644 index 000000000..a5d27c278 --- /dev/null +++ b/Linphone/UI/Main/Contacts/Fragments/ContactsListBottomSheet.swift @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2010-2023 Belledonne Communications SARL. + * + * This file is part of linphone-iphone + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import SwiftUI +import linphonesw + +struct ContactsListBottomSheet: View { + + @ObservedObject var magicSearch = MagicSearchSingleton.shared + + @ObservedObject var contactViewModel: ContactViewModel + + @State private var orientation = UIDevice.current.orientation + + @Environment(\.dismiss) var dismiss + + @Binding var isShowDeletePopup: Bool + + @Binding var showingSheet: Bool + + var body: some View { + VStack(alignment: .leading) { + if orientation == .landscapeLeft + || orientation == .landscapeRight + || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height { + Spacer() + HStack { + Spacer() + Button("Close") { + if #available(iOS 16.0, *) { + showingSheet.toggle() + } else { + showingSheet.toggle() + dismiss() + } + } + } + .padding(.trailing) + } + + Spacer() + Button { + if contactViewModel.selectedFriend != nil { + contactViewModel.selectedFriend!.starred.toggle() + } + self.magicSearch.searchForContacts(sourceFlags: MagicSearch.Source.Friends.rawValue | MagicSearch.Source.LdapServers.rawValue) + + if #available(iOS 16.0, *) { + showingSheet.toggle() + } else { + showingSheet.toggle() + dismiss() + } + } label: { + HStack { + Image(contactViewModel.selectedFriend != nil && contactViewModel.selectedFriend!.starred == true ? "heart-fill" : "heart") + .renderingMode(.template) + .resizable() + .foregroundStyle(Color.grayMain2c500) + .frame(width: 25, height: 25, alignment: .leading) + Text(contactViewModel.selectedFriend != nil && contactViewModel.selectedFriend!.starred == true + ? "Remove to favourites" + : "Add to favourites") + .default_text_style(styleSize: 16) + Spacer() + } + .frame(maxHeight: .infinity) + } + .padding(.horizontal, 30) + .background(Color.gray100) + + VStack { + Divider() + } + .frame(maxWidth: .infinity) + + Button { + if #available(iOS 16.0, *) { + showingSheet.toggle() + } else { + showingSheet.toggle() + dismiss() + } + } label: { + HStack { + Image("share-network") + .renderingMode(.template) + .resizable() + .foregroundStyle(Color.grayMain2c500) + .frame(width: 25, height: 25, alignment: .leading) + Text("Share") + .default_text_style(styleSize: 16) + Spacer() + } + .frame(maxHeight: .infinity) + } + .padding(.horizontal, 30) + .background(Color.gray100) + + VStack { + Divider() + } + .frame(maxWidth: .infinity) + + Button { + if contactViewModel.selectedFriend != nil { + isShowDeletePopup.toggle() + } + + if #available(iOS 16.0, *) { + showingSheet.toggle() + } else { + showingSheet.toggle() + dismiss() + } + } label: { + HStack { + Image("trash-simple") + .renderingMode(.template) + .resizable() + .foregroundStyle(Color.redDanger500) + .frame(width: 25, height: 25, alignment: .leading) + Text("Delete") + .foregroundStyle(Color.redDanger500) + .default_text_style(styleSize: 16) + Spacer() + } + .frame(maxHeight: .infinity) + } + .padding(.horizontal, 30) + .background(Color.gray100) + + } + .onRotate { newOrientation in + orientation = newOrientation + } + .background(Color.gray100) + .frame(maxWidth: .infinity) + } +} diff --git a/Linphone/UI/Main/Contacts/Fragments/ContactsListFragment.swift b/Linphone/UI/Main/Contacts/Fragments/ContactsListFragment.swift new file mode 100644 index 000000000..355f67d0f --- /dev/null +++ b/Linphone/UI/Main/Contacts/Fragments/ContactsListFragment.swift @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2010-2023 Belledonne Communications SARL. + * + * This file is part of linphone-iphone + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import SwiftUI +import linphonesw + +struct ContactsListFragment: View { + + @ObservedObject var magicSearch = MagicSearchSingleton.shared + + @ObservedObject var contactViewModel: ContactViewModel + @ObservedObject var contactsListViewModel: ContactsListViewModel + + @Binding var showingSheet: Bool + + var body: some View { + VStack { + List { + ForEach(0... + */ + +import SwiftUI +import linphonesw + +struct FavoriteContactsListFragment: View { + + @ObservedObject var magicSearch = MagicSearchSingleton.shared + + @ObservedObject var contactViewModel: ContactViewModel + @ObservedObject var favoriteContactsListViewModel: FavoriteContactsListViewModel + + @Binding var showingSheet: Bool + + var body: some View { + ScrollView(.horizontal) { + HStack { + ForEach(0... */ -import Foundation +import linphonesw class ContactViewModel: ObservableObject { + + @Published var displayedFriend: Friend? + var stringToCopy: String = "" + + var selectedFriend: Friend? - @Published var contactTitle: String = "" + private var magicSearch = MagicSearchSingleton.shared - init() {} + init() { + magicSearch.searchForContacts( + sourceFlags: MagicSearch.Source.Friends.rawValue | MagicSearch.Source.LdapServers.rawValue)} } diff --git a/Linphone/UI/Main/Contacts/ViewModel/ContactsListViewModel.swift b/Linphone/UI/Main/Contacts/ViewModel/ContactsListViewModel.swift new file mode 100644 index 000000000..a126f5975 --- /dev/null +++ b/Linphone/UI/Main/Contacts/ViewModel/ContactsListViewModel.swift @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2023 Belledonne Communications SARL. + * + * This file is part of linphone-iphone + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import linphonesw + +class ContactsListViewModel: ObservableObject { + + init() {} +} diff --git a/Linphone/UI/Main/Contacts/ViewModel/FavoriteContactsListViewModel.swift b/Linphone/UI/Main/Contacts/ViewModel/FavoriteContactsListViewModel.swift new file mode 100644 index 000000000..852da7946 --- /dev/null +++ b/Linphone/UI/Main/Contacts/ViewModel/FavoriteContactsListViewModel.swift @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2023 Belledonne Communications SARL. + * + * This file is part of linphone-iphone + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import linphonesw + +class FavoriteContactsListViewModel: ObservableObject { + + init() {} +} diff --git a/Linphone/UI/Main/ContentView.swift b/Linphone/UI/Main/ContentView.swift index 32bc8f301..913b29b45 100644 --- a/Linphone/UI/Main/ContentView.swift +++ b/Linphone/UI/Main/ContentView.swift @@ -18,254 +18,466 @@ */ import SwiftUI +import linphonesw struct ContentView: View { - - @ObservedObject var sharedMainViewModel: SharedMainViewModel - @ObservedObject var contactViewModel: ContactViewModel - @ObservedObject var historyViewModel: HistoryViewModel - @ObservedObject private var coreContext = CoreContext.shared - - @State var index = 0 - @State private var orientation = UIDevice.current.orientation - @State var menuOpen: Bool = false - - var body: some View { - if !sharedMainViewModel.welcomeViewDisplayed { - WelcomeView(sharedMainViewModel: sharedMainViewModel) - } else if coreContext.mCore.defaultAccount == nil || sharedMainViewModel.displayProfileMode { - AssistantView(sharedMainViewModel: sharedMainViewModel) - } else { - GeometryReader { geometry in - ZStack { - VStack(spacing: 0) { - HStack(spacing: 0) { - if orientation == .landscapeLeft - || orientation == .landscapeRight - || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height { - VStack { - Group { - Spacer() - Button(action: { - self.index = 0 - }, label: { - VStack { - Image("address-book") - .renderingMode(.template) - .resizable() - .foregroundStyle(self.index == 0 ? Color.orangeMain500 : Color.grayMain2c600) - .frame(width: 25, height: 25) - if self.index == 0 { - Text("Contacts") - .default_text_style_700(styleSize: 10) - } else { - Text("Contacts") - .default_text_style(styleSize: 10) - } - } - }) - - Spacer() - - Button(action: { - self.index = 1 - contactViewModel.contactTitle = "" - }, label: { - VStack { - Image("phone") - .renderingMode(.template) - .resizable() - .foregroundStyle(self.index == 1 ? Color.orangeMain500 : Color.grayMain2c600) - .frame(width: 25, height: 25) - if self.index == 1 { - Text("Calls") - .default_text_style_700(styleSize: 10) - } else { - Text("Calls") - .default_text_style(styleSize: 10) - } - } - }) - - Spacer() - } - } - .frame(width: 75) - .padding(.leading, - orientation == .landscapeRight && geometry.safeAreaInsets.bottom > 0 - ? -geometry.safeAreaInsets.leading - : 0) - } - - VStack(spacing: 0) { - HStack { - Image("profile-image-example") - .resizable() - .frame(width: 40, height: 40) - .clipShape(Circle()) - .onTapGesture { - openMenu() - } - - Text(index == 0 ? "Contacts" : "Calls") - .default_text_style_white_800(styleSize: 20) - .padding(.leading, 10) - - Spacer() - - Button { - - } label: { - Image("search") - } - - Button { - - } label: { - Image(index == 0 ? "filtres" : "more") - } - .padding(.leading) - } - .frame(maxWidth: .infinity) - .frame(height: 50) - .padding(.horizontal) - .background(Color.orangeMain500) - - if self.index == 0 { - ContactsView(contactViewModel: contactViewModel, historyViewModel: historyViewModel) - } else if self.index == 1 { - HistoryView() - } - } - .frame(maxWidth: - (orientation == .landscapeLeft - || orientation == .landscapeRight - || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height) - ? geometry.size.width/100*40 - : .infinity - ) - .background( - Color.white - .shadow(color: Color.gray200, radius: 4, x: 0, y: 0) - .mask(Rectangle().padding(.horizontal, -8)) - ) - - if orientation == .landscapeLeft - || orientation == .landscapeRight - || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height { - Spacer() - } - } - - if !(orientation == .landscapeLeft - || orientation == .landscapeRight - || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height) { - HStack { - Group { - Spacer() - Button(action: { - self.index = 0 - }, label: { - VStack { - Image("address-book") - .renderingMode(.template) - .resizable() - .foregroundStyle(self.index == 0 ? Color.orangeMain500 : Color.grayMain2c600) - .frame(width: 25, height: 25) - if self.index == 0 { - Text("Contacts") - .default_text_style_700(styleSize: 10) - } else { - Text("Contacts") - .default_text_style(styleSize: 10) - } - } - }) - .padding(.top) - - Spacer() - - Button(action: { - self.index = 1 - contactViewModel.contactTitle = "" - }, label: { - VStack { - Image("phone") - .renderingMode(.template) - .resizable() - .foregroundStyle(self.index == 1 ? Color.orangeMain500 : Color.grayMain2c600) - .frame(width: 25, height: 25) - if self.index == 1 { - Text("Calls") - .default_text_style_700(styleSize: 10) - } else { - Text("Calls") - .default_text_style(styleSize: 10) - } - } - }) - .padding(.top) - Spacer() - } - } - .padding(.bottom, geometry.safeAreaInsets.bottom > 0 ? 0 : 15) - .background( - Color.white - .shadow(color: Color.gray200, radius: 4, x: 0, y: 0) - .mask(Rectangle().padding(.top, -8)) - ) - } - } - - if !contactViewModel.contactTitle.isEmpty || !historyViewModel.historyTitle.isEmpty { - HStack(spacing: 0) { - Spacer() - .frame(maxWidth: - (orientation == .landscapeLeft - || orientation == .landscapeRight - || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height) - ? (geometry.size.width/100*40) + 75 - : 0 - ) - if self.index == 0 { - ContactFragment(contactViewModel: contactViewModel) - .frame(maxWidth: .infinity) - .background(Color.gray100) - } else if self.index == 1 { - HistoryContactFragment() - .frame(maxWidth: .infinity) - .background(Color.gray100) - } - } - .padding(.leading, - orientation == .landscapeRight && geometry.safeAreaInsets.bottom > 0 - ? -geometry.safeAreaInsets.leading - : 0) - .transition(.move(edge: .trailing)) - } - - SideMenu( - width: geometry.size.width / 5 * 4, - isOpen: self.menuOpen, - menuClose: self.openMenu, - safeAreaInsets: geometry.safeAreaInsets - ) - .ignoresSafeArea(.all) - } - } - .onRotate { newOrientation in - orientation = newOrientation - } - } - } - - func openMenu() { - withAnimation { - self.menuOpen.toggle() - } - } + + var contactManager = ContactsManager.shared + var magicSearch = MagicSearchSingleton.shared + + @ObservedObject var contactViewModel: ContactViewModel + @ObservedObject var historyViewModel: HistoryViewModel + @ObservedObject private var coreContext = CoreContext.shared + + @State var index = 0 + @State private var orientation = UIDevice.current.orientation + @State var sideMenuIsOpen: Bool = false + + @State private var searchIsActive = false + @State private var text = "" + @FocusState private var focusedField: Bool + @State var isMenuOpen: Bool = false + @State var isShowDeletePopup = false + + var body: some View { + GeometryReader { geometry in + ZStack { + VStack(spacing: 0) { + HStack(spacing: 0) { + if orientation == .landscapeLeft + || orientation == .landscapeRight + || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height { + VStack { + Group { + Spacer() + Button(action: { + self.index = 0 + }, label: { + VStack { + Image("address-book") + .renderingMode(.template) + .resizable() + .foregroundStyle(self.index == 0 ? Color.orangeMain500 : Color.grayMain2c600) + .frame(width: 25, height: 25) + if self.index == 0 { + Text("Contacts") + .default_text_style_700(styleSize: 10) + } else { + Text("Contacts") + .default_text_style(styleSize: 10) + } + } + }) + + Spacer() + + Button(action: { + self.index = 1 + contactViewModel.displayedFriend = nil + }, label: { + VStack { + Image("phone") + .renderingMode(.template) + .resizable() + .foregroundStyle(self.index == 1 ? Color.orangeMain500 : Color.grayMain2c600) + .frame(width: 25, height: 25) + if self.index == 1 { + Text("Calls") + .default_text_style_700(styleSize: 10) + } else { + Text("Calls") + .default_text_style(styleSize: 10) + } + } + }) + + Spacer() + } + } + .frame(width: 75) + .padding(.leading, + orientation == .landscapeRight && geometry.safeAreaInsets.bottom > 0 + ? -geometry.safeAreaInsets.leading + : 0) + } + + VStack(spacing: 0) { + if searchIsActive == false { + HStack { + Image("profile-image-example") + .resizable() + .frame(width: 45, height: 45) + .clipShape(Circle()) + .onTapGesture { + openMenu() + } + + Text(index == 0 ? "Contacts" : "Calls") + .default_text_style_white_800(styleSize: 20) + .padding(.leading, 10) + + Spacer() + + Button { + withAnimation { + searchIsActive.toggle() + } + } label: { + Image("magnifying-glass") + .renderingMode(.template) + .resizable() + .foregroundStyle(.white) + .frame(width: 25, height: 25, alignment: .leading) + } + + Menu { + Button { + isMenuOpen = false + magicSearch.allContact = true + magicSearch.searchForContacts( + sourceFlags: MagicSearch.Source.Friends.rawValue | MagicSearch.Source.LdapServers.rawValue) + } label: { + HStack { + Text("See all") + Spacer() + if magicSearch.allContact { + Image("green-check") + .resizable() + .frame(width: 25, height: 25, alignment: .leading) + } + } + } + + Button { + isMenuOpen = false + magicSearch.allContact = false + magicSearch.searchForContacts( + sourceFlags: MagicSearch.Source.Friends.rawValue | MagicSearch.Source.LdapServers.rawValue) + } label: { + HStack { + Text("See Linphone contact") + Spacer() + if !magicSearch.allContact { + Image("green-check") + .resizable() + .frame(width: 25, height: 25, alignment: .leading) + } + } + } + } label: { + Image(index == 0 ? "funnel" : "dots-three-vertical") + .renderingMode(.template) + .resizable() + .foregroundStyle(.white) + .frame(width: 25, height: 25, alignment: .leading) + } + .padding(.leading) + .onTapGesture { + isMenuOpen = true + } + } + .frame(maxWidth: .infinity) + .frame(height: 50) + .padding(.horizontal) + .padding(.bottom, 5) + .background(Color.orangeMain500) + } else { + HStack { + Button { + withAnimation { + self.focusedField = false + searchIsActive.toggle() + } + + text = "" + magicSearch.currentFilter = "" + magicSearch.searchForContacts( + sourceFlags: MagicSearch.Source.Friends.rawValue | MagicSearch.Source.LdapServers.rawValue) + } label: { + Image("caret-left") + .renderingMode(.template) + .resizable() + .foregroundStyle(.white) + .frame(width: 25, height: 25, alignment: .leading) + } + + if #available(iOS 16.0, *) { + TextEditor(text: Binding( + get: { + return text + }, + set: { value in + var newValue = value + if value.contains("\n") { + newValue = value.replacingOccurrences(of: "\n", with: "") + } + text = newValue + } + )) + .default_text_style_white_700(styleSize: 15) + .padding(.all, 6) + .accentColor(.white) + .scrollContentBackground(.hidden) + .focused($focusedField) + .onAppear { + self.focusedField = true + } + .onChange(of: text) { newValue in + magicSearch.currentFilter = newValue + magicSearch.searchForContacts( + sourceFlags: MagicSearch.Source.Friends.rawValue | MagicSearch.Source.LdapServers.rawValue) + } + } else { + TextEditor(text: Binding( + get: { + return text + }, + set: { value in + var newValue = value + if value.contains("\n") { + newValue = value.replacingOccurrences(of: "\n", with: "") + } + text = newValue + } + )) + .default_text_style_white_700(styleSize: 15) + .padding(.all, 6) + .accentColor(.white) + .focused($focusedField) + .onAppear { + self.focusedField = true + } + .onChange(of: text) { newValue in + magicSearch.currentFilter = newValue + magicSearch.searchForContacts( + sourceFlags: MagicSearch.Source.Friends.rawValue | MagicSearch.Source.LdapServers.rawValue) + } + } + + Button { + text = "" + } label: { + Image("x") + .renderingMode(.template) + .resizable() + .foregroundStyle(.white) + .frame(width: 25, height: 25, alignment: .leading) + } + .padding(.leading) + } + .frame(maxWidth: .infinity) + .frame(height: 50) + .padding(.horizontal) + .padding(.bottom, 5) + .background(Color.orangeMain500) + } + + if self.index == 0 { + ContactsView(contactViewModel: contactViewModel, historyViewModel: historyViewModel, isShowDeletePopup: $isShowDeletePopup) + } else if self.index == 1 { + HistoryView() + } + } + .frame(maxWidth: + (orientation == .landscapeLeft + || orientation == .landscapeRight + || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height) + ? geometry.size.width/100*40 + : .infinity + ) + .background( + Color.white + .shadow(color: Color.gray200, radius: 4, x: 0, y: 0) + .mask(Rectangle().padding(.horizontal, -8)) + ) + + if orientation == .landscapeLeft + || orientation == .landscapeRight + || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height { + Spacer() + } + } + + if !(orientation == .landscapeLeft + || orientation == .landscapeRight + || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height) && !searchIsActive { + HStack { + Group { + Spacer() + Button(action: { + self.index = 0 + }, label: { + VStack { + Image("address-book") + .renderingMode(.template) + .resizable() + .foregroundStyle(self.index == 0 ? Color.orangeMain500 : Color.grayMain2c600) + .frame(width: 25, height: 25) + if self.index == 0 { + Text("Contacts") + .default_text_style_700(styleSize: 10) + } else { + Text("Contacts") + .default_text_style(styleSize: 10) + } + } + }) + .padding(.top) + + Spacer() + + Button(action: { + self.index = 1 + contactViewModel.displayedFriend = nil + }, label: { + VStack { + Image("phone") + .renderingMode(.template) + .resizable() + .foregroundStyle(self.index == 1 ? Color.orangeMain500 : Color.grayMain2c600) + .frame(width: 25, height: 25) + if self.index == 1 { + Text("Calls") + .default_text_style_700(styleSize: 10) + } else { + Text("Calls") + .default_text_style(styleSize: 10) + } + } + }) + .padding(.top) + Spacer() + } + } + .padding(.bottom, geometry.safeAreaInsets.bottom > 0 ? 0 : 15) + .background( + Color.white + .shadow(color: Color.gray200, radius: 4, x: 0, y: 0) + .mask(Rectangle().padding(.top, -8)) + ) + } + } + + if contactViewModel.displayedFriend != nil || !historyViewModel.historyTitle.isEmpty { + HStack(spacing: 0) { + Spacer() + .frame(maxWidth: + (orientation == .landscapeLeft + || orientation == .landscapeRight + || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height) + ? (geometry.size.width/100*40) + 75 + : 0 + ) + if self.index == 0 { + ContactFragment(contactViewModel: contactViewModel, isShowDeletePopup: $isShowDeletePopup) + .frame(maxWidth: .infinity) + .background(Color.gray100) + .ignoresSafeArea(.keyboard) + } else if self.index == 1 { + HistoryContactFragment() + .frame(maxWidth: .infinity) + .background(Color.gray100) + .ignoresSafeArea(.keyboard) + } + } + .onAppear { + if !(orientation == .landscapeLeft + || orientation == .landscapeRight + || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height) + && searchIsActive { + self.focusedField = false + } + } + .onDisappear { + if !(orientation == .landscapeLeft + || orientation == .landscapeRight + || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height) + && searchIsActive { + self.focusedField = true + } + } + .padding(.leading, + orientation == .landscapeRight && geometry.safeAreaInsets.bottom > 0 + ? -geometry.safeAreaInsets.leading + : 0) + .transition(.move(edge: .trailing)) + .zIndex(1) + } + + SideMenu( + width: geometry.size.width / 5 * 4, + isOpen: self.sideMenuIsOpen, + menuClose: self.openMenu, + safeAreaInsets: geometry.safeAreaInsets + ) + .ignoresSafeArea(.all) + .zIndex(2) + + if isShowDeletePopup { + PopupView(sharedMainViewModel: SharedMainViewModel(), isShowPopup: $isShowDeletePopup, + title: Text( + contactViewModel.selectedFriend != nil + ? "Delete \(contactViewModel.selectedFriend!.name!)?" + : (contactViewModel.displayedFriend != nil + ? "Delete \(contactViewModel.displayedFriend!.name!)?" + : "Error Name")), + content: Text("This contact will be deleted definitively."), + titleFirstButton: Text("Cancel"), + actionFirstButton: {self.isShowDeletePopup.toggle()}, + titleSecondButton: Text("Ok"), + actionSecondButton: { + if contactViewModel.selectedFriend != nil { + contactViewModel.selectedFriend!.remove() + if contactViewModel.displayedFriend != nil && contactViewModel.selectedFriend!.name == contactViewModel.displayedFriend!.name { + withAnimation { + contactViewModel.displayedFriend = nil + } + } + } else if contactViewModel.displayedFriend != nil { + contactViewModel.displayedFriend!.remove() + withAnimation { + contactViewModel.displayedFriend = nil + } + } + magicSearch.searchForContacts( + sourceFlags: MagicSearch.Source.Friends.rawValue | MagicSearch.Source.LdapServers.rawValue) + self.isShowDeletePopup.toggle() + }) + .background(.black.opacity(0.65)) + .zIndex(3) + .onTapGesture { + self.isShowDeletePopup.toggle() + } + } + } + } + .overlay { + if isMenuOpen { + Color.white.opacity(0.001) + .ignoresSafeArea() + .frame(maxWidth: .infinity, maxHeight: .infinity) + .onTapGesture { + isMenuOpen = false + } + } + } + .onRotate { newOrientation in + if (contactViewModel.displayedFriend != nil || !historyViewModel.historyTitle.isEmpty) && searchIsActive { + self.focusedField = false + } else if searchIsActive { + self.focusedField = true + } + orientation = newOrientation + } + } + + func openMenu() { + withAnimation { + self.sideMenuIsOpen.toggle() + } + } } #Preview { - ContentView(sharedMainViewModel: SharedMainViewModel(), contactViewModel: ContactViewModel(), historyViewModel: HistoryViewModel()) + ContentView(contactViewModel: ContactViewModel(), historyViewModel: HistoryViewModel()) } diff --git a/Linphone/UI/Main/Fragments/CustomBottomSheet.swift b/Linphone/UI/Main/Fragments/CustomBottomSheet.swift new file mode 100644 index 000000000..18683b01f --- /dev/null +++ b/Linphone/UI/Main/Fragments/CustomBottomSheet.swift @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2010-2023 Belledonne Communications SARL. + * + * This file is part of linphone-iphone + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import SwiftUI + +extension View { + func halfSheet( + showSheet: Binding, + @ViewBuilder content: @escaping () -> Content, + onDismiss: @escaping () -> Void + ) -> some View { + return self + .background( + HalfSheetHelper(sheetView: content(), showSheet: showSheet, onDismiss: onDismiss) + ) + } +} + +struct HalfSheetHelper: UIViewControllerRepresentable { + + var sheetView: Content + let controller: UIViewController = UIViewController() + @Binding var showSheet: Bool + var onDismiss: () -> Void + + func makeCoordinator() -> Coordinator { + Coordinator(parent: self) + } + + func makeUIViewController(context: Context) -> UIViewController { + controller.view.backgroundColor = .clear + return controller + } + + func updateUIViewController(_ uiViewController: UIViewController, context: Context) { + if showSheet { + let sheetController = CustomHostingController(rootView: sheetView) + sheetController.presentationController?.delegate = context.coordinator + uiViewController.present(sheetController, animated: true) + } + } + + final class Coordinator: NSObject, UISheetPresentationControllerDelegate { + + var parent: HalfSheetHelper + + init(parent: HalfSheetHelper) { + self.parent = parent + } + + func presentationControllerWillDismiss(_ presentationController: UIPresentationController) { + parent.showSheet = false + } + } +} + +final class CustomHostingController: UIHostingController { + override func viewDidLoad() { + view.backgroundColor = .clear + if let presentationController = presentationController as? UISheetPresentationController { + presentationController.detents = [ + .medium() + ] + + presentationController.prefersGrabberVisible = false + + presentationController.prefersScrollingExpandsWhenScrolledToEdge = false + + presentationController.preferredCornerRadius = 30 + } + } +} + +public struct LazyView: View { + private let build: () -> Content + public init(_ build: @autoclosure @escaping () -> Content) { + self.build = build + } + public var body: Content { + build() + } +} diff --git a/Linphone/UI/Main/Fragments/ToastView.swift b/Linphone/UI/Main/Fragments/ToastView.swift index ab092763d..b24ba953e 100644 --- a/Linphone/UI/Main/Fragments/ToastView.swift +++ b/Linphone/UI/Main/Fragments/ToastView.swift @@ -36,9 +36,11 @@ struct ToastView: ViewModifier { VStack { if !isShowing.isEmpty { HStack { - Image(isShowing == "Successful" ? "success" : "danger") + Image(isShowing == "Successful" ? "smiley" : "warning-circle") .resizable() + .renderingMode(.template) .frame(width: 25, height: 25, alignment: .leading) + .foregroundStyle(isShowing == "Successful" ? Color.greenSuccess500 : Color.redDanger500) switch isShowing { case "Successful": diff --git a/Linphone/UI/Main/History/HistoryView.swift b/Linphone/UI/Main/History/HistoryView.swift index c876cf67e..25d6b0b1e 100644 --- a/Linphone/UI/Main/History/HistoryView.swift +++ b/Linphone/UI/Main/History/HistoryView.swift @@ -26,7 +26,7 @@ struct HistoryView: View { VStack(spacing: 0) { VStack { Spacer() - Image("illus-belledonne1") + Image("illus-belledonne") .resizable() .scaledToFit() .clipped() diff --git a/Linphone/UI/Main/Viewmodel/SharedMainViewModel.swift b/Linphone/UI/Main/Viewmodel/SharedMainViewModel.swift index 5e8f6d39a..d95e98499 100644 --- a/Linphone/UI/Main/Viewmodel/SharedMainViewModel.swift +++ b/Linphone/UI/Main/Viewmodel/SharedMainViewModel.swift @@ -25,33 +25,33 @@ class SharedMainViewModel: ObservableObject { @Published var generalTermsAccepted = false @Published var displayProfileMode = false + let welcomeViewKey = "welcome_view" + let generalTermsKey = "general_terms" + let displayProfileModeKey = "display_profile_mode" + var maxWidth = 400.0 init() { let preferences = UserDefaults.standard - let welcomeViewKey = "welcome_view" - if preferences.object(forKey: welcomeViewKey) == nil { preferences.set(welcomeViewDisplayed, forKey: welcomeViewKey) } else { welcomeViewDisplayed = preferences.bool(forKey: welcomeViewKey) } - let generalTermsKey = "general_terms" - if preferences.object(forKey: generalTermsKey) == nil { preferences.set(generalTermsAccepted, forKey: generalTermsKey) } else { generalTermsAccepted = preferences.bool(forKey: generalTermsKey) } - let displayProfileModeKey = "display_profile_mode" - if preferences.object(forKey: displayProfileModeKey) == nil { + print("displayProfileModeKeydisplayProfileModeKey nil") preferences.set(displayProfileMode, forKey: displayProfileModeKey) } else { displayProfileMode = preferences.bool(forKey: displayProfileModeKey) + print("displayProfileModeKeydisplayProfileModeKey \(displayProfileMode)") } } @@ -59,7 +59,6 @@ class SharedMainViewModel: ObservableObject { let preferences = UserDefaults.standard welcomeViewDisplayed = true - let welcomeViewKey = "welcome_view" preferences.set(welcomeViewDisplayed, forKey: welcomeViewKey) } @@ -67,7 +66,6 @@ class SharedMainViewModel: ObservableObject { let preferences = UserDefaults.standard generalTermsAccepted = true - let generalTermsKey = "general_terms" preferences.set(generalTermsAccepted, forKey: generalTermsKey) } @@ -75,7 +73,6 @@ class SharedMainViewModel: ObservableObject { let preferences = UserDefaults.standard displayProfileMode = true - let displayProfileModeKey = "display_profile_mode" preferences.set(displayProfileMode, forKey: displayProfileModeKey) } @@ -83,7 +80,6 @@ class SharedMainViewModel: ObservableObject { let preferences = UserDefaults.standard displayProfileMode = false - let displayProfileModeKey = "display_profile_mode" preferences.set(displayProfileMode, forKey: displayProfileModeKey) } } diff --git a/Linphone/UI/Welcome/Fragments/WelcomePage2Fragment.swift b/Linphone/UI/Welcome/Fragments/WelcomePage2Fragment.swift index 45f1e8fa2..b8cb97f3f 100644 --- a/Linphone/UI/Welcome/Fragments/WelcomePage2Fragment.swift +++ b/Linphone/UI/Welcome/Fragments/WelcomePage2Fragment.swift @@ -26,7 +26,7 @@ struct WelcomePage2Fragment: View { VStack { Spacer() VStack { - Image("secure-image") + Image("secured") .renderingMode(.template) .resizable() .foregroundStyle(Color.orangeMain500) diff --git a/Linphone/Utils/MagicSearchSingleton.swift b/Linphone/Utils/MagicSearchSingleton.swift new file mode 100644 index 000000000..50c9f02e9 --- /dev/null +++ b/Linphone/Utils/MagicSearchSingleton.swift @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2010-2023 Belledonne Communications SARL. + * + * This file is part of linphone-iphone + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import linphonesw + +final class MagicSearchSingleton: ObservableObject { + + static let shared = MagicSearchSingleton() + private var coreContext = CoreContext.shared + + private var magicSearch: MagicSearch! + + var currentFilter: String = "" + var previousFilter: String? + + var needUpdateLastSearchContacts = false + + @Published var lastSearch: [SearchResult] = [] + + private var limitSearchToLinphoneAccounts = true + + @Published var allContact = false + private var domainDefaultAccount = "" + + private init() { + coreContext.doOnCoreQueue{ core in + self.domainDefaultAccount = core.defaultAccount?.params?.domain ?? "" + + self.magicSearch = try? core.createMagicSearch() + self.magicSearch.limitedSearch = false + + self.magicSearch.publisher?.onSearchResultsReceived?.postOnMainQueue { (magicSearch: MagicSearch) in + self.needUpdateLastSearchContacts = true + self.lastSearch = magicSearch.lastSearch + } + } + } + + func searchForContacts(sourceFlags: Int) { + coreContext.doOnCoreQueue{ core in + var needResetCache = false + + DispatchQueue.main.sync { + if let oldFilter = self.previousFilter { + if oldFilter.count > self.currentFilter.count || oldFilter != self.currentFilter { + needResetCache = true + } + } + self.previousFilter = self.currentFilter + } + if needResetCache { + self.magicSearch.resetSearchCache() + } + + self.magicSearch.getContactsListAsync( + filter: self.currentFilter, + domain: self.allContact ? "" : self.domainDefaultAccount, + sourceFlags: sourceFlags, + aggregation: MagicSearch.Aggregation.Friend) + } + } +} diff --git a/Linphone/Utils/PermissionManager.swift b/Linphone/Utils/PermissionManager.swift index a39833010..f1d741f7e 100644 --- a/Linphone/Utils/PermissionManager.swift +++ b/Linphone/Utils/PermissionManager.swift @@ -19,6 +19,7 @@ import Foundation import Photos +import Contacts class PermissionManager: ObservableObject { @@ -26,6 +27,7 @@ class PermissionManager: ObservableObject { @Published var photoLibraryPermissionGranted = false @Published var cameraPermissionGranted = false + @Published var contactsPermissionGranted = false private init() {} @@ -44,4 +46,13 @@ class PermissionManager: ObservableObject { } }) } + + func contactsRequestPermission() { + let store = CNContactStore() + store.requestAccess(for: .contacts) { success, _ in + DispatchQueue.main.async { + self.contactsPermissionGranted = success + } + } + } } diff --git a/Linphone/Utils/TextExtension.swift b/Linphone/Utils/TextExtension.swift index e9d58ae0b..8465dfbff 100644 --- a/Linphone/Utils/TextExtension.swift +++ b/Linphone/Utils/TextExtension.swift @@ -136,4 +136,9 @@ extension View { self.font(Font.custom("NotoSans-Regular", size: styleSize)) .foregroundStyle(Color.grayMain2c600) } + + func contact_text_style_500(styleSize: CGFloat) -> some View { + self.font(Font.custom("NotoSans-Medium", size: styleSize)) + .foregroundStyle(Color.grayMain2c400) + } }