Skip to content

Commit c18877e

Browse files
authored
feat(ios): Add SPM support (#87)
1 parent 13884fc commit c18877e

35 files changed

+64
-964
lines changed

.gitignore

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

6363
# VSCode
6464
.vscode/settings.json
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

CapacitorCommunityPhotoviewer.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.dependency 'SDWebImage'

Package.swift

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

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

ios/Plugin.xcodeproj/project.pbxproj

Lines changed: 0 additions & 683 deletions
This file was deleted.

ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 0 additions & 7 deletions
This file was deleted.

ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

Lines changed: 0 additions & 8 deletions
This file was deleted.

ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme

Lines changed: 0 additions & 77 deletions
This file was deleted.

ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme

Lines changed: 0 additions & 68 deletions
This file was deleted.

ios/Plugin.xcworkspace/contents.xcworkspacedata

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)