From d421c46a71249d20d6fd1b68f39a409c6db94740 Mon Sep 17 00:00:00 2001 From: Andrew G Date: Wed, 6 May 2026 22:10:33 +0700 Subject: [PATCH] feat(ios): migrate to Swift Package Manager and upgrade linphone-sdk --- example/ios/Podfile | 2 - example/ios/Podfile.lock | 22 +-- example/ios/Runner.xcodeproj/project.pbxproj | 142 ++++++++++-------- .../xcshareddata/swiftpm/Package.resolved | 14 ++ .../xcshareddata/xcschemes/Runner.xcscheme | 18 +++ .../xcshareddata/swiftpm/Package.resolved | 14 ++ example/lib/main.dart | 38 +++-- example/pubspec.lock | 20 +-- ios/Assets/.gitkeep | 0 ios/Resources/PrivacyInfo.xcprivacy | 14 -- ios/liblinphone_flutter.podspec | 4 +- ios/liblinphone_flutter/Package.swift | 25 +++ .../LiblinphoneFlutterPlugin.swift | 0 .../liblinphone_flutter}/LinphoneBridge.swift | 0 .../Views/LocalView.swift | 0 .../Views/LocalViewFactory.swift | 0 .../Views/RemoteView.swift | 0 .../Views/RemoteViewFactory.swift | 0 18 files changed, 184 insertions(+), 129 deletions(-) create mode 100644 example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved delete mode 100644 ios/Assets/.gitkeep delete mode 100644 ios/Resources/PrivacyInfo.xcprivacy create mode 100644 ios/liblinphone_flutter/Package.swift rename ios/{Classes => liblinphone_flutter/Sources/liblinphone_flutter}/LiblinphoneFlutterPlugin.swift (100%) rename ios/{Classes => liblinphone_flutter/Sources/liblinphone_flutter}/LinphoneBridge.swift (100%) rename ios/{Classes => liblinphone_flutter/Sources/liblinphone_flutter}/Views/LocalView.swift (100%) rename ios/{Classes => liblinphone_flutter/Sources/liblinphone_flutter}/Views/LocalViewFactory.swift (100%) rename ios/{Classes => liblinphone_flutter/Sources/liblinphone_flutter}/Views/RemoteView.swift (100%) rename ios/{Classes => liblinphone_flutter/Sources/liblinphone_flutter}/Views/RemoteViewFactory.swift (100%) diff --git a/example/ios/Podfile b/example/ios/Podfile index d48d460..4fbe089 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -32,8 +32,6 @@ flutter_ios_podfile_setup target 'Runner' do use_frameworks! - pod 'linphone-sdk', '~> 5.4.84' - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do inherit! :search_paths diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 2d8f354..edcf550 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,36 +1,16 @@ PODS: - Flutter (1.0.0) - - integration_test (0.0.1): - - Flutter - - liblinphone_flutter (0.0.3): - - Flutter - - linphone-sdk (~> 5.4.84) - - linphone-sdk (5.4.84) DEPENDENCIES: - Flutter (from `Flutter`) - - integration_test (from `.symlinks/plugins/integration_test/ios`) - - liblinphone_flutter (from `.symlinks/plugins/liblinphone_flutter/ios`) - - linphone-sdk (~> 5.4.84) - -SPEC REPOS: - https://gitlab.linphone.org/BC/public/podspec.git: - - linphone-sdk EXTERNAL SOURCES: Flutter: :path: Flutter - integration_test: - :path: ".symlinks/plugins/integration_test/ios" - liblinphone_flutter: - :path: ".symlinks/plugins/liblinphone_flutter/ios" SPEC CHECKSUMS: Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 - integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573 - liblinphone_flutter: d9f5b41ba24ac8c6ff5916bc3043fa9dc75b3128 - linphone-sdk: 4df925a4973fdef74a58ce58f6c79e6cff3fa743 -PODFILE CHECKSUM: ed544b1f5ae46acc02aae47e34573c3ba1f21c68 +PODFILE CHECKSUM: 10f69310bf9f4be8c7fbe5151f573998954434f1 COCOAPODS: 1.16.2 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 50ec2fc..51258f7 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -8,15 +8,16 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 2C00FF212A990F1E8CE45C54 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09B022171C775101BE22CE5C /* Pods_Runner.framework */; }; + 2894CE4F906A21EA171B03CC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDE13E7A8E31FC1F3B14CDE3 /* Pods_Runner.framework */; }; 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 68507299350137909F454BC8 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 386F909BD45ABFF6031B5212 /* Pods_RunnerTests.framework */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 7884E8682EC3CC0700C636F2 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */; }; + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + EFE7A0DC9726C4101A305457 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BFA99792211B8C58047040E /* Pods_RunnerTests.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -43,20 +44,22 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 09B022171C775101BE22CE5C /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 083C3F8409866EFA13254315 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 2DF5D8DA1E5928622BD009EC /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 386F909BD45ABFF6031B5212 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 4563D893A8FBB4C7E39A3A5F /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 3C68AD2A521D18D8CED00072 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 4BFA99792211B8C58047040E /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 784666492D4C4C64000A1A5F /* FlutterFramework */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterFramework; path = Flutter/ephemeral/Packages/.packages/FlutterFramework; sourceTree = ""; }; 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 78DABEA22ED26510000E7860 /* liblinphone_flutter */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = liblinphone_flutter; path = ../../ios/liblinphone_flutter; sourceTree = ""; }; + 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 96B29D535737AA982E97F291 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 8B1F558A6596B0DAF447F924 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -64,9 +67,10 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DE898C41210C52B8BADD2DA0 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; - DF039402BCC354CBC1FAAD84 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - F8FC3E5625514CBF8149E1E4 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 9ED6B41530B29B4D348DA8BF /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + DD77C210ECB6D1F074E97B90 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + EE3A594CCEFAFC99381BE195 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + FDE13E7A8E31FC1F3B14CDE3 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -74,7 +78,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2C00FF212A990F1E8CE45C54 /* Pods_Runner.framework in Frameworks */, + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, + 2894CE4F906A21EA171B03CC /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -82,7 +87,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 68507299350137909F454BC8 /* Pods_RunnerTests.framework in Frameworks */, + EFE7A0DC9726C4101A305457 /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -100,6 +105,9 @@ 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( + 78DABEA22ED26510000E7860 /* liblinphone_flutter */, + 784666492D4C4C64000A1A5F /* FlutterFramework */, + 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, @@ -115,8 +123,8 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 331C8082294A63A400263BE5 /* RunnerTests */, - DB0867B7C53EA2362A9BFFB8 /* Pods */, - F6D6E356ADE3EF2BB2EC17CB /* Frameworks */, + 9DB67EB06FB31B04E3624A39 /* Pods */, + B72988508CD20F785DF7CC66 /* Frameworks */, ); sourceTree = ""; }; @@ -145,25 +153,24 @@ path = Runner; sourceTree = ""; }; - DB0867B7C53EA2362A9BFFB8 /* Pods */ = { + 9DB67EB06FB31B04E3624A39 /* Pods */ = { isa = PBXGroup; children = ( - DF039402BCC354CBC1FAAD84 /* Pods-Runner.debug.xcconfig */, - F8FC3E5625514CBF8149E1E4 /* Pods-Runner.release.xcconfig */, - 2DF5D8DA1E5928622BD009EC /* Pods-Runner.profile.xcconfig */, - DE898C41210C52B8BADD2DA0 /* Pods-RunnerTests.debug.xcconfig */, - 4563D893A8FBB4C7E39A3A5F /* Pods-RunnerTests.release.xcconfig */, - 96B29D535737AA982E97F291 /* Pods-RunnerTests.profile.xcconfig */, + DD77C210ECB6D1F074E97B90 /* Pods-Runner.debug.xcconfig */, + 8B1F558A6596B0DAF447F924 /* Pods-Runner.release.xcconfig */, + 083C3F8409866EFA13254315 /* Pods-Runner.profile.xcconfig */, + EE3A594CCEFAFC99381BE195 /* Pods-RunnerTests.debug.xcconfig */, + 3C68AD2A521D18D8CED00072 /* Pods-RunnerTests.release.xcconfig */, + 9ED6B41530B29B4D348DA8BF /* Pods-RunnerTests.profile.xcconfig */, ); - name = Pods; path = Pods; sourceTree = ""; }; - F6D6E356ADE3EF2BB2EC17CB /* Frameworks */ = { + B72988508CD20F785DF7CC66 /* Frameworks */ = { isa = PBXGroup; children = ( - 09B022171C775101BE22CE5C /* Pods_Runner.framework */, - 386F909BD45ABFF6031B5212 /* Pods_RunnerTests.framework */, + FDE13E7A8E31FC1F3B14CDE3 /* Pods_Runner.framework */, + 4BFA99792211B8C58047040E /* Pods_RunnerTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -175,7 +182,7 @@ isa = PBXNativeTarget; buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( - 637AFEC2DA5353F588BE980A /* [CP] Check Pods Manifest.lock */, + 9DAAF37094A7CB2DC37A2E2B /* [CP] Check Pods Manifest.lock */, 331C807D294A63A400263BE5 /* Sources */, 331C807F294A63A400263BE5 /* Resources */, AD123D619E8E0E414D0D1F60 /* Frameworks */, @@ -194,20 +201,22 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - FFE1AB77575F403F0AA47C18 /* [CP] Check Pods Manifest.lock */, + F3C0E070B46E77B1623774EB /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 6DA617089093A1E6CEDD66DC /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( ); name = Runner; + packageProductDependencies = ( + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, + ); productName = Runner; productReference = 97C146EE1CF9000F007C117D /* Runner.app */; productType = "com.apple.product-type.application"; @@ -241,6 +250,9 @@ Base, ); mainGroup = 97C146E51CF9000F007C117D; + packageReferences = ( + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */, + ); productRefGroup = 97C146EF1CF9000F007C117D /* Products */; projectDirPath = ""; projectRoot = ""; @@ -289,7 +301,22 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 637AFEC2DA5353F588BE980A /* [CP] Check Pods Manifest.lock */ = { + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; + 9DAAF37094A7CB2DC37A2E2B /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -311,39 +338,7 @@ 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; }; - 6DA617089093A1E6CEDD66DC /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - FFE1AB77575F403F0AA47C18 /* [CP] Check Pods Manifest.lock */ = { + F3C0E070B46E77B1623774EB /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -478,6 +473,7 @@ DEVELOPMENT_TEAM = SMU5T5GBX2; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -492,7 +488,7 @@ }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DE898C41210C52B8BADD2DA0 /* Pods-RunnerTests.debug.xcconfig */; + baseConfigurationReference = EE3A594CCEFAFC99381BE195 /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -510,7 +506,7 @@ }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4563D893A8FBB4C7E39A3A5F /* Pods-RunnerTests.release.xcconfig */; + baseConfigurationReference = 3C68AD2A521D18D8CED00072 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -526,7 +522,7 @@ }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 96B29D535737AA982E97F291 /* Pods-RunnerTests.profile.xcconfig */; + baseConfigurationReference = 9ED6B41530B29B4D348DA8BF /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -661,6 +657,7 @@ DEVELOPMENT_TEAM = SMU5T5GBX2; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -684,6 +681,7 @@ DEVELOPMENT_TEAM = SMU5T5GBX2; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -730,6 +728,20 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { + isa = XCSwiftPackageProductDependency; + productName = FlutterGeneratedPluginSwiftPackage; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 97C146E61CF9000F007C117D /* Project object */; } diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..b1b7a01 --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "linphone-sdk-swift-ios", + "kind" : "remoteSourceControl", + "location" : "https://git.nuark.xyz/nuark/linphone-sdk-swift-ios.git", + "state" : { + "branch" : "5.5.0-beta-2e6e6b927ce202f6948da02ea33081a52b89bf48", + "revision" : "61568d1609768c3802b31783f1df68d3dab8d3b3" + } + } + ], + "version" : 2 +} diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index e3773d4..c3fedb2 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -5,6 +5,24 @@ + + + + + + + + + + { - String _platformVersion = 'Unknown'; final _liblinphoneFlutterPlugin = LiblinphoneFlutter(); @override @@ -25,21 +23,10 @@ class _MyAppState extends State { initPlatformState(); } - // Platform messages are asynchronous, so we initialize in an async method. Future initPlatformState() async { - String platformVersion; - // Platform messages may fail, so we use a try/catch PlatformException. - // We also handle the message potentially returning null. - platformVersion = 'stub'; - - // If the widget was removed from the tree while the asynchronous platform - // message was in flight, we want to discard the reply rather than calling - // setState to update our non-existent appearance. if (!mounted) return; - setState(() { - _platformVersion = platformVersion; - }); + setState(() {}); } @override @@ -47,7 +34,28 @@ class _MyAppState extends State { return MaterialApp( home: Scaffold( appBar: AppBar(title: const Text('Plugin example app')), - body: Center(child: Text('Running on: $_platformVersion\n')), + body: Column( + children: [ + StreamBuilder( + stream: _liblinphoneFlutterPlugin.registrationEvents, + builder: (context, snapshot) { + return ListTile( + leading: snapshot.hasData + ? const Icon(Icons.check) + : (snapshot.hasError + ? const Icon(Icons.error) + : const CircularProgressIndicator()), + title: Text( + snapshot.hasData + ? "${snapshot.data}" + : (snapshot.hasError ? "${snapshot.error}" : "Loading"), + ), + subtitle: const Text("Registration events"), + ); + }, + ), + ], + ), ), ); } diff --git a/example/pubspec.lock b/example/pubspec.lock index eb9cfac..d4d3d25 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: async - sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" + sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37 url: "https://pub.dev" source: hosted - version: "2.13.0" + version: "2.13.1" boolean_selector: dependency: transitive description: @@ -45,10 +45,10 @@ packages: dependency: "direct main" description: name: cupertino_icons - sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + sha256: "41e005c33bd814be4d3096aff55b1908d419fde52ca656c8c47719ec745873cd" url: "https://pub.dev" source: hosted - version: "1.0.8" + version: "1.0.9" fake_async: dependency: transitive description: @@ -102,10 +102,10 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "11.0.1" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: @@ -202,10 +202,10 @@ packages: dependency: transitive description: name: source_span - sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab" url: "https://pub.dev" source: hosted - version: "1.10.1" + version: "1.10.2" stack_trace: dependency: transitive description: @@ -266,10 +266,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" + sha256: "0016aef94fc66495ac78af5859181e3f3bf2026bd8eecc72b9565601e19ab360" url: "https://pub.dev" source: hosted - version: "15.0.2" + version: "15.2.0" webdriver: dependency: transitive description: diff --git a/ios/Assets/.gitkeep b/ios/Assets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/ios/Resources/PrivacyInfo.xcprivacy b/ios/Resources/PrivacyInfo.xcprivacy deleted file mode 100644 index a34b7e2..0000000 --- a/ios/Resources/PrivacyInfo.xcprivacy +++ /dev/null @@ -1,14 +0,0 @@ - - - - - NSPrivacyTrackingDomains - - NSPrivacyAccessedAPITypes - - NSPrivacyCollectedDataTypes - - NSPrivacyTracking - - - diff --git a/ios/liblinphone_flutter.podspec b/ios/liblinphone_flutter.podspec index 9eb7d1f..427c389 100644 --- a/ios/liblinphone_flutter.podspec +++ b/ios/liblinphone_flutter.podspec @@ -13,9 +13,9 @@ libLinPhone integration library for Flutter apps s.license = { :file => '../LICENSE' } s.author = { 'nuark' => 'me@nuark.xyz' } s.source = { :path => '.' } - s.source_files = 'Classes/**/*' + s.source_files = 'liblinphone_flutter/Sources/liblinphone_flutter/**/*' s.dependency 'Flutter' - s.ios.dependency 'linphone-sdk', '~> 5.3.4' + s.ios.dependency 'linphone-sdk', '~> 5.5.0' s.platform = :ios, '13.0' # Flutter.framework does not contain a i386 slice. diff --git a/ios/liblinphone_flutter/Package.swift b/ios/liblinphone_flutter/Package.swift new file mode 100644 index 0000000..733e400 --- /dev/null +++ b/ios/liblinphone_flutter/Package.swift @@ -0,0 +1,25 @@ +// swift-tools-version: 5.9 + +import PackageDescription + +let package = Package( + name: "liblinphone_flutter", + platforms: [.iOS("15.0")], + products: [ + .library(name: "liblinphone-flutter", targets: ["liblinphone_flutter"]) + ], + dependencies: [ + .package(name: "FlutterFramework", path: "../FlutterFramework"), + .package(url: "https://git.nuark.xyz/nuark/linphone-sdk-swift-ios.git", branch: "5.5.0-beta-2e6e6b927ce202f6948da02ea33081a52b89bf48") + ], + targets: [ + .target( + name: "liblinphone_flutter", + dependencies: [ + .product(name: "FlutterFramework", package: "FlutterFramework"), + .product(name: "linphonesw", package: "linphone-sdk-swift-ios") + ], + path: "Sources" + ) + ] +) \ No newline at end of file diff --git a/ios/Classes/LiblinphoneFlutterPlugin.swift b/ios/liblinphone_flutter/Sources/liblinphone_flutter/LiblinphoneFlutterPlugin.swift similarity index 100% rename from ios/Classes/LiblinphoneFlutterPlugin.swift rename to ios/liblinphone_flutter/Sources/liblinphone_flutter/LiblinphoneFlutterPlugin.swift diff --git a/ios/Classes/LinphoneBridge.swift b/ios/liblinphone_flutter/Sources/liblinphone_flutter/LinphoneBridge.swift similarity index 100% rename from ios/Classes/LinphoneBridge.swift rename to ios/liblinphone_flutter/Sources/liblinphone_flutter/LinphoneBridge.swift diff --git a/ios/Classes/Views/LocalView.swift b/ios/liblinphone_flutter/Sources/liblinphone_flutter/Views/LocalView.swift similarity index 100% rename from ios/Classes/Views/LocalView.swift rename to ios/liblinphone_flutter/Sources/liblinphone_flutter/Views/LocalView.swift diff --git a/ios/Classes/Views/LocalViewFactory.swift b/ios/liblinphone_flutter/Sources/liblinphone_flutter/Views/LocalViewFactory.swift similarity index 100% rename from ios/Classes/Views/LocalViewFactory.swift rename to ios/liblinphone_flutter/Sources/liblinphone_flutter/Views/LocalViewFactory.swift diff --git a/ios/Classes/Views/RemoteView.swift b/ios/liblinphone_flutter/Sources/liblinphone_flutter/Views/RemoteView.swift similarity index 100% rename from ios/Classes/Views/RemoteView.swift rename to ios/liblinphone_flutter/Sources/liblinphone_flutter/Views/RemoteView.swift diff --git a/ios/Classes/Views/RemoteViewFactory.swift b/ios/liblinphone_flutter/Sources/liblinphone_flutter/Views/RemoteViewFactory.swift similarity index 100% rename from ios/Classes/Views/RemoteViewFactory.swift rename to ios/liblinphone_flutter/Sources/liblinphone_flutter/Views/RemoteViewFactory.swift