Skip to content

Commit 662c40f

Browse files
authored
feat(ios): Add SPM support (#149)
1 parent 386d252 commit 662c40f

File tree

20 files changed

+62
-838
lines changed

20 files changed

+62
-838
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,12 @@ captures
6262

6363
# External native build folder generated in Android Studio 2.2 and later
6464
.externalNativeBuild
65+
66+
/Packages
67+
xcuserdata/
68+
DerivedData/
69+
.swiftpm/configuration/registries.json
70+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
71+
.netrc
72+
Package.resolved
73+
/.build

CapacitorCommunityTextToSpeech.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
1010
s.homepage = package['repository']['url']
1111
s.author = package['author']
1212
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13-
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
13+
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
1414
s.ios.deployment_target = '14.0'
1515
s.dependency 'Capacitor'
1616
s.swift_version = '5.1'

Package.swift

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// swift-tools-version: 5.9
2+
import PackageDescription
3+
4+
let package = Package(
5+
name: "CapacitorCommunityTextToSpeech",
6+
platforms: [.iOS(.v14)],
7+
products: [
8+
.library(
9+
name: "CapacitorCommunityTextToSpeech",
10+
targets: ["TextToSpeechPlugin"])
11+
],
12+
dependencies: [
13+
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0")
14+
],
15+
targets: [
16+
.target(
17+
name: "TextToSpeechPlugin",
18+
dependencies: [
19+
.product(name: "Capacitor", package: "capacitor-swift-pm"),
20+
.product(name: "Cordova", package: "capacitor-swift-pm")
21+
],
22+
path: "ios/Sources/TextToSpeechPlugin"),
23+
.testTarget(
24+
name: "TextToSpeechPluginTests",
25+
dependencies: ["TextToSpeechPlugin"],
26+
path: "ios/Tests/TextToSpeechPluginTests")
27+
]
28+
)

ios/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
/Packages
3+
xcuserdata/
4+
DerivedData/
5+
.swiftpm/configuration/registries.json
6+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
7+
.netrc
8+
.DS_Store
9+
.build

0 commit comments

Comments
 (0)