diff --git a/.github/workflows/ios-browserstack.yml b/.github/workflows/ios-browserstack.yml index 40ff3af..4d6e636 100644 --- a/.github/workflows/ios-browserstack.yml +++ b/.github/workflows/ios-browserstack.yml @@ -35,23 +35,17 @@ jobs: - run: pip3 install requests - - name: Install Cocoapods - run: gem install cocoapods - - name: Make build dir run: mkdir ddp - - name: Run Cocoapods - run: pod install - - - name: Inject AppID + - name: Inject AccessKey run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:' KoalaAppTestUITests/KoalaAppTestUITests.swift - name: XCode Build run: xcrun xcodebuild build-for-testing -configuration Debug - -workspace KoalaAppTest.xcworkspace + -project KoalaAppTest.xcodeproj -sdk iphoneos -scheme KoalaAppTest -derivedDataPath ddp diff --git a/.github/workflows/ios-demos.yml b/.github/workflows/ios-demos.yml index dccce4f..9c0360c 100644 --- a/.github/workflows/ios-demos.yml +++ b/.github/workflows/ios-demos.yml @@ -25,24 +25,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set up Node.js LTS - uses: actions/setup-node@v3 - with: - node-version: lts/* - - - name: Install Cocoapods - run: gem install cocoapods - - - name: Make build dir - run: mkdir ddp - - - name: Run Cocoapods - run: pod install - - name: Build run: xcrun xcodebuild build -configuration Debug - -workspace KoalaDemo.xcworkspace + -project KoalaDemo.xcodeproj -sdk iphoneos -scheme KoalaDemo -derivedDataPath ddp diff --git a/.github/workflows/ios-perf.yml b/.github/workflows/ios-perf.yml index 0c78336..1864be1 100644 --- a/.github/workflows/ios-perf.yml +++ b/.github/workflows/ios-perf.yml @@ -42,15 +42,9 @@ jobs: - run: pip3 install requests - - name: Install Cocoapods - run: gem install cocoapods - - name: Make build dir run: mkdir ddp - - name: Run Cocoapods - run: pod install - - name: Inject AccessKey run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:' PerformanceTest/PerformanceTest.swift @@ -67,7 +61,7 @@ jobs: - name: XCode Build run: xcrun xcodebuild build-for-testing -configuration Debug - -workspace KoalaAppTest.xcworkspace + -project  KoalaAppTest.xcodeproj -sdk iphoneos -scheme PerformanceTest -derivedDataPath ddp diff --git a/.gitignore b/.gitignore index 3d72576..19b7d62 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ .DS_Store -.idea \ No newline at end of file +.idea +.build +Package.resolved +.swiftpm \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index d3fcca3..eeb6f35 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "demo/c/dr_libs"] path = demo/c/dr_libs - url = ../../mackron/dr_libs.git + url = https://github.com/mackron/dr_libs.git [submodule "demo/c/pvrecorder"] path = demo/c/pvrecorder - url = ../../Picovoice/pvrecorder.git + url = https://github.com/Picovoice/pvrecorder.git diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..938207b --- /dev/null +++ b/Package.swift @@ -0,0 +1,36 @@ +// swift-tools-version:5.3 +import PackageDescription +let package = Package( + name: "Koala-iOS", + platforms: [ + .iOS(.v13) + ], + products: [ + .library( + name: "Koala", + targets: ["Koala"] + ) + ], + targets: [ + .binaryTarget( + name: "PvKoala", + path: "lib/ios/PvKoala.xcframework" + ), + .target( + name: "Koala", + dependencies: ["PvKoala"], + path: ".", + exclude: [ + "binding/ios/KoalaAppTest", + "demo" + ], + sources: [ + "binding/ios/Koala.swift", + "binding/ios/KoalaErrors.swift" + ], + resources: [ + .copy("lib/common/koala_params.pv") + ] + ) + ] +) diff --git a/README.md b/README.md index 220a246..04551ec 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ Before building the demo app, run the following from [`KoalaDemo`](./demo/ios/Ko pod install ``` -Open [KoalaDemo.xcworkspace](./demo/ios/KoalaDemo/KoalaDemo.xcworkspace) and run the demo. +Open [KoalaDemo.xcodeproj](./demo/ios/KoalaDemo/KoalaDemo.xcodeproj) and run the demo. ### C Demos diff --git a/binding/ios/Koala-iOS.podspec b/binding/ios/Koala-iOS.podspec index ebb7400..1c549be 100644 --- a/binding/ios/Koala-iOS.podspec +++ b/binding/ios/Koala-iOS.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'Koala-iOS' s.module_name = 'Koala' - s.version = '2.0.0' + s.version = '2.0.1' s.license = {:type => 'Apache 2.0'} s.summary = 'iOS SDK for Picovoice\'s Koala Noise Suppression Engine' s.description = @@ -18,7 +18,7 @@ Pod::Spec.new do |s| DESC s.homepage = 'https://github.com/Picovoice/koala/tree/main/binding/ios' s.author = { 'Picovoice' => 'hello@picovoice.ai' } - s.source = { :git => "https://github.com/Picovoice/koala.git", :tag => "Koala-iOS-v2.0.0" } + s.source = { :git => "https://github.com/Picovoice/koala.git", :tag => s.version.to_s } s.ios.deployment_target = '13.0' s.swift_version = '5.0' s.vendored_frameworks = 'lib/ios/PvKoala.xcframework' diff --git a/binding/ios/Koala.swift b/binding/ios/Koala.swift index 27cad5e..c8ca6bd 100644 --- a/binding/ios/Koala.swift +++ b/binding/ios/Koala.swift @@ -1,5 +1,5 @@ // -// Copyright 2023 Picovoice Inc. +// Copyright 2023-2024 Picovoice Inc. // You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" // file accompanying this source. // Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on @@ -7,6 +7,8 @@ // specific language governing permissions and limitations under the License. // +import Foundation + import PvKoala /// iOS binding for Koala Noise Suppression Engine. Provides a Swift interface to the Koala library. diff --git a/binding/ios/KoalaAppTest/KoalaAppTest.xcodeproj/project.pbxproj b/binding/ios/KoalaAppTest/KoalaAppTest.xcodeproj/project.pbxproj index 91222d3..43aaee1 100644 --- a/binding/ios/KoalaAppTest/KoalaAppTest.xcodeproj/project.pbxproj +++ b/binding/ios/KoalaAppTest/KoalaAppTest.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 55; + objectVersion = 60; objects = { /* Begin PBXBuildFile section */ @@ -18,9 +18,9 @@ 1E00656427CFF7EC006FF6E9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1E00656227CFF7EC006FF6E9 /* LaunchScreen.storyboard */; }; 1E00657927CFF7EC006FF6E9 /* KoalaAppTestUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E00657827CFF7EC006FF6E9 /* KoalaAppTestUITests.swift */; }; 1E5B7B332800F75900F8BDDB /* PerformanceTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E5B7B322800F75900F8BDDB /* PerformanceTest.swift */; }; - 415638DBF440AE6FEF275134 /* libPods-KoalaAppTest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E6008986406F64E64E5AABC /* libPods-KoalaAppTest.a */; }; - BB55D37F1F5EF113CFE49288 /* libPods-KoalaAppTestUITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A6F71AF1715132C4FD3C9473 /* libPods-KoalaAppTestUITests.a */; }; - DB30F23C393A77EF898A27A3 /* libPods-PerformanceTest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DE6FA71D6A578FD4B0CD0897 /* libPods-PerformanceTest.a */; }; + E1B2D78D2CF6B30800A28024 /* Koala in Frameworks */ = {isa = PBXBuildFile; productRef = E1B2D78C2CF6B30800A28024 /* Koala */; }; + E1B2D78F2CF6B30D00A28024 /* Koala in Frameworks */ = {isa = PBXBuildFile; productRef = E1B2D78E2CF6B30D00A28024 /* Koala */; }; + E1B2D7912CF6B31200A28024 /* Koala in Frameworks */ = {isa = PBXBuildFile; productRef = E1B2D7902CF6B31200A28024 /* Koala */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -43,7 +43,6 @@ /* Begin PBXFileReference section */ 02574DBB299569BB003FC0FA /* test.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = test.wav; path = ../../../resources/audio_samples/test.wav; sourceTree = ""; }; 02574DBC299569BB003FC0FA /* noise.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = noise.wav; path = ../../../resources/audio_samples/noise.wav; sourceTree = ""; }; - 19841E7C8EA384D98ED7251B /* Pods-KoalaAppTest.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KoalaAppTest.release.xcconfig"; path = "Target Support Files/Pods-KoalaAppTest/Pods-KoalaAppTest.release.xcconfig"; sourceTree = ""; }; 1E00655427CFF7EB006FF6E9 /* KoalaAppTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KoalaAppTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1E00655727CFF7EB006FF6E9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 1E00655B27CFF7EB006FF6E9 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -57,14 +56,6 @@ 1E5B7B302800F6FE00F8BDDB /* PerformanceTest.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PerformanceTest.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 1E5B7B322800F75900F8BDDB /* PerformanceTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PerformanceTest.swift; sourceTree = ""; }; 1E5B7B342800F76700F8BDDB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 3E6008986406F64E64E5AABC /* libPods-KoalaAppTest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-KoalaAppTest.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 5CCA3A5EB9F44528BD989C77 /* Pods-PerformanceTest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PerformanceTest.debug.xcconfig"; path = "Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest.debug.xcconfig"; sourceTree = ""; }; - 7EED4351F3353A9995259861 /* Pods-KoalaAppTestUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KoalaAppTestUITests.release.xcconfig"; path = "Target Support Files/Pods-KoalaAppTestUITests/Pods-KoalaAppTestUITests.release.xcconfig"; sourceTree = ""; }; - 808A1A007913D8DFAD0BF784 /* Pods-KoalaAppTestUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KoalaAppTestUITests.debug.xcconfig"; path = "Target Support Files/Pods-KoalaAppTestUITests/Pods-KoalaAppTestUITests.debug.xcconfig"; sourceTree = ""; }; - A6F71AF1715132C4FD3C9473 /* libPods-KoalaAppTestUITests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-KoalaAppTestUITests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - B34F5016447834B47F0B5E27 /* Pods-PerformanceTest.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PerformanceTest.release.xcconfig"; path = "Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest.release.xcconfig"; sourceTree = ""; }; - DE6FA71D6A578FD4B0CD0897 /* libPods-PerformanceTest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-PerformanceTest.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - FB4347876E9364A46E319585 /* Pods-KoalaAppTest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KoalaAppTest.debug.xcconfig"; path = "Target Support Files/Pods-KoalaAppTest/Pods-KoalaAppTest.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -72,7 +63,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 415638DBF440AE6FEF275134 /* libPods-KoalaAppTest.a in Frameworks */, + E1B2D78D2CF6B30800A28024 /* Koala in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -80,7 +71,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - BB55D37F1F5EF113CFE49288 /* libPods-KoalaAppTestUITests.a in Frameworks */, + E1B2D78F2CF6B30D00A28024 /* Koala in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -88,7 +79,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - DB30F23C393A77EF898A27A3 /* libPods-PerformanceTest.a in Frameworks */, + E1B2D7912CF6B31200A28024 /* Koala in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -103,9 +94,8 @@ 1E5B7B312800F71E00F8BDDB /* PerformanceTest */, 1E00655627CFF7EB006FF6E9 /* KoalaAppTest */, 1E00657727CFF7EC006FF6E9 /* KoalaAppTestUITests */, + E1B2D78B2CF6B30800A28024 /* Frameworks */, 1E00655527CFF7EB006FF6E9 /* Products */, - 9CBC7522C4FCFE2940BFA42C /* Pods */, - 5F91207C263F7A97417BE8CD /* Frameworks */, ); sourceTree = ""; }; @@ -150,29 +140,13 @@ path = PerformanceTest; sourceTree = ""; }; - 5F91207C263F7A97417BE8CD /* Frameworks */ = { + E1B2D78B2CF6B30800A28024 /* Frameworks */ = { isa = PBXGroup; children = ( - 3E6008986406F64E64E5AABC /* libPods-KoalaAppTest.a */, - DE6FA71D6A578FD4B0CD0897 /* libPods-PerformanceTest.a */, - A6F71AF1715132C4FD3C9473 /* libPods-KoalaAppTestUITests.a */, ); name = Frameworks; sourceTree = ""; }; - 9CBC7522C4FCFE2940BFA42C /* Pods */ = { - isa = PBXGroup; - children = ( - FB4347876E9364A46E319585 /* Pods-KoalaAppTest.debug.xcconfig */, - 19841E7C8EA384D98ED7251B /* Pods-KoalaAppTest.release.xcconfig */, - 808A1A007913D8DFAD0BF784 /* Pods-KoalaAppTestUITests.debug.xcconfig */, - 7EED4351F3353A9995259861 /* Pods-KoalaAppTestUITests.release.xcconfig */, - 5CCA3A5EB9F44528BD989C77 /* Pods-PerformanceTest.debug.xcconfig */, - B34F5016447834B47F0B5E27 /* Pods-PerformanceTest.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -180,12 +154,9 @@ isa = PBXNativeTarget; buildConfigurationList = 1E00657E27CFF7EC006FF6E9 /* Build configuration list for PBXNativeTarget "KoalaAppTest" */; buildPhases = ( - F3A4A1CCABD4718530D6587F /* [CP] Check Pods Manifest.lock */, 1E00655027CFF7EB006FF6E9 /* Sources */, 1E00655127CFF7EB006FF6E9 /* Frameworks */, 1E00655227CFF7EB006FF6E9 /* Resources */, - 213525BC8D3CB460A44F22DA /* [CP] Embed Pods Frameworks */, - 16D34B5BE8C83F35C92D3707 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -200,12 +171,9 @@ isa = PBXNativeTarget; buildConfigurationList = 1E00658427CFF7EC006FF6E9 /* Build configuration list for PBXNativeTarget "KoalaAppTestUITests" */; buildPhases = ( - 5205C1A9524E55350205706E /* [CP] Check Pods Manifest.lock */, 1E00657027CFF7EC006FF6E9 /* Sources */, 1E00657127CFF7EC006FF6E9 /* Frameworks */, 1E00657227CFF7EC006FF6E9 /* Resources */, - 330620338C86D4B471102B40 /* [CP] Embed Pods Frameworks */, - 721D2B31E3B9E61DA1364874 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -221,12 +189,9 @@ isa = PBXNativeTarget; buildConfigurationList = 1E5B7B2D2800F6FE00F8BDDB /* Build configuration list for PBXNativeTarget "PerformanceTest" */; buildPhases = ( - 1E5B7B242800F6FE00F8BDDB /* [CP] Check Pods Manifest.lock */, 1E5B7B252800F6FE00F8BDDB /* Sources */, 1E5B7B272800F6FE00F8BDDB /* Frameworks */, 1E5B7B292800F6FE00F8BDDB /* Resources */, - 1E5B7B2C2800F6FE00F8BDDB /* [CP] Embed Pods Frameworks */, - 41DEB299D99FB5970A8A4667 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -270,6 +235,9 @@ Base, ); mainGroup = 1E00654B27CFF7EB006FF6E9; + packageReferences = ( + E1B2D77F2CF69F2400A28024 /* XCLocalSwiftPackageReference "../../../../koala" */, + ); productRefGroup = 1E00655527CFF7EB006FF6E9 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -312,177 +280,6 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 16D34B5BE8C83F35C92D3707 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-KoalaAppTest/Pods-KoalaAppTest-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-KoalaAppTest/Pods-KoalaAppTest-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KoalaAppTest/Pods-KoalaAppTest-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 1E5B7B242800F6FE00F8BDDB /* [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-PerformanceTest-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; - }; - 1E5B7B2C2800F6FE00F8BDDB /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 213525BC8D3CB460A44F22DA /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-KoalaAppTest/Pods-KoalaAppTest-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-KoalaAppTest/Pods-KoalaAppTest-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KoalaAppTest/Pods-KoalaAppTest-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 330620338C86D4B471102B40 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-KoalaAppTestUITests/Pods-KoalaAppTestUITests-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-KoalaAppTestUITests/Pods-KoalaAppTestUITests-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KoalaAppTestUITests/Pods-KoalaAppTestUITests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 41DEB299D99FB5970A8A4667 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 5205C1A9524E55350205706E /* [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-KoalaAppTestUITests-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; - }; - 721D2B31E3B9E61DA1364874 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-KoalaAppTestUITests/Pods-KoalaAppTestUITests-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-KoalaAppTestUITests/Pods-KoalaAppTestUITests-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KoalaAppTestUITests/Pods-KoalaAppTestUITests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - F3A4A1CCABD4718530D6587F /* [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-KoalaAppTest-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; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 1E00655027CFF7EB006FF6E9 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -660,7 +457,6 @@ }; 1E00657F27CFF7EC006FF6E9 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FB4347876E9364A46E319585 /* Pods-KoalaAppTest.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -690,7 +486,6 @@ }; 1E00658027CFF7EC006FF6E9 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 19841E7C8EA384D98ED7251B /* Pods-KoalaAppTest.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -720,7 +515,6 @@ }; 1E00658527CFF7EC006FF6E9 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 808A1A007913D8DFAD0BF784 /* Pods-KoalaAppTestUITests.debug.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; @@ -744,7 +538,6 @@ }; 1E00658627CFF7EC006FF6E9 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7EED4351F3353A9995259861 /* Pods-KoalaAppTestUITests.release.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; @@ -768,7 +561,6 @@ }; 1E5B7B2E2800F6FE00F8BDDB /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5CCA3A5EB9F44528BD989C77 /* Pods-PerformanceTest.debug.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; @@ -794,7 +586,6 @@ }; 1E5B7B2F2800F6FE00F8BDDB /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B34F5016447834B47F0B5E27 /* Pods-PerformanceTest.release.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; @@ -857,6 +648,31 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + E1B2D77F2CF69F2400A28024 /* XCLocalSwiftPackageReference "../../../../koala" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = ../../../../koala; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + E1B2D78C2CF6B30800A28024 /* Koala */ = { + isa = XCSwiftPackageProductDependency; + package = E1B2D77F2CF69F2400A28024 /* XCLocalSwiftPackageReference "../../../../koala" */; + productName = Koala; + }; + E1B2D78E2CF6B30D00A28024 /* Koala */ = { + isa = XCSwiftPackageProductDependency; + package = E1B2D77F2CF69F2400A28024 /* XCLocalSwiftPackageReference "../../../../koala" */; + productName = Koala; + }; + E1B2D7902CF6B31200A28024 /* Koala */ = { + isa = XCSwiftPackageProductDependency; + package = E1B2D77F2CF69F2400A28024 /* XCLocalSwiftPackageReference "../../../../koala" */; + productName = Koala; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 1E00654C27CFF7EB006FF6E9 /* Project object */; } diff --git a/binding/ios/KoalaAppTest/KoalaAppTest.xcworkspace/contents.xcworkspacedata b/binding/ios/KoalaAppTest/KoalaAppTest.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index f398dec..0000000 --- a/binding/ios/KoalaAppTest/KoalaAppTest.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/binding/ios/KoalaAppTest/KoalaAppTest.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/binding/ios/KoalaAppTest/KoalaAppTest.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/binding/ios/KoalaAppTest/KoalaAppTest.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/binding/ios/KoalaAppTest/Podfile b/binding/ios/KoalaAppTest/Podfile deleted file mode 100644 index 41b52bc..0000000 --- a/binding/ios/KoalaAppTest/Podfile +++ /dev/null @@ -1,14 +0,0 @@ -source 'https://cdn.cocoapods.org/' -platform :ios, '13.0' - -target 'KoalaAppTest' do - pod 'Koala-iOS', '~> 2.0.0' -end - -target 'KoalaAppTestUITests' do - pod 'Koala-iOS', '~> 2.0.0' -end - -target 'PerformanceTest' do - pod 'Koala-iOS', '~> 2.0.0' -end diff --git a/binding/ios/KoalaAppTest/Podfile.lock b/binding/ios/KoalaAppTest/Podfile.lock deleted file mode 100644 index f11ba0d..0000000 --- a/binding/ios/KoalaAppTest/Podfile.lock +++ /dev/null @@ -1,16 +0,0 @@ -PODS: - - Koala-iOS (2.0.0) - -DEPENDENCIES: - - Koala-iOS (~> 2.0.0) - -SPEC REPOS: - trunk: - - Koala-iOS - -SPEC CHECKSUMS: - Koala-iOS: b0e48400203d615520e6539f9994826183e5bb5a - -PODFILE CHECKSUM: 96e97bfb2db18a96bd2a8170036d04a3667e55fb - -COCOAPODS: 1.11.3 diff --git a/binding/ios/KoalaErrors.swift b/binding/ios/KoalaErrors.swift index e71b9b8..edc725a 100644 --- a/binding/ios/KoalaErrors.swift +++ b/binding/ios/KoalaErrors.swift @@ -1,5 +1,5 @@ // -// Copyright 2023 Picovoice Inc. +// Copyright 2023-2024 Picovoice Inc. // You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" // file accompanying this source. // Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on @@ -7,6 +7,8 @@ // specific language governing permissions and limitations under the License. // +import Foundation + public class KoalaError: LocalizedError { private let message: String private let messageStack: [String] diff --git a/binding/ios/README.md b/binding/ios/README.md index c9368a2..9d44dae 100644 --- a/binding/ios/README.md +++ b/binding/ios/README.md @@ -19,8 +19,15 @@ Koala is an on-device noise suppression engine. Koala is: ## Installation -The Koala iOS binding is available via [CocoaPods](https://cocoapods.org/pods/Koala-iOS). To import it into your iOS project, add the following line to your Podfile: +The Koala iOS binding is available via [Swift Package Manager](https://www.swift.org/documentation/package-manager/) or [CocoaPods](https://cocoapods.org/pods/Koala-iOS). + +To import the package using SPM, open up your project's Package Dependencies in XCode and add: +``` +https://github.com/Picovoice/koala.git +``` +To import it into your iOS project using CocoaPods, add the following line to your Podfile: + ```ruby pod 'Koala-iOS' ``` @@ -79,9 +86,7 @@ When done be sure to explicitly release the resources using `koala.delete()`. ## Running Unit Tests -- Run `pod install` in the [`KoalaAppTest`](./KoalaAppTest) directory -- Copy your `AccessKey` into the `accessKey` variable in [`KoalaAppTestUITests.swift`](./KoalaAppTest/KoalaAppTestUITests/KoalaAppTestUITests.swift) -- Open [`KoalaAppTest.xcworkspace`](KoalaAppTest/KoalaAppTest.xcworkspace) with XCode and run the tests with `Product > Test`. +Copy your `AccessKey` into the `accessKey` variable in [`KoalaAppTestUITests.swift`](KoalaAppTest/KoalaAppTestUITests/KoalaAppTestUITests.swift). Open [`KoalaAppTest.xcodeproj`](KoalaAppTest/KoalaAppTest.xcodeproj) with XCode and run the tests with `Product > Test`. ## Demo App diff --git a/demo/ios/KoalaDemo/KoalaDemo.xcodeproj/project.pbxproj b/demo/ios/KoalaDemo/KoalaDemo.xcodeproj/project.pbxproj index 1e438a9..174bd6b 100644 --- a/demo/ios/KoalaDemo/KoalaDemo.xcodeproj/project.pbxproj +++ b/demo/ios/KoalaDemo/KoalaDemo.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 60; objects = { /* Begin PBXBuildFile section */ @@ -11,7 +11,8 @@ 3276967434C9CEBD0AF09237 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 327694975368499C3B7946DD /* Assets.xcassets */; }; 327698EADFD16D8F70823520 /* KoalaDemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 327697358B823E5B2EF0FA8C /* KoalaDemoApp.swift */; }; 32769B2E1B2C5A2A897FFB10 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32769F3923C69C8C0C435CCF /* ContentView.swift */; }; - AF10BC13B27DBA6B733B192A /* libPods-KoalaDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CB997F06C7C673F9F2446D95 /* libPods-KoalaDemo.a */; }; + E1B2D7872CF6A06100A28024 /* Koala in Frameworks */ = {isa = PBXBuildFile; productRef = E1B2D7862CF6A06100A28024 /* Koala */; }; + E1B2D78A2CF6A07100A28024 /* ios_voice_processor in Frameworks */ = {isa = PBXBuildFile; productRef = E1B2D7892CF6A07100A28024 /* ios_voice_processor */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -21,11 +22,6 @@ 327699927E572962C40A7A04 /* KoalaDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KoalaDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 32769E49F724E169E0E13E27 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; 32769F3923C69C8C0C435CCF /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; - 3B82BCD82CCC5303A602F516 /* Pods-KoalaDemoUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KoalaDemoUITests.debug.xcconfig"; path = "Target Support Files/Pods-KoalaDemoUITests/Pods-KoalaDemoUITests.debug.xcconfig"; sourceTree = ""; }; - 79E6C5E1A07F1F9C428E73D4 /* Pods-KoalaDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KoalaDemo.debug.xcconfig"; path = "Target Support Files/Pods-KoalaDemo/Pods-KoalaDemo.debug.xcconfig"; sourceTree = ""; }; - BD4ECBA4E7173E9ECE685095 /* Pods-KoalaDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KoalaDemo.release.xcconfig"; path = "Target Support Files/Pods-KoalaDemo/Pods-KoalaDemo.release.xcconfig"; sourceTree = ""; }; - CB997F06C7C673F9F2446D95 /* libPods-KoalaDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-KoalaDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - F33333AE1B947FF5FFB3E9E7 /* Pods-KoalaDemoUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KoalaDemoUITests.release.xcconfig"; path = "Target Support Files/Pods-KoalaDemoUITests/Pods-KoalaDemoUITests.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -33,28 +29,19 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - AF10BC13B27DBA6B733B192A /* libPods-KoalaDemo.a in Frameworks */, + E1B2D78A2CF6A07100A28024 /* ios_voice_processor in Frameworks */, + E1B2D7872CF6A06100A28024 /* Koala in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 152DF7E2EA2DFC4CD7EB46DC /* Frameworks */ = { - isa = PBXGroup; - children = ( - CB997F06C7C673F9F2446D95 /* libPods-KoalaDemo.a */, - ); - name = Frameworks; - sourceTree = ""; - }; 327692BCE8C735F3534C318E = { isa = PBXGroup; children = ( 32769B87809678D96B1C6C55 /* Products */, 32769C17C8FD0599F872D3D1 /* KoalaDemo */, - AED451108802979154B4E395 /* Pods */, - 152DF7E2EA2DFC4CD7EB46DC /* Frameworks */, ); sourceTree = ""; }; @@ -78,17 +65,6 @@ path = KoalaDemo; sourceTree = ""; }; - AED451108802979154B4E395 /* Pods */ = { - isa = PBXGroup; - children = ( - 79E6C5E1A07F1F9C428E73D4 /* Pods-KoalaDemo.debug.xcconfig */, - BD4ECBA4E7173E9ECE685095 /* Pods-KoalaDemo.release.xcconfig */, - 3B82BCD82CCC5303A602F516 /* Pods-KoalaDemoUITests.debug.xcconfig */, - F33333AE1B947FF5FFB3E9E7 /* Pods-KoalaDemoUITests.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -96,12 +72,9 @@ isa = PBXNativeTarget; buildConfigurationList = 32769440EBAF1B96C25C64E5 /* Build configuration list for PBXNativeTarget "KoalaDemo" */; buildPhases = ( - EEEBC400C3F382C9ADB47297 /* [CP] Check Pods Manifest.lock */, 32769E8C15D0D566DE02D742 /* Sources */, 32769FD78B69EE3D028A9BD8 /* Frameworks */, 327698D80053ADD919041906 /* Resources */, - 6B8F74027D329047EE376040 /* [CP] Embed Pods Frameworks */, - C5835F7B597091C12144A612 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -135,6 +108,10 @@ en, ); mainGroup = 327692BCE8C735F3534C318E; + packageReferences = ( + E1B2D7852CF6A06100A28024 /* XCLocalSwiftPackageReference "../../../../koala" */, + E1B2D7882CF6A07100A28024 /* XCRemoteSwiftPackageReference "ios-voice-processor" */, + ); productRefGroup = 32769B87809678D96B1C6C55 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -155,67 +132,6 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 6B8F74027D329047EE376040 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-KoalaDemo/Pods-KoalaDemo-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/Koala-iOS/PvKoala.framework/PvKoala", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PvKoala.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KoalaDemo/Pods-KoalaDemo-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - C5835F7B597091C12144A612 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-KoalaDemo/Pods-KoalaDemo-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/Koala-iOS/KoalaResources.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/KoalaResources.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KoalaDemo/Pods-KoalaDemo-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - EEEBC400C3F382C9ADB47297 /* [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-KoalaDemo-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; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 32769E8C15D0D566DE02D742 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -281,15 +197,15 @@ MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; SWIFT_INCLUDE_PATHS = "${SRCROOT}"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_OPTIMIZATION_LEVEL = "-O"; VALIDATE_PRODUCT = YES; }; name = Release; }; 3276957BE00965E54B1F13C1 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 79E6C5E1A07F1F9C428E73D4 /* Pods-KoalaDemo.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -305,7 +221,10 @@ INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = ai.picovoice.KoalaDemo; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -317,7 +236,6 @@ }; 327698DB666EFBD22F7AB2D5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BD4ECBA4E7173E9ECE685095 /* Pods-KoalaDemo.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -333,7 +251,10 @@ INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = ai.picovoice.KoalaDemo; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -429,6 +350,36 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + E1B2D7852CF6A06100A28024 /* XCLocalSwiftPackageReference "../../../../koala" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = ../../../../koala; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCRemoteSwiftPackageReference section */ + E1B2D7882CF6A07100A28024 /* XCRemoteSwiftPackageReference "ios-voice-processor" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/Picovoice/ios-voice-processor"; + requirement = { + kind = exactVersion; + version = 1.2.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + E1B2D7862CF6A06100A28024 /* Koala */ = { + isa = XCSwiftPackageProductDependency; + productName = Koala; + }; + E1B2D7892CF6A07100A28024 /* ios_voice_processor */ = { + isa = XCSwiftPackageProductDependency; + package = E1B2D7882CF6A07100A28024 /* XCRemoteSwiftPackageReference "ios-voice-processor" */; + productName = ios_voice_processor; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 32769964E3C57B4A4BE3CC9E /* Project object */; } diff --git a/demo/ios/KoalaDemo/KoalaDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/demo/ios/KoalaDemo/KoalaDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/demo/ios/KoalaDemo/KoalaDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/demo/ios/KoalaDemo/KoalaDemo.xcworkspace/contents.xcworkspacedata b/demo/ios/KoalaDemo/KoalaDemo.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 2835642..0000000 --- a/demo/ios/KoalaDemo/KoalaDemo.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/demo/ios/KoalaDemo/KoalaDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/demo/ios/KoalaDemo/KoalaDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/demo/ios/KoalaDemo/KoalaDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/demo/ios/KoalaDemo/Podfile b/demo/ios/KoalaDemo/Podfile deleted file mode 100644 index 61ab0f5..0000000 --- a/demo/ios/KoalaDemo/Podfile +++ /dev/null @@ -1,7 +0,0 @@ -source 'https://cdn.cocoapods.org/' -platform :ios, '13.0' - -target 'KoalaDemo' do - pod 'Koala-iOS', '~> 2.0.0' - pod 'ios-voice-processor', '~> 1.1.0' -end diff --git a/demo/ios/KoalaDemo/Podfile.lock b/demo/ios/KoalaDemo/Podfile.lock deleted file mode 100644 index b4d14e0..0000000 --- a/demo/ios/KoalaDemo/Podfile.lock +++ /dev/null @@ -1,20 +0,0 @@ -PODS: - - ios-voice-processor (1.1.0) - - Koala-iOS (2.0.0) - -DEPENDENCIES: - - ios-voice-processor (~> 1.1.0) - - Koala-iOS (~> 2.0.0) - -SPEC REPOS: - trunk: - - ios-voice-processor - - Koala-iOS - -SPEC CHECKSUMS: - ios-voice-processor: 8e32d7f980a06d392d128ef1cd19cf6ddcaca3c1 - Koala-iOS: b0e48400203d615520e6539f9994826183e5bb5a - -PODFILE CHECKSUM: 83bf75f0e80df078aab1b58cc8d0c1f923297232 - -COCOAPODS: 1.11.3 diff --git a/demo/ios/README.md b/demo/ios/README.md index 94bb804..fd1a70e 100644 --- a/demo/ios/README.md +++ b/demo/ios/README.md @@ -16,4 +16,4 @@ Before building the demo app, run the following from `KoalaDemo` directory to in pod install ``` -Open [KoalaDemo.xcworkspace](./KoalaDemo/KoalaDemo.xcworkspace) and run the demo. +Open [KoalaDemo.xcodeproj](./KoalaDemo/KoalaDemo.xcodeproj) and run the demo. diff --git a/lib/ios/PvKoala.xcframework/ios-arm64/PvKoala.framework/PvKoala b/lib/ios/PvKoala.xcframework/ios-arm64/PvKoala.framework/PvKoala index 753ffae..442b119 100755 Binary files a/lib/ios/PvKoala.xcframework/ios-arm64/PvKoala.framework/PvKoala and b/lib/ios/PvKoala.xcframework/ios-arm64/PvKoala.framework/PvKoala differ diff --git a/lib/ios/PvKoala.xcframework/ios-arm64_x86_64-simulator/PvKoala.framework/PvKoala b/lib/ios/PvKoala.xcframework/ios-arm64_x86_64-simulator/PvKoala.framework/PvKoala index 53b0ce9..d8bb867 100755 Binary files a/lib/ios/PvKoala.xcframework/ios-arm64_x86_64-simulator/PvKoala.framework/PvKoala and b/lib/ios/PvKoala.xcframework/ios-arm64_x86_64-simulator/PvKoala.framework/PvKoala differ diff --git a/resources/.lint/spell-check/dict.txt b/resources/.lint/spell-check/dict.txt index aa23396..bbfc184 100644 --- a/resources/.lint/spell-check/dict.txt +++ b/resources/.lint/spell-check/dict.txt @@ -44,5 +44,7 @@ styleable testapp wargv wchars +xcframework +xcodeproj xcuitest xcworkspace