Skip to content

Commit

Permalink
Migrate to SPM compatible structure capacitor-community#94
Browse files Browse the repository at this point in the history
  • Loading branch information
7-plus-t committed Jun 28, 2024
1 parent 573b394 commit bf97d37
Show file tree
Hide file tree
Showing 20 changed files with 53 additions and 830 deletions.
2 changes: 1 addition & 1 deletion CapacitorCommunityPrivacyScreen.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.homepage = package['repository']['url']
s.author = package['author']
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
s.source_files = '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 Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pins" : [
{
"identity" : "capacitor-swift-pm",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ionic-team/capacitor-swift-pm.git",
"state" : {
"branch" : "6.0.0",
"revision" : "8a46dff3a8292761df1bded13a508da1c85859e8"
}
}
],
"version" : 2
}
28 changes: 28 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// swift-tools-version: 5.9
import PackageDescription

let package = Package(
name: "CapacitorCommunityPrivacyScreen",
platforms: [.iOS(.v13)],
products: [
.library(
name: "PrivacyScreenPlugin",
targets: ["PrivacyScreenPlugin"])
],
dependencies: [
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", branch: "6.0.0")
],
targets: [
.target(
name: "PrivacyScreenPlugin",
dependencies: [
.product(name: "Capacitor", package: "capacitor-swift-pm"),
.product(name: "Cordova", package: "capacitor-swift-pm")
],
path: "ios/Sources"),
.testTarget(
name: "PrivacyScreenPluginTests",
dependencies: ["PrivacyScreenPlugin"],
path: "ios/Tests")
]
)
575 changes: 0 additions & 575 deletions ios/Plugin.xcodeproj/project.pbxproj

This file was deleted.

This file was deleted.

This file was deleted.

77 changes: 0 additions & 77 deletions ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme

This file was deleted.

68 changes: 0 additions & 68 deletions ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme

This file was deleted.

10 changes: 0 additions & 10 deletions ios/Plugin.xcworkspace/contents.xcworkspacedata

This file was deleted.

8 changes: 0 additions & 8 deletions ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

This file was deleted.

24 changes: 0 additions & 24 deletions ios/Plugin/Info.plist

This file was deleted.

10 changes: 0 additions & 10 deletions ios/Plugin/PrivacyScreenPlugin.h

This file was deleted.

22 changes: 0 additions & 22 deletions ios/PluginTests/Info.plist

This file was deleted.

16 changes: 0 additions & 16 deletions ios/Podfile

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ import Capacitor
* here: https://capacitorjs.com/docs/plugins/ios
*/
@objc(PrivacyScreenPlugin)
public class PrivacyScreenPlugin: CAPPlugin {
public class PrivacyScreenPlugin: CAPPlugin, CAPBridgedPlugin {
public let identifier = "PrivacyScreenPlugin"
public let jsName = "PrivacyScreen"
public let pluginMethods: [CAPPluginMethod] = [
CAPPluginMethod(name: "enable", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "disable", returnType: CAPPluginReturnPromise)
]
private var implementation: PrivacyScreen?

override public func load() {
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"android/src/main/",
"android/build.gradle",
"dist/",
"ios/Plugin/",
"ios/Sources/",
"CapacitorCommunityPrivacyScreen.podspec"
],
"author": "Robin Genz <[email protected]>",
Expand All @@ -29,10 +29,10 @@
],
"scripts": {
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
"verify:ios": "xcodebuild -scheme CapacitorCommunityPrivacyScreen -destination generic/platform=iOS",
"verify:android": "cd android && ./gradlew clean build test && cd ..",
"verify:web": "npm run build",
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint ios",
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
"eslint": "eslint . --ext ts",
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
Expand Down

0 comments on commit bf97d37

Please sign in to comment.