Skip to content

Commit

Permalink
ios spm
Browse files Browse the repository at this point in the history
  • Loading branch information
albho committed Nov 25, 2024
1 parent 94a98bd commit 0629f0a
Show file tree
Hide file tree
Showing 18 changed files with 148 additions and 364 deletions.
16 changes: 1 addition & 15 deletions .github/workflows/ios-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 CheetahDemo.xcworkspace
-project CheetahDemo.xcodeproj
-sdk iphoneos
-scheme CheetahDemo
-derivedDataPath ddp
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ cheetah_demo
cheetah_demo_realtime
**/__pycache__/
.DS_Store
.build
Package.resolved
.swiftpm
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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 = ../pvrecorder.git
url = https://github.com/Picovoice/pvrecorder.git
38 changes: 38 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "Cheetah-iOS",
platforms: [
.iOS(.v13)
],
products: [
.library(
name: "Cheetah",
targets: ["Cheetah"]
)
],
targets: [
.binaryTarget(
name: "PvCheetah",
path: "lib/ios/PvCheetah.xcframework"
),
.target(
name: "Cheetah",
dependencies: ["PvCheetah"],
path: ".",
exclude: [
"binding/ios/CheetahAppTest",
"binding/flutter",
"binding/react-native",
"demo"
],
sources: [
"binding/ios/Cheetah.swift",
"binding/ios/CheetahErrors.swift"
],
resources: [
.copy("lib/common/cheetah_params.pv")
]
)
]
)

Check failure on line 38 in Package.swift

View workflow job for this annotation

GitHub Actions / check-switch-codestyle

Trailing Newline Violation: Files should have a single trailing newline (trailing_newline)
4 changes: 2 additions & 2 deletions binding/ios/Cheetah-iOS.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = 'Cheetah-iOS'
s.module_name = 'Cheetah'
s.version = '2.0.0'
s.version = '2.0.1'
s.license = {:type => 'Apache 2.0'}
s.summary = 'iOS SDK for Picovoice\'s Cheetah speech-to-text engine.'
s.description =
Expand All @@ -22,7 +22,7 @@ Pod::Spec.new do |s|
DESC
s.homepage = 'https://github.com/Picovoice/cheetah/tree/master/binding/ios'
s.author = { 'Picovoice' => '[email protected]' }
s.source = { :git => "https://github.com/Picovoice/cheetah.git", :tag => "Cheetah-iOS-v2.0.0" }
s.source = { :git => "https://github.com/Picovoice/cheetah.git", :tag => s.version.to_s }
s.ios.deployment_target = '13.0'
s.swift_version = '5.0'
s.vendored_frameworks = 'lib/ios/PvCheetah.xcframework'
Expand Down
4 changes: 3 additions & 1 deletion binding/ios/Cheetah.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

import PvCheetah

/// iOS binding for Cheetah speech-to-text engine. Provides a Swift interface to the Cheetah library.
Expand Down
Loading

0 comments on commit 0629f0a

Please sign in to comment.