Skip to content

Commit

Permalink
feat(app,haptics,status-bar,keyboard): Supporting Swift Package Manag…
Browse files Browse the repository at this point in the history
…er (#1886)

Co-authored-by: Mark Anderson <[email protected]>
  • Loading branch information
theproducer and markemer authored Nov 8, 2023
1 parent c44bf16 commit 918ea30
Show file tree
Hide file tree
Showing 84 changed files with 320 additions and 3,370 deletions.
8 changes: 8 additions & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ Pods
Podfile.lock
Build
xcuserdata
/.build
/Packages
xcuserdata/
DerivedData/
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc


# macOS files
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion app/CapacitorApp.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.homepage = 'https://capacitorjs.com'
s.author = package['author']
s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] }
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'app/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'app/ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
s.ios.deployment_target = '13.0'
s.dependency 'Capacitor'
s.swift_version = '5.1'
Expand Down
14 changes: 14 additions & 0 deletions app/Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pins" : [
{
"identity" : "capacitor6-spm-test",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ionic-team/capacitor6-spm-test.git",
"state" : {
"branch" : "main",
"revision" : "b2e3d8d3ae3b421e5a0b22fd2a32347b40d1ed32"
}
}
],
"version" : 2
}
27 changes: 27 additions & 0 deletions app/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// swift-tools-version: 5.9
import PackageDescription

let package = Package(
name: "CapacitorAppPlugin",
platforms: [.iOS(.v13)],
products: [
.library(
name: "AppPlugin",
targets: ["AppPlugin"])
],
dependencies: [
.package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main")
],
targets: [
.target(
name: "AppPlugin",
dependencies: [
.product(name: "Capacitor", package: "capacitor6-spm-test"),
.product(name: "Cordova", package: "capacitor6-spm-test")
],
path: "ios/Sources/AppPlugin"),
.testTarget(
name: "AppPluginTests",
dependencies: ["AppPlugin"])
]
)
8 changes: 8 additions & 0 deletions app/ios/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.DS_Store
.build
/Packages
xcuserdata/
DerivedData/
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
Loading

0 comments on commit 918ea30

Please sign in to comment.