diff --git a/.github/workflows/ios-browserstack.yml b/.github/workflows/ios-browserstack.yml index 700aca7..f0724b0 100644 --- a/.github/workflows/ios-browserstack.yml +++ b/.github/workflows/ios-browserstack.yml @@ -35,18 +35,12 @@ jobs: - run: pip3 install requests - - name: Install Cocoapods - run: gem install cocoapods - - name: Make build dir run: mkdir ddp - name: Copy test_resources run: ./copy_test_resources.sh - - name: Run Cocoapods - run: pod install - - name: Inject AccessKey run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:' FalconAppTestUITests/FalconAppTestUITests.swift @@ -54,7 +48,7 @@ jobs: - name: XCode Build run: xcrun xcodebuild build-for-testing -configuration Debug - -workspace FalconAppTest.xcworkspace + -project FalconAppTest.xcodeproj -sdk iphoneos -scheme FalconAppTest -derivedDataPath ddp diff --git a/.github/workflows/ios-demos.yml b/.github/workflows/ios-demos.yml index d1326c5..5a1ea44 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 FalconDemo.xcworkspace + -project FalconDemo.xcodeproj -sdk iphoneos -scheme FalconDemo -derivedDataPath ddp diff --git a/.github/workflows/ios-perf.yml b/.github/workflows/ios-perf.yml index 3fb9722..5874b0b 100644 --- a/.github/workflows/ios-perf.yml +++ b/.github/workflows/ios-perf.yml @@ -42,18 +42,12 @@ jobs: - run: pip3 install requests - - name: Install Cocoapods - run: gem install cocoapods - - name: Make build dir run: mkdir ddp - name: Copy test_resources run: ./copy_test_resources.sh - - 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 @@ -70,7 +64,7 @@ jobs: - name: XCode Build run: xcrun xcodebuild build-for-testing -configuration Debug - -workspace FalconAppTest.xcworkspace + -project FalconAppTest.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 6fecd5f..b3e6a2d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "demo/c/pvrecorder"] path = demo/c/pvrecorder - url = ../../Picovoice/pvrecorder.git + url = https://github.com/Picovoice/pvrecorder.git [submodule "demo/c/dr_libs"] path = demo/c/dr_libs - url = ../../mackron/dr_libs.git + url = https://github.com/mackron/dr_libs.git diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..4a3c522 --- /dev/null +++ b/Package.swift @@ -0,0 +1,36 @@ +// swift-tools-version:5.3 +import PackageDescription +let package = Package( + name: "Falcon-iOS", + platforms: [ + .iOS(.v13) + ], + products: [ + .library( + name: "Falcon", + targets: ["Falcon"] + ) + ], + targets: [ + .binaryTarget( + name: "PvFalcon", + path: "lib/ios/PvFalcon.xcframework" + ), + .target( + name: "Falcon", + dependencies: ["PvFalcon"], + path: ".", + exclude: [ + "binding/ios/FalconAppTest", + "demo" + ], + sources: [ + "binding/ios/Falcon.swift", + "binding/ios/FalconErrors.swift" + ], + resources: [ + .copy("lib/common/falcon_params.pv") + ] + ) + ] +) diff --git a/binding/ios/Falcon-iOS.podspec b/binding/ios/Falcon-iOS.podspec index de0fce5..e99548e 100644 --- a/binding/ios/Falcon-iOS.podspec +++ b/binding/ios/Falcon-iOS.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'Falcon-iOS' s.module_name = 'Falcon' - s.version = '1.0.0' + s.version = '1.0.1' s.license = {:type => 'Apache 2.0'} s.summary = 'iOS SDK for Picovoice\'s Falcon speaker diarization engine.' s.description = @@ -12,11 +12,15 @@ Pod::Spec.new do |s| DESC s.homepage = 'https://github.com/Picovoice/falcon/tree/main/binding/ios' s.author = { 'Picovoice' => 'hello@picovoice.ai' } - s.source = { :git => "https://github.com/Picovoice/falcon.git", :tag => "Falcon-iOS-v1.0.0" } + s.source = { :git => "https://github.com/Picovoice/falcon.git", :tag => s.version.to_s } s.ios.deployment_target = '13.0' s.swift_version = '5.0' s.vendored_frameworks = 'lib/ios/PvFalcon.xcframework' - s.resources = 'lib/common/falcon_params.pv' + s.resource_bundles = { + 'FalconResources' => [ + 'lib/common/falcon_params.pv' + ] + } s.source_files = 'binding/ios/*.{swift}' s.exclude_files = 'binding/ios/FalconTestApp/**' end diff --git a/binding/ios/Falcon.swift b/binding/ios/Falcon.swift index f9d550a..ac8907b 100644 --- a/binding/ios/Falcon.swift +++ b/binding/ios/Falcon.swift @@ -39,6 +39,32 @@ public struct FalconSegment { /// iOS binding for Falcon speaker diarization engine. Provides a Swift interface to the Falcon library. public class Falcon { + +#if SWIFT_PACKAGE + + static let resourceBundle = Bundle.module + +#else + + static let resourceBundle: Bundle = { + let myBundle = Bundle(for: Falcon.self) + + guard let resourceBundleURL = myBundle.url( + forResource: "FalconResources", withExtension: "bundle") + else { + fatalError("FalconResources.bundle not found") + } + + guard let resourceBundle = Bundle(url: resourceBundleURL) + else { + fatalError("Could not open FalconResources.bundle") + } + + return resourceBundle + }() + +#endif + private static let supportedAudioTypes: Set = [ "3gp", "flac", @@ -75,13 +101,10 @@ public class Falcon { } var modelPathArg = modelPath - - if modelPath == nil { - let bundle = Bundle(for: type(of: self)) - - modelPathArg = bundle.path(forResource: "falcon_params", ofType: "pv") + if modelPathArg == nil { + modelPathArg = Falcon.resourceBundle.path(forResource: "falcon_params", ofType: "pv") if modelPathArg == nil { - throw FalconIOError("Could not retrieve default model from app bundle") + throw FalconIOError("Could not find default model file in app bundle.") } } diff --git a/binding/ios/FalconAppTest/FalconAppTest.xcodeproj/project.pbxproj b/binding/ios/FalconAppTest/FalconAppTest.xcodeproj/project.pbxproj index 3b31b67..e118044 100644 --- a/binding/ios/FalconAppTest/FalconAppTest.xcodeproj/project.pbxproj +++ b/binding/ios/FalconAppTest/FalconAppTest.xcodeproj/project.pbxproj @@ -7,7 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 0BDFC0A822E9A2F6228E92A8 /* BuildFile in Frameworks */ = {isa = PBXBuildFile; }; + 0BDFC0A822E9A2F6228E92A8 /* (null) in Frameworks */ = {isa = PBXBuildFile; }; 1E00651627CFEF00006FF6E9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E00651527CFEF00006FF6E9 /* AppDelegate.swift */; }; 1E00651A27CFEF00006FF6E9 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E00651927CFEF00006FF6E9 /* ViewController.swift */; }; 1E00651D27CFEF00006FF6E9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1E00651B27CFEF00006FF6E9 /* Main.storyboard */; }; @@ -16,10 +16,10 @@ 1E00653727CFEF02006FF6E9 /* FalconAppTestUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E00653627CFEF02006FF6E9 /* FalconAppTestUITests.swift */; }; 1E5B7B1A2800E2B200F8BDDB /* PerformanceTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E5B7B192800E2B200F8BDDB /* PerformanceTest.swift */; }; 1E5B7B1E2800E2DA00F8BDDB /* test.wav in Resources */ = {isa = PBXBuildFile; fileRef = 1E5B7B1D2800E2DA00F8BDDB /* test.wav */; }; - 43BA5215E3082819E42E3068 /* libPods-FalconAppTestUITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A1D724DE51E91146A45DC4D /* libPods-FalconAppTestUITests.a */; }; - 43FE79A49DD0581ED9C62EF9 /* libPods-FalconAppTest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 68570F666E1695DFB4659060 /* libPods-FalconAppTest.a */; }; - 64DB20CA9E8547C32CB210F6 /* libPods-PerformanceTest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 60F17AEF70BAD2BD9481BBA2 /* libPods-PerformanceTest.a */; }; C7C8601229CBA3A300EB6E87 /* test_resources in Resources */ = {isa = PBXBuildFile; fileRef = C7C8601129CBA3A300EB6E87 /* test_resources */; }; + E1CF9E262CFA65F5004BA9A9 /* Falcon in Frameworks */ = {isa = PBXBuildFile; productRef = E1CF9E252CFA65F5004BA9A9 /* Falcon */; }; + E1CF9E282CFA65F9004BA9A9 /* Falcon in Frameworks */ = {isa = PBXBuildFile; productRef = E1CF9E272CFA65F9004BA9A9 /* Falcon */; }; + E1CF9E2A2CFA65FD004BA9A9 /* Falcon in Frameworks */ = {isa = PBXBuildFile; productRef = E1CF9E292CFA65FD004BA9A9 /* Falcon */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -55,15 +55,6 @@ 1E5B7B1B2800E2C500F8BDDB /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 1E5B7B1D2800E2DA00F8BDDB /* test.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = test.wav; path = ../../../../resources/audio_samples/test.wav; sourceTree = ""; }; 1E5B7B1F2800E2E300F8BDDB /* falcon_params.pv */ = {isa = PBXFileReference; lastKnownFileType = file; name = falcon_params.pv; path = ../../../../lib/common/falcon_params.pv; sourceTree = ""; }; - 22D92E6E58A9CB8D127AC856 /* Pods-FalconAppTest.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FalconAppTest.release.xcconfig"; path = "Target Support Files/Pods-FalconAppTest/Pods-FalconAppTest.release.xcconfig"; sourceTree = ""; }; - 60F17AEF70BAD2BD9481BBA2 /* libPods-PerformanceTest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-PerformanceTest.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 68570F666E1695DFB4659060 /* libPods-FalconAppTest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FalconAppTest.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 7B6EF088A15854942D133515 /* 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 = ""; }; - 7CD6CD38A971C75F43DA7C65 /* Pods-FalconAppTestUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FalconAppTestUITests.release.xcconfig"; path = "Target Support Files/Pods-FalconAppTestUITests/Pods-FalconAppTestUITests.release.xcconfig"; sourceTree = ""; }; - 8CC29DC2C8EEA2E02313E3CE /* Pods-FalconAppTest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FalconAppTest.debug.xcconfig"; path = "Target Support Files/Pods-FalconAppTest/Pods-FalconAppTest.debug.xcconfig"; sourceTree = ""; }; - 9A1D724DE51E91146A45DC4D /* libPods-FalconAppTestUITests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FalconAppTestUITests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - A4D77AE6DF2F1B3CE8D58A7C /* 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 = ""; }; - B55F99B23072BB0B53E10F7E /* Pods-FalconAppTestUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FalconAppTestUITests.debug.xcconfig"; path = "Target Support Files/Pods-FalconAppTestUITests/Pods-FalconAppTestUITests.debug.xcconfig"; sourceTree = ""; }; C7C8601129CBA3A300EB6E87 /* test_resources */ = {isa = PBXFileReference; lastKnownFileType = folder; path = test_resources; sourceTree = ""; }; /* End PBXFileReference section */ @@ -72,7 +63,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 43FE79A49DD0581ED9C62EF9 /* libPods-FalconAppTest.a in Frameworks */, + E1CF9E262CFA65F5004BA9A9 /* Falcon in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -80,8 +71,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0BDFC0A822E9A2F6228E92A8 /* BuildFile in Frameworks */, - 43BA5215E3082819E42E3068 /* libPods-FalconAppTestUITests.a in Frameworks */, + 0BDFC0A822E9A2F6228E92A8 /* (null) in Frameworks */, + E1CF9E282CFA65F9004BA9A9 /* Falcon in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -89,7 +80,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 64DB20CA9E8547C32CB210F6 /* libPods-PerformanceTest.a in Frameworks */, + E1CF9E2A2CFA65FD004BA9A9 /* Falcon in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -102,9 +93,8 @@ 1E5B7B182800E2A100F8BDDB /* PerformanceTest */, 1E00651427CFEF00006FF6E9 /* FalconAppTest */, 1E00653527CFEF02006FF6E9 /* FalconAppTestUITests */, + E1CF9E242CFA65F5004BA9A9 /* Frameworks */, 1E00651327CFEF00006FF6E9 /* Products */, - 7F107A0FFAA38E2C00DE9330 /* Pods */, - CEE4AEA69454A6E583EE868B /* Frameworks */, ); sourceTree = ""; }; @@ -152,26 +142,9 @@ path = PerformanceTest; sourceTree = ""; }; - 7F107A0FFAA38E2C00DE9330 /* Pods */ = { + E1CF9E242CFA65F5004BA9A9 /* Frameworks */ = { isa = PBXGroup; children = ( - 8CC29DC2C8EEA2E02313E3CE /* Pods-FalconAppTest.debug.xcconfig */, - 22D92E6E58A9CB8D127AC856 /* Pods-FalconAppTest.release.xcconfig */, - B55F99B23072BB0B53E10F7E /* Pods-FalconAppTestUITests.debug.xcconfig */, - 7CD6CD38A971C75F43DA7C65 /* Pods-FalconAppTestUITests.release.xcconfig */, - 7B6EF088A15854942D133515 /* Pods-PerformanceTest.debug.xcconfig */, - A4D77AE6DF2F1B3CE8D58A7C /* Pods-PerformanceTest.release.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; - CEE4AEA69454A6E583EE868B /* Frameworks */ = { - isa = PBXGroup; - children = ( - 68570F666E1695DFB4659060 /* libPods-FalconAppTest.a */, - 9A1D724DE51E91146A45DC4D /* libPods-FalconAppTestUITests.a */, - 60F17AEF70BAD2BD9481BBA2 /* libPods-PerformanceTest.a */, ); name = Frameworks; sourceTree = ""; @@ -183,12 +156,9 @@ isa = PBXNativeTarget; buildConfigurationList = 1E00653C27CFEF02006FF6E9 /* Build configuration list for PBXNativeTarget "FalconAppTest" */; buildPhases = ( - 34CD95D941A8673474CE8B22 /* [CP] Check Pods Manifest.lock */, 1E00650E27CFEF00006FF6E9 /* Sources */, 1E00650F27CFEF00006FF6E9 /* Frameworks */, 1E00651027CFEF00006FF6E9 /* Resources */, - D105CA2C290337FA0E732DC7 /* [CP] Embed Pods Frameworks */, - 13158B894EF82D8A77AD626E /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -203,12 +173,9 @@ isa = PBXNativeTarget; buildConfigurationList = 1E00654227CFEF02006FF6E9 /* Build configuration list for PBXNativeTarget "FalconAppTestUITests" */; buildPhases = ( - 48DADE3F620835A5CF8D17E8 /* [CP] Check Pods Manifest.lock */, 1E00652E27CFEF02006FF6E9 /* Sources */, 1E00652F27CFEF02006FF6E9 /* Frameworks */, 1E00653027CFEF02006FF6E9 /* Resources */, - A783BF8E6EF8B702FBEB11B3 /* [CP] Embed Pods Frameworks */, - 2090E4B89248C71BD11D3B31 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -224,12 +191,9 @@ isa = PBXNativeTarget; buildConfigurationList = 1E5B7B142800E21D00F8BDDB /* Build configuration list for PBXNativeTarget "PerformanceTest" */; buildPhases = ( - 0D53AB14AD24B3C9DAE0A480 /* [CP] Check Pods Manifest.lock */, 1E5B7B0C2800E21D00F8BDDB /* Sources */, 1E5B7B0E2800E21D00F8BDDB /* Frameworks */, 1E5B7B102800E21D00F8BDDB /* Resources */, - FFE0BBD462CDB58A76751BAD /* [CP] Embed Pods Frameworks */, - 5857DA943FDB35891A771F88 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -272,6 +236,9 @@ Base, ); mainGroup = 1E00650927CFEF00006FF6E9; + packageReferences = ( + E1F352F52D00D7960069B0E6 /* XCRemoteSwiftPackageReference "falcon" */, + ); productRefGroup = 1E00651327CFEF00006FF6E9 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -312,177 +279,6 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 0D53AB14AD24B3C9DAE0A480 /* [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; - }; - 13158B894EF82D8A77AD626E /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-FalconAppTest/Pods-FalconAppTest-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-FalconAppTest/Pods-FalconAppTest-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FalconAppTest/Pods-FalconAppTest-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 2090E4B89248C71BD11D3B31 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-FalconAppTestUITests/Pods-FalconAppTestUITests-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-FalconAppTestUITests/Pods-FalconAppTestUITests-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FalconAppTestUITests/Pods-FalconAppTestUITests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 34CD95D941A8673474CE8B22 /* [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-FalconAppTest-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; - }; - 48DADE3F620835A5CF8D17E8 /* [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-FalconAppTestUITests-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; - }; - 5857DA943FDB35891A771F88 /* [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; - }; - A783BF8E6EF8B702FBEB11B3 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-FalconAppTestUITests/Pods-FalconAppTestUITests-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-FalconAppTestUITests/Pods-FalconAppTestUITests-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FalconAppTestUITests/Pods-FalconAppTestUITests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - D105CA2C290337FA0E732DC7 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-FalconAppTest/Pods-FalconAppTest-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-FalconAppTest/Pods-FalconAppTest-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FalconAppTest/Pods-FalconAppTest-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - FFE0BBD462CDB58A76751BAD /* [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; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 1E00650E27CFEF00006FF6E9 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -660,7 +456,6 @@ }; 1E00653D27CFEF02006FF6E9 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8CC29DC2C8EEA2E02313E3CE /* Pods-FalconAppTest.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -692,7 +487,6 @@ }; 1E00653E27CFEF02006FF6E9 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 22D92E6E58A9CB8D127AC856 /* Pods-FalconAppTest.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -724,7 +518,6 @@ }; 1E00654327CFEF02006FF6E9 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B55F99B23072BB0B53E10F7E /* Pods-FalconAppTestUITests.debug.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; @@ -748,7 +541,6 @@ }; 1E00654427CFEF02006FF6E9 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7CD6CD38A971C75F43DA7C65 /* Pods-FalconAppTestUITests.release.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; @@ -772,7 +564,6 @@ }; 1E5B7B152800E21D00F8BDDB /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7B6EF088A15854942D133515 /* Pods-PerformanceTest.debug.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; @@ -796,7 +587,6 @@ }; 1E5B7B162800E21D00F8BDDB /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A4D77AE6DF2F1B3CE8D58A7C /* Pods-PerformanceTest.release.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; @@ -858,6 +648,42 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + E1CF9E232CFA65D0004BA9A9 /* XCLocalSwiftPackageReference "../../../../falcon" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = ../../../../falcon; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCRemoteSwiftPackageReference section */ + E1F352F52D00D7960069B0E6 /* XCRemoteSwiftPackageReference "falcon" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/Picovoice/falcon"; + requirement = { + kind = exactVersion; + version = 1.0.1; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + E1CF9E252CFA65F5004BA9A9 /* Falcon */ = { + isa = XCSwiftPackageProductDependency; + package = E1CF9E232CFA65D0004BA9A9 /* XCLocalSwiftPackageReference "../../../../falcon" */; + productName = Falcon; + }; + E1CF9E272CFA65F9004BA9A9 /* Falcon */ = { + isa = XCSwiftPackageProductDependency; + package = E1CF9E232CFA65D0004BA9A9 /* XCLocalSwiftPackageReference "../../../../falcon" */; + productName = Falcon; + }; + E1CF9E292CFA65FD004BA9A9 /* Falcon */ = { + isa = XCSwiftPackageProductDependency; + package = E1CF9E232CFA65D0004BA9A9 /* XCLocalSwiftPackageReference "../../../../falcon" */; + productName = Falcon; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 1E00650A27CFEF00006FF6E9 /* Project object */; } diff --git a/binding/ios/FalconAppTest/FalconAppTest.xcworkspace/contents.xcworkspacedata b/binding/ios/FalconAppTest/FalconAppTest.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 167b313..0000000 --- a/binding/ios/FalconAppTest/FalconAppTest.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/binding/ios/FalconAppTest/FalconAppTest.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/binding/ios/FalconAppTest/FalconAppTest.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/binding/ios/FalconAppTest/FalconAppTest.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/binding/ios/FalconAppTest/Podfile b/binding/ios/FalconAppTest/Podfile deleted file mode 100644 index c6c4bda..0000000 --- a/binding/ios/FalconAppTest/Podfile +++ /dev/null @@ -1,14 +0,0 @@ -source 'https://cdn.cocoapods.org/' -platform :ios, '13.0' - -target 'FalconAppTest' do - pod 'Falcon-iOS', :podspec => 'https://raw.githubusercontent.com/Picovoice/falcon/falcon-ios/binding/ios/Falcon-iOS.podspec' -end - -target 'FalconAppTestUITests' do - pod 'Falcon-iOS', :podspec => 'https://raw.githubusercontent.com/Picovoice/falcon/falcon-ios/binding/ios/Falcon-iOS.podspec' -end - -target 'PerformanceTest' do - pod 'Falcon-iOS', :podspec => 'https://raw.githubusercontent.com/Picovoice/falcon/falcon-ios/binding/ios/Falcon-iOS.podspec' -end diff --git a/binding/ios/FalconAppTest/Podfile.lock b/binding/ios/FalconAppTest/Podfile.lock deleted file mode 100644 index 86dc949..0000000 --- a/binding/ios/FalconAppTest/Podfile.lock +++ /dev/null @@ -1,21 +0,0 @@ -PODS: - - Falcon-iOS (1.0.0) - -DEPENDENCIES: - - Falcon-iOS (from `https://raw.githubusercontent.com/Picovoice/falcon/falcon-ios/binding/ios/Falcon-iOS.podspec`) - -EXTERNAL SOURCES: - Falcon-iOS: - :podspec: https://raw.githubusercontent.com/Picovoice/falcon/falcon-ios/binding/ios/Falcon-iOS.podspec - -CHECKOUT OPTIONS: - Falcon-iOS: - :commit: 370e65dc3e542c99a6e72546883a937b443322ea - :git: https://github.com/Picovoice/falcon.git - -SPEC CHECKSUMS: - Falcon-iOS: 25c9fae01f2d395ba6d4dc8744fedb5275a20af2 - -PODFILE CHECKSUM: 6f1b6336202fa03a7de412cb08ac53bb247a2369 - -COCOAPODS: 1.16.2 diff --git a/binding/ios/FalconErrors.swift b/binding/ios/FalconErrors.swift index 4a8e864..27d37ca 100644 --- a/binding/ios/FalconErrors.swift +++ b/binding/ios/FalconErrors.swift @@ -7,6 +7,8 @@ // specific language governing permissions and limitations under the License. // +import Foundation + public class FalconError: LocalizedError { private let message: String private let messageStack: [String] diff --git a/binding/ios/README.md b/binding/ios/README.md index 075d011..d78ebb4 100644 --- a/binding/ios/README.md +++ b/binding/ios/README.md @@ -18,8 +18,15 @@ Falcon is an on-device speaker diarization engine. Falcon is: ## Installation -The Falcon iOS binding is available via [CocoaPods](https://cocoapods.org/pods/Falcon-iOS). To import it into your iOS project, add the following line to your Podfile: +The Falcon iOS binding is available via [Swift Package Manager](https://www.swift.org/documentation/package-manager/) or [CocoaPods](https://cocoapods.org/pods/Falcon-iOS). + +To import the package using SPM, open up your project's Package Dependencies in XCode and add: +``` +https://github.com/Picovoice/falcon.git +``` +To import it into your iOS project using CocoaPods, add the following line to your Podfile: + ```ruby pod 'Falcon-iOS' ``` @@ -68,7 +75,7 @@ Replace `${ACCESS_KEY}` with yours obtained from [Picovoice Console](https://con ## Running Unit Tests -Copy your `AccessKey` into the `accessKey` variable in [`FalconAppTestUITests.swift`](FalconAppTest/FalconAppTestUITests/FalconAppTestUITests.swift). Open `FalconAppTest.xcworkspace` with XCode and run the tests with `Product > Test`. +Copy your `AccessKey` into the `accessKey` variable in [`FalconAppTestUITests.swift`](FalconAppTest/FalconAppTestUITests/FalconAppTestUITests.swift). Open [`FalconRhinoAppTest.xcodeproj`](FalconAppTest/FalconAppTest.xcodeproj) with XCode and run the tests with `Product > Test`. ## Demo App diff --git a/demo/ios/FalconDemo/FalconDemo.xcodeproj/project.pbxproj b/demo/ios/FalconDemo/FalconDemo.xcodeproj/project.pbxproj index 190e3e7..fabc5c3 100644 --- a/demo/ios/FalconDemo/FalconDemo.xcodeproj/project.pbxproj +++ b/demo/ios/FalconDemo/FalconDemo.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -11,19 +11,17 @@ 3276967434C9CEBD0AF09237 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 327694975368499C3B7946DD /* Assets.xcassets */; }; 327698EADFD16D8F70823520 /* FalconDemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 327697358B823E5B2EF0FA8C /* FalconDemoApp.swift */; }; 32769B2E1B2C5A2A897FFB10 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32769F3923C69C8C0C435CCF /* ContentView.swift */; }; - 467D8E38BB3521519FB3E678 /* libPods-FalconDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FA58F77E1B131740569D44F3 /* libPods-FalconDemo.a */; }; + E1CF9E2D2CFA698C004BA9A9 /* Falcon in Frameworks */ = {isa = PBXBuildFile; productRef = E1CF9E2C2CFA698C004BA9A9 /* Falcon */; }; + E1F352F82D00D81A0069B0E6 /* Falcon in Frameworks */ = {isa = PBXBuildFile; productRef = E1F352F72D00D81A0069B0E6 /* Falcon */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 1449455E6EE77D08E73952D5 /* Pods-FalconDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FalconDemo.release.xcconfig"; path = "Target Support Files/Pods-FalconDemo/Pods-FalconDemo.release.xcconfig"; sourceTree = ""; }; 327694975368499C3B7946DD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 327695EA9D71F6A29C6D079A /* ViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewModel.swift; sourceTree = ""; }; 327697358B823E5B2EF0FA8C /* FalconDemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FalconDemoApp.swift; sourceTree = ""; }; 327699927E572962C40A7A04 /* FalconDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FalconDemo.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 = ""; }; - B6FB75AA0D3B7FBE121325BC /* Pods-FalconDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FalconDemo.debug.xcconfig"; path = "Target Support Files/Pods-FalconDemo/Pods-FalconDemo.debug.xcconfig"; sourceTree = ""; }; - FA58F77E1B131740569D44F3 /* libPods-FalconDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FalconDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -31,7 +29,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 467D8E38BB3521519FB3E678 /* libPods-FalconDemo.a in Frameworks */, + E1CF9E2D2CFA698C004BA9A9 /* Falcon in Frameworks */, + E1F352F82D00D81A0069B0E6 /* Falcon in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -43,8 +42,6 @@ children = ( 32769B87809678D96B1C6C55 /* Products */, 32769C17C8FD0599F872D3D1 /* FalconDemo */, - B33A5E35B83D1A4F9DED308C /* Frameworks */, - 77A75FFA94942AD5A249D70D /* Pods */, ); sourceTree = ""; }; @@ -68,23 +65,6 @@ path = FalconDemo; sourceTree = ""; }; - 77A75FFA94942AD5A249D70D /* Pods */ = { - isa = PBXGroup; - children = ( - B6FB75AA0D3B7FBE121325BC /* Pods-FalconDemo.debug.xcconfig */, - 1449455E6EE77D08E73952D5 /* Pods-FalconDemo.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; - B33A5E35B83D1A4F9DED308C /* Frameworks */ = { - isa = PBXGroup; - children = ( - FA58F77E1B131740569D44F3 /* libPods-FalconDemo.a */, - ); - name = Frameworks; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -92,12 +72,9 @@ isa = PBXNativeTarget; buildConfigurationList = 32769440EBAF1B96C25C64E5 /* Build configuration list for PBXNativeTarget "FalconDemo" */; buildPhases = ( - C840BDAD8FD210974A550955 /* [CP] Check Pods Manifest.lock */, 32769E8C15D0D566DE02D742 /* Sources */, 32769FD78B69EE3D028A9BD8 /* Frameworks */, 327698D80053ADD919041906 /* Resources */, - 7585D986E68559590C0FC8E7 /* [CP] Embed Pods Frameworks */, - C51691C8D18CE69EE82647B3 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -131,6 +108,9 @@ en, ); mainGroup = 327692BCE8C735F3534C318E; + packageReferences = ( + E1F352F62D00D81A0069B0E6 /* XCRemoteSwiftPackageReference "falcon" */, + ); productRefGroup = 32769B87809678D96B1C6C55 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -151,67 +131,6 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 7585D986E68559590C0FC8E7 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-FalconDemo/Pods-FalconDemo-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/Falcon-iOS/PvFalcon.framework/PvFalcon", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PvFalcon.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FalconDemo/Pods-FalconDemo-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - C51691C8D18CE69EE82647B3 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-FalconDemo/Pods-FalconDemo-resources.sh", - "${PODS_ROOT}/Falcon-iOS/lib/common/falcon_params.pv", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/falcon_params.pv", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FalconDemo/Pods-FalconDemo-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - C840BDAD8FD210974A550955 /* [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-FalconDemo-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; @@ -277,15 +196,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 = B6FB75AA0D3B7FBE121325BC /* Pods-FalconDemo.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -301,7 +220,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.FalconDemo; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -313,7 +235,6 @@ }; 327698DB666EFBD22F7AB2D5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1449455E6EE77D08E73952D5 /* Pods-FalconDemo.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -329,7 +250,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.FalconDemo; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -425,6 +349,29 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + E1F352F62D00D81A0069B0E6 /* XCRemoteSwiftPackageReference "falcon" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/Picovoice/falcon"; + requirement = { + kind = exactVersion; + version = 1.0.1; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + E1CF9E2C2CFA698C004BA9A9 /* Falcon */ = { + isa = XCSwiftPackageProductDependency; + productName = Falcon; + }; + E1F352F72D00D81A0069B0E6 /* Falcon */ = { + isa = XCSwiftPackageProductDependency; + package = E1F352F62D00D81A0069B0E6 /* XCRemoteSwiftPackageReference "falcon" */; + productName = Falcon; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 32769964E3C57B4A4BE3CC9E /* Project object */; } diff --git a/demo/ios/FalconDemo/FalconDemo.xcworkspace/contents.xcworkspacedata b/demo/ios/FalconDemo/FalconDemo.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 6be886b..0000000 --- a/demo/ios/FalconDemo/FalconDemo.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/demo/ios/FalconDemo/FalconDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/demo/ios/FalconDemo/FalconDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/demo/ios/FalconDemo/FalconDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/demo/ios/FalconDemo/Podfile b/demo/ios/FalconDemo/Podfile deleted file mode 100644 index 3d6906b..0000000 --- a/demo/ios/FalconDemo/Podfile +++ /dev/null @@ -1,6 +0,0 @@ -source 'https://cdn.cocoapods.org/' -platform :ios, '13.0' - -target 'FalconDemo' do - pod 'Falcon-iOS', '~> 1.0.0' -end diff --git a/demo/ios/FalconDemo/Podfile.lock b/demo/ios/FalconDemo/Podfile.lock deleted file mode 100644 index de634b1..0000000 --- a/demo/ios/FalconDemo/Podfile.lock +++ /dev/null @@ -1,16 +0,0 @@ -PODS: - - Falcon-iOS (1.0.0) - -DEPENDENCIES: - - Falcon-iOS (~> 1.0.0) - -SPEC REPOS: - trunk: - - Falcon-iOS - -SPEC CHECKSUMS: - Falcon-iOS: 491c091c677605c9775ba03bb2c80764b7e4929c - -PODFILE CHECKSUM: 626dc8e55116037a8ef8a471e6b24b329d0225e4 - -COCOAPODS: 1.16.2 diff --git a/lib/ios/PvFalcon.xcframework/Info.plist b/lib/ios/PvFalcon.xcframework/Info.plist index 370773b..5d62e79 100644 --- a/lib/ios/PvFalcon.xcframework/Info.plist +++ b/lib/ios/PvFalcon.xcframework/Info.plist @@ -5,6 +5,8 @@ AvailableLibraries + BinaryPath + PvFalcon.framework/PvFalcon LibraryIdentifier ios-arm64_x86_64-simulator LibraryPath @@ -20,6 +22,8 @@ simulator + BinaryPath + PvFalcon.framework/PvFalcon LibraryIdentifier ios-arm64 LibraryPath diff --git a/lib/ios/PvFalcon.xcframework/ios-arm64/PvFalcon.framework/Info.plist b/lib/ios/PvFalcon.xcframework/ios-arm64/PvFalcon.framework/Info.plist index 6629c0c..ee1bd94 100644 Binary files a/lib/ios/PvFalcon.xcframework/ios-arm64/PvFalcon.framework/Info.plist and b/lib/ios/PvFalcon.xcframework/ios-arm64/PvFalcon.framework/Info.plist differ diff --git a/lib/ios/PvFalcon.xcframework/ios-arm64/PvFalcon.framework/PvFalcon b/lib/ios/PvFalcon.xcframework/ios-arm64/PvFalcon.framework/PvFalcon index d73c573..e06fc24 100755 Binary files a/lib/ios/PvFalcon.xcframework/ios-arm64/PvFalcon.framework/PvFalcon and b/lib/ios/PvFalcon.xcframework/ios-arm64/PvFalcon.framework/PvFalcon differ diff --git a/lib/ios/PvFalcon.xcframework/ios-arm64_x86_64-simulator/PvFalcon.framework/Info.plist b/lib/ios/PvFalcon.xcframework/ios-arm64_x86_64-simulator/PvFalcon.framework/Info.plist index 00d2461..893eeba 100644 Binary files a/lib/ios/PvFalcon.xcframework/ios-arm64_x86_64-simulator/PvFalcon.framework/Info.plist and b/lib/ios/PvFalcon.xcframework/ios-arm64_x86_64-simulator/PvFalcon.framework/Info.plist differ diff --git a/lib/ios/PvFalcon.xcframework/ios-arm64_x86_64-simulator/PvFalcon.framework/PvFalcon b/lib/ios/PvFalcon.xcframework/ios-arm64_x86_64-simulator/PvFalcon.framework/PvFalcon index bc8bdb6..18f3de4 100755 Binary files a/lib/ios/PvFalcon.xcframework/ios-arm64_x86_64-simulator/PvFalcon.framework/PvFalcon and b/lib/ios/PvFalcon.xcframework/ios-arm64_x86_64-simulator/PvFalcon.framework/PvFalcon differ diff --git a/resources/.lint/spell-check/dict.txt b/resources/.lint/spell-check/dict.txt index 4506496..c5638f9 100644 --- a/resources/.lint/spell-check/dict.txt +++ b/resources/.lint/spell-check/dict.txt @@ -35,5 +35,7 @@ constraintlayout gradlew notest Podfile +xcframework +xcodeproj xcuitest xcworkspace diff --git a/script/automation/browserstack.py b/script/automation/browserstack.py index 4a8d237..dd5a0d2 100644 --- a/script/automation/browserstack.py +++ b/script/automation/browserstack.py @@ -64,7 +64,8 @@ def main(args: argparse.Namespace) -> None: 'app': app_response_json['app_url'], 'testSuite': test_response_json['test_suite_url'], 'project': args.project_name, - 'devices': devices_dict[args.devices] + 'devices': devices_dict[args.devices], + 'deviceLogs': True } while True: