Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ios bitcode spm #149

Merged
merged 6 commits into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/ios-browserstack.yml
Original file line number Diff line number Diff line change
@@ -36,14 +36,11 @@ 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: Copy test_resources
run: ./copy_test_resources.sh

- name: Inject AccessKey
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
@@ -52,7 +49,7 @@ jobs:
- name: XCode Build
run: xcrun xcodebuild build-for-testing
-configuration Debug
-workspace OctopusAppTest.xcworkspace
-project OctopusAppTest.xcodeproj
-sdk iphoneos
-scheme OctopusAppTest
-derivedDataPath ddp
16 changes: 1 addition & 15 deletions .github/workflows/ios-demos.yml
Original file line number Diff line number Diff line change
@@ -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 OctopusDemo.xcworkspace
-project OctopusDemo.xcodeproj
-sdk iphoneos
-scheme OctopusDemo
-derivedDataPath ddp
11 changes: 4 additions & 7 deletions .github/workflows/ios-perf.yml
Original file line number Diff line number Diff line change
@@ -43,16 +43,13 @@ 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: Copy test_resources
run: ./copy_test_resources.sh

- name: Inject AppID
- name: Inject AccessKey
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
PerformanceTest/PerformanceTest.swift

@@ -73,7 +70,7 @@ jobs:
- name: XCode Build
run: xcrun xcodebuild build-for-testing
-configuration Debug
-workspace OctopusAppTest.xcworkspace
-project OctopusAppTest.xcodeproj
-sdk iphoneos
-scheme PerformanceTest
-derivedDataPath ddp
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.idea
multiple_keywords.idx
.DS_Store
.DS_Store
.build
Package.resolved
.swiftpm
37 changes: 37 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "Octopus-iOS",
platforms: [
.iOS(.v13)
],
products: [
.library(
name: "Octopus",
targets: ["Octopus"]
)
],
targets: [
.binaryTarget(
name: "PvOctopus",
path: "lib/ios/PvOctopus.xcframework"
),
.target(
name: "Octopus",
dependencies: ["PvOctopus"],
path: ".",
exclude: [
"binding/ios/OctopusAppTest",
"demo"
],
sources: [
"binding/ios/Octopus.swift",
"binding/ios/OctopusErrors.swift",
"binding/ios/OctopusMetadata.swift"
],
resources: [
.copy("lib/common/param/octopus_params.pv")
]
)
]
)
10 changes: 7 additions & 3 deletions binding/ios/Octopus-iOS.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = 'Octopus-iOS'
s.module_name = 'Octopus'
s.version = '2.0.0'
s.version = '2.0.1'
s.license = {:type => 'Apache 2.0'}
s.summary = 'iOS binding for Picovoice\'s Octopus Speech-to-Index engine'
s.description =
@@ -12,11 +12,15 @@ Pod::Spec.new do |s|
DESC
s.homepage = 'https://github.com/Picovoice/octopus/tree/master/binding/ios'
s.author = { 'Picovoice' => 'hello@picovoice.ai' }
s.source = { :git => "https://github.com/Picovoice/octopus.git", :tag => "Octopus-iOS-v2.0.0" }
s.source = { :git => "https://github.com/Picovoice/octopus.git", :tag => s.version.to_s }
s.ios.deployment_target = '13.0'
s.swift_version = '5.0'
s.vendored_frameworks = 'lib/ios/PvOctopus.xcframework'
s.resources = 'lib/common/param/octopus_params.pv'
s.resource_bundles = {
'OctopusResources' => [
'lib/common/param/octopus_params.pv'
]
}
s.source_files = 'binding/ios/*.{swift}'
s.exclude_files = 'binding/ios/OctopusTestApp/**'
end
33 changes: 28 additions & 5 deletions binding/ios/Octopus.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2021-2023 Picovoice Inc.
// Copyright 2021-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
@@ -25,6 +25,31 @@ public struct OctopusMatch {
/// iOS binding for Octopus Speech-to-Index engine. It transforms audio into searchable metadata.
public class Octopus {

#if SWIFT_PACKAGE

static let resourceBundle = Bundle.module

#else

static let resourceBundle: Bundle = {
let myBundle = Bundle(for: Octopus.self)

guard let resourceBundleURL = myBundle.url(
forResource: "OctopusResources", withExtension: "bundle")
else {
fatalError("OctopusResources.bundle not found")
}

guard let resourceBundle = Bundle(url: resourceBundleURL)
else {
fatalError("Could not open OctopusResources.bundle")
}

return resourceBundle
}()

#endif

/// Required audio sample rate for PCM data
public static let pcmDataSampleRate = Int(pv_sample_rate())

@@ -50,11 +75,9 @@ public class Octopus {
var modelPathArg = modelPath

if modelPath == nil {
let bundle = Bundle(for: type(of: self))

modelPathArg = bundle.path(forResource: "octopus_params", ofType: "pv")
modelPathArg = Octopus.resourceBundle.path(forResource: "octopus_params", ofType: "pv")
if modelPathArg == nil {
throw OctopusIOError("Could not retrieve default model from app bundle")
throw OctopusIOError("Could not find default model file in app bundle.")
}
}

5 changes: 4 additions & 1 deletion binding/ios/OctopusAppTest/.gitignore
Original file line number Diff line number Diff line change
@@ -17,4 +17,7 @@ build/*
*.pbxuser
xcuserdata
Pods
ddp
ddp

OctopusAppTestUITests/test_resources/*
!OctopusAppTestUITests/test_resources/.gitkeep
359 changes: 110 additions & 249 deletions binding/ios/OctopusAppTest/OctopusAppTest.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -20,7 +20,10 @@ class OctopusAppTestUITests: BaseTest {

func testIndexAndSearchFile() throws {
let bundle = Bundle(for: type(of: self))
let audioFilePath = bundle.path(forResource: "multiple_keywords", ofType: "wav")!
let audioFilePath = bundle.path(
forResource: "multiple_keywords",
ofType: "wav",
inDirectory: "test_resources/audio")!

let octopus = try Octopus(accessKey: accessKey)
let metadata = try octopus.indexAudioFile(path: audioFilePath)
@@ -39,7 +42,10 @@ class OctopusAppTestUITests: BaseTest {

func testIndexAndSearchData() throws {
let bundle = Bundle(for: type(of: self))
let fileURL: URL = bundle.url(forResource: "multiple_keywords", withExtension: "wav")!
let fileURL: URL = bundle.url(
forResource: "multiple_keywords",
withExtension: "wav",
subdirectory: "test_resources/audio")!
let audioData = try Data(contentsOf: fileURL)
var pcm = [Int16](repeating: 0, count: (audioData.count - 44) / 2)
_ = pcm.withUnsafeMutableBytes {
@@ -63,7 +69,10 @@ class OctopusAppTestUITests: BaseTest {

func testMetadataMarshalling() throws {
let bundle = Bundle(for: type(of: self))
let audioFilePath = bundle.path(forResource: "multiple_keywords", ofType: "wav")!
let audioFilePath = bundle.path(
forResource: "multiple_keywords",
ofType: "wav",
inDirectory: "test_resources/audio")!

let octopus = try Octopus(accessKey: accessKey)
var metadata: OctopusMetadata? = try octopus.indexAudioFile(path: audioFilePath)
@@ -90,7 +99,10 @@ class OctopusAppTestUITests: BaseTest {

func testEmptySearchPhrase() throws {
let bundle = Bundle(for: type(of: self))
let audioFilePath = bundle.path(forResource: "multiple_keywords", ofType: "wav")!
let audioFilePath = bundle.path(
forResource: "multiple_keywords",
ofType: "wav",
inDirectory: "test_resources/audio")!

let octopus = try Octopus(accessKey: accessKey)
let metadata = try octopus.indexAudioFile(path: audioFilePath)
@@ -111,7 +123,10 @@ class OctopusAppTestUITests: BaseTest {

func testWhitespaceSearchPhrase() throws {
let bundle = Bundle(for: type(of: self))
let audioFilePath = bundle.path(forResource: "multiple_keywords", ofType: "wav")!
let audioFilePath = bundle.path(
forResource: "multiple_keywords",
ofType: "wav",
inDirectory: "test_resources/audio")!

let octopus = try Octopus(accessKey: accessKey)
let metadata = try octopus.indexAudioFile(path: audioFilePath)
@@ -132,7 +147,10 @@ class OctopusAppTestUITests: BaseTest {

func testNumericSearchPhrase() throws {
let bundle = Bundle(for: type(of: self))
let audioFilePath = bundle.path(forResource: "multiple_keywords", ofType: "wav")!
let audioFilePath = bundle.path(
forResource: "multiple_keywords",
ofType: "wav",
inDirectory: "test_resources/audio")!

let octopus = try Octopus(accessKey: accessKey)
let metadata = try octopus.indexAudioFile(path: audioFilePath)
@@ -153,7 +171,10 @@ class OctopusAppTestUITests: BaseTest {

func testHyphenInSearchPhrase() throws {
let bundle = Bundle(for: type(of: self))
let audioFilePath = bundle.path(forResource: "multiple_keywords", ofType: "wav")!
let audioFilePath = bundle.path(
forResource: "multiple_keywords",
ofType: "wav",
inDirectory: "test_resources/audio")!

let octopus = try Octopus(accessKey: accessKey)
let metadata = try octopus.indexAudioFile(path: audioFilePath)
@@ -174,7 +195,10 @@ class OctopusAppTestUITests: BaseTest {

func testInvalidSearchPhrase() throws {
let bundle = Bundle(for: type(of: self))
let audioFilePath = bundle.path(forResource: "multiple_keywords", ofType: "wav")!
let audioFilePath = bundle.path(
forResource: "multiple_keywords",
ofType: "wav",
inDirectory: "test_resources/audio")!

let octopus = try Octopus(accessKey: accessKey)
let metadata = try octopus.indexAudioFile(path: audioFilePath)
@@ -195,7 +219,10 @@ class OctopusAppTestUITests: BaseTest {

func testSpacesInSearchPhrase() throws {
let bundle = Bundle(for: type(of: self))
let audioFilePath = bundle.path(forResource: "multiple_keywords", ofType: "wav")!
let audioFilePath = bundle.path(
forResource: "multiple_keywords",
ofType: "wav",
inDirectory: "test_resources/audio")!

let octopus = try Octopus(accessKey: accessKey)
let metadata = try octopus.indexAudioFile(path: audioFilePath)
Original file line number Diff line number Diff line change
@@ -33,8 +33,16 @@ class OctopusLanguageTests: BaseTest {

for testCase in OctopusLanguageTests.testData {
let suffix = (testCase[0]) as! String == "en" ? "" : "_\(testCase[0])"
let modelPath = bundle.path(forResource: "octopus_params\(suffix)", ofType: "pv")!
let testAudioPath = bundle.path(forResource: "multiple_keywords\(suffix)", ofType: "wav")!

let testAudioPath = bundle.path(
forResource: "multiple_keywords\(suffix)",
ofType: "wav",
inDirectory: "test_resources/audio")!
let modelPath = bundle.path(
forResource: "octopus_params\(suffix)",
ofType: "pv",
inDirectory: "test_resources/model_files")!

let expectedResults = testCase[1] as! [String: [[Double]]]

try XCTContext.runActivity(named: "(\(testCase[0]))") { _ in
Empty file.
14 changes: 0 additions & 14 deletions binding/ios/OctopusAppTest/Podfile

This file was deleted.

16 changes: 0 additions & 16 deletions binding/ios/OctopusAppTest/Podfile.lock

This file was deleted.

14 changes: 14 additions & 0 deletions binding/ios/OctopusAppTest/copy_test_resources.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
LIB_DIR="../../../lib"
RESOURCE_DIR="../../../res"
ASSETS_DIR="./OctopusAppTestUITests/test_resources"

echo "Creating test resources asset directory"
mkdir -p ${ASSETS_DIR}

echo "Copying test audio samples..."
mkdir -p ${ASSETS_DIR}/audio
cp ${RESOURCE_DIR}/audio/*.wav ${ASSETS_DIR}/audio

echo "Copying test model files..."
mkdir -p ${ASSETS_DIR}/model_files
cp ${LIB_DIR}/common/param/*.pv ${ASSETS_DIR}/model_files
4 changes: 3 additions & 1 deletion binding/ios/OctopusErrors.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
//
// Copyright 2022-2023 Picovoice Inc.
// Copyright 2022-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
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
//

import Foundation

public class OctopusError: LocalizedError {
private let message: String
private let messageStack: [String]
11 changes: 9 additions & 2 deletions binding/ios/README.md
Original file line number Diff line number Diff line change
@@ -14,8 +14,15 @@ hypothesis (e.g. homophones)

## Installation
<!-- markdown-link-check-disable -->
The Octopus iOS binding is available via [Cocoapods](https://cocoapods.org/pods/Octopus-iOS). To import it into your iOS project, add the following line to your Podfile:
The Octopus iOS binding is available via [Swift Package Manager](https://www.swift.org/documentation/package-manager/) or [CocoaPods](https://cocoapods.org/pods/Octopus-iOS).
<!-- markdown-link-check-enable -->

To import the package using SPM, open up your project's Package Dependencies in XCode and add:
```
https://github.com/Picovoice/octopus.git
```
To import it into your iOS project using CocoaPods, add the following line to your Podfile:

```ruby
pod 'Octopus-iOS'
```
@@ -108,4 +115,4 @@ handle.delete();

## Running Unit Tests

Copy your `AccessKey` into the `accessKey` variable in [`OctopusAppTestUITests.swift`](OctopusAppTest/OctopusAppTestUITests/OctopusAppTestUITests.swift). Open `OctopusAppTest.xcworkspace` with XCode and run the tests with `Product > Test`.
Copy your `AccessKey` into the `accessKey` variable in [`OctopusAppTestUITests.swift`](OctopusAppTest/OctopusAppTestUITests/OctopusAppTestUITests.swift). Open [`OctopusAppTest.xcodeproj`](OctopusAppTest/OctopusAppTest.xcodeproj) with XCode and run the tests with `Product > Test`.
132 changes: 43 additions & 89 deletions demo/ios/OctopusDemo/OctopusDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -3,15 +3,18 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
02447A8D26D94F75004A6CE9 /* OctopusDemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02447A8C26D94F75004A6CE9 /* OctopusDemoApp.swift */; };
02447A8F26D94F75004A6CE9 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02447A8E26D94F75004A6CE9 /* ContentView.swift */; };
02447A9126D94F7C004A6CE9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 02447A9026D94F7C004A6CE9 /* Assets.xcassets */; };
AC225D30A2525B57122E3EA8 /* libPods-OctopusDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 296AE0E11E4CD7EF81795CE2 /* libPods-OctopusDemo.a */; };
C76A41602703B17000DB57D6 /* ViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C76A415F2703B17000DB57D6 /* ViewModel.swift */; };
E10DF5192CFE6104008D4AA0 /* Octopus in Frameworks */ = {isa = PBXBuildFile; productRef = E10DF5182CFE6104008D4AA0 /* Octopus */; };
E15A378B2CF7E15700A96F85 /* Octopus in Frameworks */ = {isa = PBXBuildFile; productRef = E15A378A2CF7E15700A96F85 /* Octopus */; };
E15A378E2CF7E1C000A96F85 /* Octopus in Frameworks */ = {isa = PBXBuildFile; productRef = E15A378D2CF7E1C000A96F85 /* Octopus */; };
E1F353042D0105300069B0E6 /* Octopus in Frameworks */ = {isa = PBXBuildFile; productRef = E1F353032D0105300069B0E6 /* Octopus */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
@@ -20,9 +23,6 @@
02447A8E26D94F75004A6CE9 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
02447A9026D94F7C004A6CE9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
02447A9526D94F7C004A6CE9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
04E786B497520913E4659643 /* Pods-OctopusDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OctopusDemo.debug.xcconfig"; path = "Target Support Files/Pods-OctopusDemo/Pods-OctopusDemo.debug.xcconfig"; sourceTree = "<group>"; };
296AE0E11E4CD7EF81795CE2 /* libPods-OctopusDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-OctopusDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; };
52D655E8EB36634981EB5888 /* Pods-OctopusDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OctopusDemo.release.xcconfig"; path = "Target Support Files/Pods-OctopusDemo/Pods-OctopusDemo.release.xcconfig"; sourceTree = "<group>"; };
C76A415F2703B17000DB57D6 /* ViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewModel.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

@@ -31,7 +31,10 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AC225D30A2525B57122E3EA8 /* libPods-OctopusDemo.a in Frameworks */,
E1F353042D0105300069B0E6 /* Octopus in Frameworks */,
E10DF5192CFE6104008D4AA0 /* Octopus in Frameworks */,
E15A378E2CF7E1C000A96F85 /* Octopus in Frameworks */,
E15A378B2CF7E15700A96F85 /* Octopus in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -43,8 +46,6 @@
children = (
02447A8B26D94F75004A6CE9 /* OctopusDemo */,
02447A8A26D94F75004A6CE9 /* Products */,
7983C9752CBB2C0CDEFFB371 /* Pods */,
16ACDC30B9AECAEF966FEDBC /* Frameworks */,
);
sourceTree = "<group>";
};
@@ -68,36 +69,16 @@
path = OctopusDemo;
sourceTree = "<group>";
};
16ACDC30B9AECAEF966FEDBC /* Frameworks */ = {
isa = PBXGroup;
children = (
296AE0E11E4CD7EF81795CE2 /* libPods-OctopusDemo.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
7983C9752CBB2C0CDEFFB371 /* Pods */ = {
isa = PBXGroup;
children = (
04E786B497520913E4659643 /* Pods-OctopusDemo.debug.xcconfig */,
52D655E8EB36634981EB5888 /* Pods-OctopusDemo.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
02447A8826D94F75004A6CE9 /* OctopusDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 02447AAE26D94F7D004A6CE9 /* Build configuration list for PBXNativeTarget "OctopusDemo" */;
buildPhases = (
0573C65CEB54A4BB02C3C891 /* [CP] Check Pods Manifest.lock */,
02447A8526D94F75004A6CE9 /* Sources */,
02447A8626D94F75004A6CE9 /* Frameworks */,
02447A8726D94F75004A6CE9 /* Resources */,
F7C08396E7037F25F0AB6119 /* [CP] Embed Pods Frameworks */,
9930A78981D8A8E0A964A124 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -131,6 +112,9 @@
Base,
);
mainGroup = 02447A8026D94F74004A6CE9;
packageReferences = (
E1F353022D0105300069B0E6 /* XCRemoteSwiftPackageReference "octopus" */,
);
productRefGroup = 02447A8A26D94F75004A6CE9 /* Products */;
projectDirPath = "";
projectRoot = "";
@@ -151,65 +135,6 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
0573C65CEB54A4BB02C3C891 /* [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-OctopusDemo-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;
};
9930A78981D8A8E0A964A124 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-OctopusDemo/Pods-OctopusDemo-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-OctopusDemo/Pods-OctopusDemo-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-OctopusDemo/Pods-OctopusDemo-resources.sh\"\n";
showEnvVarsInLog = 0;
};
F7C08396E7037F25F0AB6119 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-OctopusDemo/Pods-OctopusDemo-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-OctopusDemo/Pods-OctopusDemo-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-OctopusDemo/Pods-OctopusDemo-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
02447A8526D94F75004A6CE9 /* Sources */ = {
isa = PBXSourcesBuildPhase;
@@ -342,7 +267,6 @@
};
02447AAF26D94F7D004A6CE9 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 04E786B497520913E4659643 /* Pods-OctopusDemo.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
@@ -365,7 +289,6 @@
};
02447AB026D94F7D004A6CE9 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 52D655E8EB36634981EB5888 /* Pods-OctopusDemo.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
@@ -408,6 +331,37 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
E1F353022D0105300069B0E6 /* XCRemoteSwiftPackageReference "octopus" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/Picovoice/octopus/";
requirement = {
kind = exactVersion;
version = 2.0.1;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
E10DF5182CFE6104008D4AA0 /* Octopus */ = {
isa = XCSwiftPackageProductDependency;
productName = Octopus;
};
E15A378A2CF7E15700A96F85 /* Octopus */ = {
isa = XCSwiftPackageProductDependency;
productName = Octopus;
};
E15A378D2CF7E1C000A96F85 /* Octopus */ = {
isa = XCSwiftPackageProductDependency;
productName = Octopus;
};
E1F353032D0105300069B0E6 /* Octopus */ = {
isa = XCSwiftPackageProductDependency;
package = E1F353022D0105300069B0E6 /* XCRemoteSwiftPackageReference "octopus" */;
productName = Octopus;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 02447A8126D94F74004A6CE9 /* Project object */;
}

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions demo/ios/OctopusDemo/OctopusDemo/ViewModel.swift
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@
import AVFoundation
import Foundation
import Octopus
import UIKit

enum UIState {
case INTRO
6 changes: 0 additions & 6 deletions demo/ios/OctopusDemo/Podfile

This file was deleted.

16 changes: 0 additions & 16 deletions demo/ios/OctopusDemo/Podfile.lock

This file was deleted.

8 changes: 2 additions & 6 deletions demo/ios/README.md
Original file line number Diff line number Diff line change
@@ -8,14 +8,10 @@ Signup or Login to [Picovoice Console](https://console.picovoice.ai/) to get you

## Setup

1. Before building the demo app, run the following from this directory to install the Octopus CocoaPod:
```console
pod install
```
2. Replace `"YOUR_ACCESS_KEY_HERE"` inside [`ViewModel.swift`](OctopusDemo/OctopusDemo/ViewModel.swift) with
your AccessKey obtained from [Picovoice Console](https://console.picovoice.ai/).
Replace `{YOUR_ACCESS_KEY_HERE}` inside [`ViewModel.swift`](OctopusDemo/OctopusDemo/ViewModel.swift) with your AccessKey obtained from [Picovoice Console](https://console.picovoice.ai/).

## Usage

Open the OctopusDemo Xcode project and build. Launch the demo on a simulator or a physical iOS device.

1. Press the record button.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions res/.lint/spell-check/dict.txt
Original file line number Diff line number Diff line change
@@ -43,6 +43,8 @@ reindex
testapp
wargv
whitespaces
xcframework
xcodeproj
xcuitest
xcworkspace
ytdlp