Skip to content

Commit 5cba2e5

Browse files
authored
feat(ios): Add SPM support (#391)
1 parent a34b51e commit 5cba2e5

File tree

20 files changed

+1325
-1063
lines changed

20 files changed

+1325
-1063
lines changed

.gitignore

Lines changed: 79 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,81 @@
1-
node_modules/
2-
ios/Pods/
1+
# node files
2+
dist
3+
node_modules
4+
5+
# iOS files
6+
Pods
7+
Podfile.lock
8+
Package.resolved
9+
Build
10+
xcuserdata
11+
/.build
12+
/Packages
13+
xcuserdata/
14+
DerivedData/
15+
.swiftpm/configuration/registries.json
16+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
17+
.netrc
18+
19+
# macOS files
320
.DS_Store
4-
.idea/
5-
*.iml
6-
build/
21+
22+
.husky/
23+
24+
25+
# Based on Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore
26+
27+
# Built application files
28+
*.apk
29+
*.ap_
30+
31+
# Files for the ART/Dalvik VM
32+
*.dex
33+
34+
# Java class files
35+
*.class
36+
37+
# Generated files
38+
bin
39+
gen
40+
out
41+
42+
# Gradle files
743
.gradle
8-
android/.gradle
9-
android/local.properties
10-
ios/Plugin.xcodeproj/xcuserdata
11-
ios/Plugin.xcworkspace/xcuserdata
12-
dist/
13-
.DS_Store
14-
.husky/
44+
build
45+
46+
# Local configuration file (sdk path, etc)
47+
local.properties
48+
49+
# Proguard folder generated by Eclipse
50+
proguard
51+
52+
# Log Files
53+
*.log
54+
55+
# Android Studio Navigation editor temp files
56+
.navigation
57+
58+
# Android Studio captures folder
59+
captures
60+
61+
# IntelliJ
62+
*.iml
63+
.idea
64+
65+
# Keystore files
66+
# Uncomment the following line if you do not want to check your keystore files in.
67+
#*.jks
68+
69+
# External native build folder generated in Android Studio 2.2 and later
70+
.externalNativeBuild
71+
72+
# VSCode
73+
.vscode/settings.json
74+
75+
#local secrets
76+
.env
77+
78+
# Locally published versions
79+
capacitor-community-camera-preview-*.tgz
80+
81+
CLAUDE.md

CapacitorCommunityCameraPreview.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 = 'https://github.com/capacitor-community/camera-preview.git'
1111
s.author = package['author']
1212
s.source = { :git => 'https://github.com/capacitor-community/camera-preview.git', :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: "CapacitorCommunityCameraPreview",
6+
platforms: [.iOS(.v14)],
7+
products: [
8+
.library(
9+
name: "CapacitorCommunityCameraPreviewPlugin",
10+
targets: ["CameraPreviewPlugin"])
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: "CameraPreviewPlugin",
18+
dependencies: [
19+
.product(name: "Capacitor", package: "capacitor-swift-pm"),
20+
.product(name: "Cordova", package: "capacitor-swift-pm")
21+
],
22+
path: "ios/Sources/CameraPreviewPlugin"),
23+
.testTarget(
24+
name: "CameraPreviewPluginTests",
25+
dependencies: ["CameraPreviewPlugin"],
26+
path: "ios/Tests/CameraPreviewPluginTests")
27+
]
28+
)

ios/.gitignore

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

0 commit comments

Comments
 (0)