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 #86

Merged
merged 8 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
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
8 changes: 1 addition & 7 deletions .github/workflows/ios-browserstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,20 @@ 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}}:'
EagleAppTestUITests/BaseTest.swift

- name: XCode Build
run: xcrun xcodebuild build-for-testing
-configuration Debug
-workspace EagleAppTest.xcworkspace
-project EagleAppTest.xcodeproj
-sdk iphoneos
-scheme EagleAppTest
-derivedDataPath ddp
Expand Down
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 EagleDemo.xcworkspace
-project EagleDemo.xcodeproj
-sdk iphoneos
-scheme EagleDemo
-derivedDataPath ddp
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/ios-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,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
Expand All @@ -76,7 +70,7 @@ jobs:
- name: XCode Build
run: xcrun xcodebuild build-for-testing
-configuration Debug
-workspace EagleAppTest.xcworkspace
-project EagleAppTest.xcodeproj
-sdk iphoneos
-scheme PerformanceTest
-derivedDataPath ddp
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
.DS_Store
.idea
.idea
.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/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
39 changes: 39 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "Eagle-iOS",
platforms: [
.iOS(.v13)
],
products: [
.library(
name: "Eagle",
targets: ["Eagle"]
)
],
targets: [
.binaryTarget(
name: "PvEagle",
path: "lib/ios/PvEagle.xcframework"
),
.target(
name: "Eagle",
dependencies: ["PvEagle"],
path: ".",
exclude: [
"binding/ios/EagleAppTest",
"demo"
],
sources: [
"binding/ios/Eagle.swift",
"binding/ios/EagleBase.swift",
"binding/ios/EagleErrors.swift",
"binding/ios/EagleProfile.swift",
"binding/ios/EagleProfiler.swift"
],
resources: [
.copy("lib/common/eagle_params.pv")
]
)
]
)
10 changes: 7 additions & 3 deletions binding/ios/Eagle-iOS.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = 'Eagle-iOS'
s.module_name = 'Eagle'
s.version = '1.0.1'
s.version = '1.0.2'
s.license = {:type => 'Apache 2.0'}
s.summary = 'iOS binding for Picovoice\'s Eagle speaker recognition engine'
s.description =
Expand All @@ -11,11 +11,15 @@ Pod::Spec.new do |s|
DESC
s.homepage = 'https://github.com/Picovoice/eagle/tree/master/binding/ios'
s.author = { 'Picovoice' => '[email protected]' }
s.source = { :git => "https://github.com/Picovoice/eagle.git", :tag => "Eagle-iOS-v1.0.1" }
s.source = { :git => "https://github.com/Picovoice/eagle.git", :tag => s.version.to_s }
s.ios.deployment_target = '13.0'
s.swift_version = '5.0'
s.vendored_frameworks = 'lib/ios/PvEagle.xcframework'
s.resources = 'lib/common/eagle_params.pv'
s.resource_bundles = {
'EagleResources' => [
'lib/common/eagle_params.pv'
]
}
s.source_files = 'binding/ios/*.{swift}'
s.exclude_files = 'binding/ios/EagleTestApp/**'
end
8 changes: 3 additions & 5 deletions binding/ios/Eagle.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -37,11 +37,9 @@ public class Eagle: EagleBase {
var modelPathArg = modelPath

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

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

Expand Down
Loading
Loading