Skip to content

Commit

Permalink
Remove bitcode from iOS and make available on SPM (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
albho authored Dec 24, 2024
1 parent 1c6f3a8 commit a40f412
Show file tree
Hide file tree
Showing 29 changed files with 653 additions and 1,611 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/ios-browserstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,20 @@ jobs:
- run:
pip3 install requests

- name: Install Cocoapods
run: gem install cocoapods

- name: Install AppCenter CLI
run: npm install -g appcenter-cli

- 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}}:'
LeopardAppTestUITests/LeopardAppTestUITests.swift

- name: XCode Build
run: xcrun xcodebuild build-for-testing
-configuration Debug
-workspace LeopardAppTest.xcworkspace
-project LeopardAppTest.xcodeproj
-sdk iphoneos
-scheme LeopardAppTest
-derivedDataPath ddp
Expand Down
18 changes: 2 additions & 16 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 English
run: xcrun xcodebuild build
-configuration Debug
-workspace LeopardDemo.xcworkspace
-project LeopardDemo.xcodeproj
-sdk iphoneos
-scheme _enDemo
-derivedDataPath ddp
Expand All @@ -51,7 +37,7 @@ jobs:
- name: Build Other Language
run: xcrun xcodebuild build
-configuration Debug
-workspace LeopardDemo.xcworkspace
-project LeopardDemo.xcodeproj
-sdk iphoneos
-scheme koDemo
-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 LeopardAppTest.xcworkspace
-project LeopardAppTest.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,3 +1,6 @@
.idea/
**/__pycache__/
.DS_Store
.DS_Store
.build
Package.resolved
.swiftpm
35 changes: 35 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "Leopard-iOS",
platforms: [
.iOS(.v13)
],
products: [
.library(
name: "Leopard",
targets: ["Leopard"]
)
],
targets: [
.binaryTarget(
name: "PvLeopard",
path: "lib/ios/PvLeopard.xcframework"
),
.target(
name: "Leopard",
dependencies: ["PvLeopard"],
path: ".",
exclude: [
"binding/ios/LeopardAppTest",
"binding/flutter",
"binding/react-native",
"demo"
],
sources: [
"binding/ios/Leopard.swift",
"binding/ios/LeopardErrors.swift"
]
)
]
)
4 changes: 2 additions & 2 deletions binding/ios/Leopard-iOS.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = 'Leopard-iOS'
s.module_name = 'Leopard'
s.version = '2.0.1'
s.version = '2.0.2'
s.license = {:type => 'Apache 2.0'}
s.summary = 'iOS SDK for Picovoice\'s Leopard speech-to-text engine.'
s.description =
Expand All @@ -22,7 +22,7 @@ Pod::Spec.new do |s|
DESC
s.homepage = 'https://github.com/Picovoice/leopard/tree/master/binding/ios'
s.author = { 'Picovoice' => '[email protected]' }
s.source = { :git => "https://github.com/Picovoice/leopard.git", :tag => "Leopard-iOS-v2.0.1" }
s.source = { :git => "https://github.com/Picovoice/leopard.git", :tag => s.version.to_s }
s.ios.deployment_target = '13.0'
s.swift_version = '5.0'
s.vendored_frameworks = 'lib/ios/PvLeopard.xcframework'
Expand Down
4 changes: 3 additions & 1 deletion binding/ios/Leopard.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 PvLeopard

public struct LeopardWord {
Expand Down
Loading

0 comments on commit a40f412

Please sign in to comment.