parent
ffdf99aff6
commit
3289e0d95f
@ -0,0 +1,10 @@ |
||||
.DS_Store |
||||
/.build |
||||
/Packages |
||||
/*.xcodeproj |
||||
xcuserdata/ |
||||
DerivedData/ |
||||
.swiftpm/config/registries.json |
||||
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata |
||||
.netrc |
||||
Package.resolved |
||||
@ -0,0 +1,32 @@ |
||||
// swift-tools-version:5.3 |
||||
// The swift-tools-version declares the minimum version of Swift required to build this package. |
||||
|
||||
import PackageDescription |
||||
|
||||
let package = Package( |
||||
name: "tauri-plugin-contacts-importer", |
||||
platforms: [ |
||||
.macOS(.v10_13), |
||||
.iOS(.v13), |
||||
], |
||||
products: [ |
||||
// Products define the executables and libraries a package produces, and make them visible to other packages. |
||||
.library( |
||||
name: "tauri-plugin-contacts-importer", |
||||
type: .static, |
||||
targets: ["tauri-plugin-contacts-importer"]), |
||||
], |
||||
dependencies: [ |
||||
.package(name: "Tauri", path: "../.tauri/tauri-api") |
||||
], |
||||
targets: [ |
||||
// Targets are the basic building blocks of a package. A target can define a module or a test suite. |
||||
// Targets can depend on other targets in this package, and on products in packages this package depends on. |
||||
.target( |
||||
name: "tauri-plugin-contacts-importer", |
||||
dependencies: [ |
||||
.byName(name: "Tauri") |
||||
], |
||||
path: "Sources") |
||||
] |
||||
) |
||||
@ -0,0 +1,3 @@ |
||||
# Tauri Plugin contacts-importer |
||||
|
||||
A description of this package. |
||||
@ -0,0 +1,28 @@ |
||||
import SwiftRs |
||||
import Tauri |
||||
import UIKit |
||||
import WebKit |
||||
|
||||
class PingArgs: Decodable { |
||||
let value: String? |
||||
} |
||||
|
||||
class ExamplePlugin: Plugin { |
||||
@objc public func import_contacts(_ invoke: Invoke) throws { |
||||
//let args = try invoke.parseArgs(PingArgs.self) |
||||
//invoke.resolve(["value": ""]) |
||||
} |
||||
@objc public func check_permissions(_ invoke: Invoke) throws { |
||||
//let args = try invoke.parseArgs(PingArgs.self) |
||||
//invoke.resolve(["value": ""]) |
||||
} |
||||
@objc public func request_permissions(_ invoke: Invoke) throws { |
||||
//let args = try invoke.parseArgs(PingArgs.self) |
||||
//invoke.resolve(["value": ""]) |
||||
} |
||||
} |
||||
|
||||
@_cdecl("init_plugin_contacts_importer") |
||||
func initPlugin() -> Plugin { |
||||
return ExamplePlugin() |
||||
} |
||||
@ -0,0 +1,8 @@ |
||||
import XCTest |
||||
@testable import ExamplePlugin |
||||
|
||||
final class ExamplePluginTests: XCTestCase { |
||||
func testExample() throws { |
||||
let plugin = ExamplePlugin() |
||||
} |
||||
} |
||||
Loading…
Reference in new issue