Skip to content

Commit

Permalink
chore(network): Add start of SPM network support
Browse files Browse the repository at this point in the history
  • Loading branch information
markemer committed Dec 5, 2023
1 parent 5fac335 commit d4fff6d
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 820 deletions.
28 changes: 28 additions & 0 deletions network/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: "CapacitorNetwork",
platforms: [.iOS(.v13)],
products: [
.library(
name: "CAPNetworkPlugin",
targets: ["CAPNetworkPlugin"])
],
dependencies: [
.package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main")
],
targets: [
.target(
name: "CAPNetworkPlugin",
dependencies: [
.product(name: "Capacitor", package: "capacitor6-spm-test"),
.product(name: "Cordova", package: "capacitor6-spm-test")
],
path: "ios/Sources/CAPNetworkPlugin"),
.testTarget(
name: "CAPNetworkPluginTests",
dependencies: ["CAPNetworkPlugin"],
path: "ios/Tests/CAPNetworkPluginTests")
]
)
577 changes: 0 additions & 577 deletions network/ios/Plugin.xcodeproj/project.pbxproj

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

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

This file was deleted.

This file was deleted.

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

This file was deleted.

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

This file was deleted.

8 changes: 0 additions & 8 deletions network/ios/Plugin/NetworkPlugin.m

This file was deleted.

7 changes: 6 additions & 1 deletion network/ios/Plugin/NetworkPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import Foundation
import Capacitor

@objc(CAPNetworkPlugin)
public class NetworkPlugin: CAPPlugin {
public class NetworkPlugin: CAPPlugin, CAPBridgedPlugin {
public let identifier = "CAPNetworkPlugin"
public let jsName = "Network"
public let pluginMethods: [CAPPluginMethod] = [
CAPPluginMethod(name: "getStatus", returnType: CAPPluginReturnPromise),
]
private var implementation: Network?

override public func load() {
Expand Down
22 changes: 0 additions & 22 deletions network/ios/PluginTests/Info.plist

This file was deleted.

0 comments on commit d4fff6d

Please sign in to comment.