diff --git a/Linphone.xcodeproj/project.pbxproj b/Linphone.xcodeproj/project.pbxproj new file mode 100644 index 000000000..d58787b09 --- /dev/null +++ b/Linphone.xcodeproj/project.pbxproj @@ -0,0 +1,433 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + D719ABB72ABC67BF00B41C10 /* LinphoneApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D719ABB62ABC67BF00B41C10 /* LinphoneApp.swift */; }; + D719ABB92ABC67BF00B41C10 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D719ABB82ABC67BF00B41C10 /* ContentView.swift */; }; + D719ABBB2ABC67BF00B41C10 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D719ABBA2ABC67BF00B41C10 /* Assets.xcassets */; }; + D719ABBF2ABC67BF00B41C10 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D719ABBE2ABC67BF00B41C10 /* Preview Assets.xcassets */; }; + 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 */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + D719ABB32ABC67BF00B41C10 /* Linphone.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Linphone.app; sourceTree = BUILT_PRODUCTS_DIR; }; + D719ABB62ABC67BF00B41C10 /* LinphoneApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinphoneApp.swift; sourceTree = ""; }; + D719ABB82ABC67BF00B41C10 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + D719ABBA2ABC67BF00B41C10 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + D719ABBC2ABC67BF00B41C10 /* Linphone.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Linphone.entitlements; sourceTree = ""; }; + D719ABBE2ABC67BF00B41C10 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 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 = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D719ABB02ABC67BF00B41C10 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1CF963E4850D8355137FE34F /* Pods */ = { + isa = PBXGroup; + children = ( + ); + path = Pods; + sourceTree = ""; + }; + D719ABAA2ABC67BF00B41C10 = { + isa = PBXGroup; + children = ( + D719ABB52ABC67BF00B41C10 /* Linphone */, + D719ABB42ABC67BF00B41C10 /* Products */, + 1CF963E4850D8355137FE34F /* Pods */, + ); + sourceTree = ""; + }; + D719ABB42ABC67BF00B41C10 /* Products */ = { + isa = PBXGroup; + children = ( + D719ABB32ABC67BF00B41C10 /* Linphone.app */, + ); + name = Products; + sourceTree = ""; + }; + D719ABB52ABC67BF00B41C10 /* Linphone */ = { + isa = PBXGroup; + children = ( + D719ABC72ABC6FB200B41C10 /* core */, + D719ABC52ABC6EE800B41C10 /* ui */, + D719ABB62ABC67BF00B41C10 /* LinphoneApp.swift */, + D719ABBA2ABC67BF00B41C10 /* Assets.xcassets */, + D719ABBC2ABC67BF00B41C10 /* Linphone.entitlements */, + D719ABBD2ABC67BF00B41C10 /* Preview Content */, + ); + path = Linphone; + sourceTree = ""; + }; + D719ABBD2ABC67BF00B41C10 /* Preview Content */ = { + isa = PBXGroup; + children = ( + D719ABBE2ABC67BF00B41C10 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + D719ABC52ABC6EE800B41C10 /* ui */ = { + isa = PBXGroup; + children = ( + D719ABCA2ABC761800B41C10 /* assistant */, + D719ABC62ABC6F0200B41C10 /* main */, + ); + path = ui; + sourceTree = ""; + }; + D719ABC62ABC6F0200B41C10 /* main */ = { + isa = PBXGroup; + children = ( + D719ABD02ABC7C4F00B41C10 /* viewmodel */, + D719ABB82ABC67BF00B41C10 /* ContentView.swift */, + ); + path = main; + sourceTree = ""; + }; + D719ABC72ABC6FB200B41C10 /* core */ = { + isa = PBXGroup; + children = ( + D719ABC82ABC6FD700B41C10 /* CoreContext.swift */, + ); + path = core; + sourceTree = ""; + }; + D719ABCA2ABC761800B41C10 /* assistant */ = { + isa = PBXGroup; + children = ( + D719ABCD2ABC777600B41C10 /* viewmodel */, + D719ABCB2ABC769C00B41C10 /* AssistantView.swift */, + ); + path = assistant; + sourceTree = ""; + }; + D719ABCD2ABC777600B41C10 /* viewmodel */ = { + isa = PBXGroup; + children = ( + D719ABCE2ABC779A00B41C10 /* AccountLoginViewModel.swift */, + ); + path = viewmodel; + sourceTree = ""; + }; + D719ABD02ABC7C4F00B41C10 /* viewmodel */ = { + isa = PBXGroup; + children = ( + ); + path = viewmodel; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + D719ABB22ABC67BF00B41C10 /* Linphone */ = { + isa = PBXNativeTarget; + buildConfigurationList = D719ABC22ABC67BF00B41C10 /* Build configuration list for PBXNativeTarget "Linphone" */; + buildPhases = ( + D719ABAF2ABC67BF00B41C10 /* Sources */, + D719ABB02ABC67BF00B41C10 /* Frameworks */, + D719ABB12ABC67BF00B41C10 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Linphone; + productName = Linphone; + productReference = D719ABB32ABC67BF00B41C10 /* Linphone.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D719ABAB2ABC67BF00B41C10 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1430; + LastUpgradeCheck = 1430; + TargetAttributes = { + D719ABB22ABC67BF00B41C10 = { + CreatedOnToolsVersion = 14.3.1; + }; + }; + }; + buildConfigurationList = D719ABAE2ABC67BF00B41C10 /* Build configuration list for PBXProject "Linphone" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = D719ABAA2ABC67BF00B41C10; + productRefGroup = D719ABB42ABC67BF00B41C10 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D719ABB22ABC67BF00B41C10 /* Linphone */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + D719ABB12ABC67BF00B41C10 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D719ABBF2ABC67BF00B41C10 /* Preview Assets.xcassets in Resources */, + D719ABBB2ABC67BF00B41C10 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D719ABAF2ABC67BF00B41C10 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D719ABB92ABC67BF00B41C10 /* ContentView.swift in Sources */, + D719ABC92ABC6FD700B41C10 /* CoreContext.swift in Sources */, + D719ABCF2ABC779A00B41C10 /* AccountLoginViewModel.swift in Sources */, + D719ABB72ABC67BF00B41C10 /* LinphoneApp.swift in Sources */, + D719ABCC2ABC769C00B41C10 /* AssistantView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + D719ABC02ABC67BF00B41C10 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + D719ABC12ABC67BF00B41C10 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + D719ABC32ABC67BF00B41C10 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = Linphone/Linphone.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_ASSET_PATHS = "\"Linphone/Preview Content\""; + DEVELOPMENT_TEAM = Z2V957B3D6; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 13.3; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = org.linphone.phone.Linphone; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + D719ABC42ABC67BF00B41C10 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = Linphone/Linphone.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_ASSET_PATHS = "\"Linphone/Preview Content\""; + DEVELOPMENT_TEAM = Z2V957B3D6; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 13.3; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = org.linphone.phone.Linphone; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D719ABAE2ABC67BF00B41C10 /* Build configuration list for PBXProject "Linphone" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D719ABC02ABC67BF00B41C10 /* Debug */, + D719ABC12ABC67BF00B41C10 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D719ABC22ABC67BF00B41C10 /* Build configuration list for PBXNativeTarget "Linphone" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D719ABC32ABC67BF00B41C10 /* Debug */, + D719ABC42ABC67BF00B41C10 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D719ABAB2ABC67BF00B41C10 /* Project object */; +} diff --git a/Linphone.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Linphone.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/Linphone.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Linphone.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Linphone.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/Linphone.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Linphone.xcodeproj/project.xcworkspace/xcuserdata/martinsb.xcuserdatad/UserInterfaceState.xcuserstate b/Linphone.xcodeproj/project.xcworkspace/xcuserdata/martinsb.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 000000000..2b2a4d04a Binary files /dev/null and b/Linphone.xcodeproj/project.xcworkspace/xcuserdata/martinsb.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Linphone.xcodeproj/xcuserdata/martinsb.xcuserdatad/xcschemes/xcschememanagement.plist b/Linphone.xcodeproj/xcuserdata/martinsb.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 000000000..31e3717b8 --- /dev/null +++ b/Linphone.xcodeproj/xcuserdata/martinsb.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Linphone.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/Linphone.xcworkspace/contents.xcworkspacedata b/Linphone.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..c96eedd87 --- /dev/null +++ b/Linphone.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Linphone.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Linphone.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/Linphone.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Linphone.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Linphone.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..0c67376eb --- /dev/null +++ b/Linphone.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,5 @@ + + + + + diff --git a/Linphone.xcworkspace/xcuserdata/martinsb.xcuserdatad/UserInterfaceState.xcuserstate b/Linphone.xcworkspace/xcuserdata/martinsb.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 000000000..ad787a03f Binary files /dev/null and b/Linphone.xcworkspace/xcuserdata/martinsb.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Linphone.xcworkspace/xcuserdata/martinsb.xcuserdatad/WorkspaceSettings.xcsettings b/Linphone.xcworkspace/xcuserdata/martinsb.xcuserdatad/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..bbfef027f --- /dev/null +++ b/Linphone.xcworkspace/xcuserdata/martinsb.xcuserdatad/WorkspaceSettings.xcsettings @@ -0,0 +1,14 @@ + + + + + BuildLocationStyle + UseAppPreferences + CustomBuildLocationType + RelativeToDerivedData + DerivedDataLocationStyle + Default + ShowSharedSchemesAutomaticallyEnabled + + + diff --git a/Linphone/.DS_Store b/Linphone/.DS_Store new file mode 100644 index 000000000..ec9d1dc22 Binary files /dev/null and b/Linphone/.DS_Store differ diff --git a/Linphone/Assets.xcassets/AccentColor.colorset/Contents.json b/Linphone/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 000000000..eb8789700 --- /dev/null +++ b/Linphone/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/AppIcon.appiconset/Contents.json b/Linphone/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..532cd729c --- /dev/null +++ b/Linphone/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,63 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/Contents.json b/Linphone/Assets.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/Linphone/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Linphone.entitlements b/Linphone/Linphone.entitlements new file mode 100644 index 000000000..f2ef3ae02 --- /dev/null +++ b/Linphone/Linphone.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/Linphone/LinphoneApp.swift b/Linphone/LinphoneApp.swift new file mode 100644 index 000000000..6536d8c3d --- /dev/null +++ b/Linphone/LinphoneApp.swift @@ -0,0 +1,29 @@ +/* +* 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 + +@main +struct LinphoneApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/Linphone/Preview Content/Preview Assets.xcassets/Contents.json b/Linphone/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/Linphone/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/core/CoreContext.swift b/Linphone/core/CoreContext.swift new file mode 100644 index 000000000..fbc995456 --- /dev/null +++ b/Linphone/core/CoreContext.swift @@ -0,0 +1,54 @@ +/* +* 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 + +class CoreContext : ObservableObject { + + static let shared = CoreContext() + + var mCore: Core! + var mRegistrationDelegate : CoreDelegate! + + var coreVersion: String = Core.getVersion + @Published var loggedIn: Bool = false + + private init() { + + LoggingService.Instance.logLevel = LogLevel.Debug + + try? mCore = Factory.Instance.createCore(configPath: "", 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(onAccountRegistrationStateChanged: { (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()))\n") + if (state == .Ok) { + self.loggedIn = true + } else if (state == .Cleared) { + self.loggedIn = false + } + }) + mCore.addDelegate(delegate: mRegistrationDelegate) + } +} diff --git a/Linphone/ui/.DS_Store b/Linphone/ui/.DS_Store new file mode 100644 index 000000000..9bbad94a3 Binary files /dev/null and b/Linphone/ui/.DS_Store differ diff --git a/Linphone/ui/assistant/AssistantView.swift b/Linphone/ui/assistant/AssistantView.swift new file mode 100644 index 000000000..f6f4e355d --- /dev/null +++ b/Linphone/ui/assistant/AssistantView.swift @@ -0,0 +1,90 @@ +/* +* 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 SwiftUI + +struct AssistantView: View { + + var coreContext = CoreContext.shared + @ObservedObject var accountLoginViewModel : AccountLoginViewModel + + var body: some View { + VStack { + HStack { + Text("Username:") + .font(.title) + TextField("", text : $accountLoginViewModel.username) + .textFieldStyle(RoundedBorderTextFieldStyle()) + .disabled(coreContext.loggedIn) + } + HStack { + Text("Password:") + .font(.title) + TextField("", text : $accountLoginViewModel.passwd) + .textFieldStyle(RoundedBorderTextFieldStyle()) + .disabled(coreContext.loggedIn) + } + HStack { + Text("Domain:") + .font(.title) + TextField("", text : $accountLoginViewModel.domain) + .textFieldStyle(RoundedBorderTextFieldStyle()) + .disabled(coreContext.loggedIn) + } + Picker(selection: $accountLoginViewModel.transportType, label: Text("Transport:")) { + Text("TLS").tag("TLS") + Text("TCP").tag("TCP") + Text("UDP").tag("UDP") + }.pickerStyle(SegmentedPickerStyle()).padding() + VStack { + HStack { + Button(action: { + if (self.coreContext.loggedIn) + { + self.accountLoginViewModel.unregister() + self.accountLoginViewModel.delete() + } else { + self.accountLoginViewModel.login() + } + }) + { + Text(coreContext.loggedIn ? "Log out & \ndelete account" : "Create & \nlog in account") + .font(.largeTitle) + .foregroundColor(Color.white) + .frame(width: 220.0, height: 90) + .background(Color.gray) + } + + } + HStack { + Text("Login State : ") + .font(.footnote) + Text(coreContext.loggedIn ? "Looged in" : "Unregistered") + .font(.footnote) + .foregroundColor(coreContext.loggedIn ? Color.green : Color.black) + }.padding(.top, 10.0) + } + Group { + Spacer() + Text("Core Version is \(coreContext.coreVersion)") + } + } + .padding() + } +} diff --git a/Linphone/ui/assistant/viewmodel/AccountLoginViewModel.swift b/Linphone/ui/assistant/viewmodel/AccountLoginViewModel.swift new file mode 100644 index 000000000..4ae39cee8 --- /dev/null +++ b/Linphone/ui/assistant/viewmodel/AccountLoginViewModel.swift @@ -0,0 +1,110 @@ +/* +* 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 + +class AccountLoginViewModel : ObservableObject { + + var coreContext = CoreContext.shared + @Published var username : String = "user" + @Published var passwd : String = "pwd" + @Published var domain : String = "sip.example.org" + @Published var transportType : String = "TLS" + + 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) } + } + + 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 + } + } + + 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() + } + } +} diff --git a/Linphone/ui/main/ContentView.swift b/Linphone/ui/main/ContentView.swift new file mode 100644 index 000000000..083a0011d --- /dev/null +++ b/Linphone/ui/main/ContentView.swift @@ -0,0 +1,33 @@ +/* +* 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 ContentView: View { + + var body: some View { + AssistantView(accountLoginViewModel: AccountLoginViewModel()) + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + AssistantView(accountLoginViewModel: AccountLoginViewModel()) + } +} diff --git a/Podfile b/Podfile new file mode 100644 index 000000000..2a03bdc6d --- /dev/null +++ b/Podfile @@ -0,0 +1,25 @@ +# Uncomment the next line to define a global platform for your project +platform :ios, '15.0' +source "https://gitlab.linphone.org/BC/public/podspec.git" +source "https://github.com/CocoaPods/Specs.git" + +def basic_pods + if ENV['PODFILE_PATH'].nil? + pod 'linphone-sdk', '~> 5.3.0-alpha' + else + pod 'linphone-sdk', :path => ENV['PODFILE_PATH'] # local sdk + end + +end + + + +target 'Linphone' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + # Pods for LoginTutorial + pod 'SwiftLint' + basic_pods + +end diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 000000000..d2285071e --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,21 @@ +PODS: + - "linphone-sdk (5.3.0-alpha.173+990473d73)" + - SwiftLint (0.52.4) + +DEPENDENCIES: + - linphone-sdk (~> 5.3.0-alpha) + - SwiftLint + +SPEC REPOS: + https://github.com/CocoaPods/Specs.git: + - SwiftLint + https://gitlab.linphone.org/BC/public/podspec.git: + - linphone-sdk + +SPEC CHECKSUMS: + linphone-sdk: 9f39eda481406fdc22ebb406e40ee56e6c12fcc6 + SwiftLint: 1cc5cd61ba9bacb2194e340aeb47a2a37fda00b3 + +PODFILE CHECKSUM: bd475905201c295afc656eeac0cc62b9ab7159d5 + +COCOAPODS: 1.12.1