Skip to content

Commit a656931

Browse files
committed
add default ios plugin folder
1 parent b70ee4c commit a656931

5 files changed

Lines changed: 69 additions & 0 deletions

File tree

ios/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
5+
xcuserdata/
6+
DerivedData/
7+
.swiftpm/config/registries.json
8+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
9+
.netrc
10+
Package.resolved

ios/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.3
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "tauri-plugin-python",
8+
platforms: [
9+
.macOS(.v10_13),
10+
.iOS(.v13),
11+
],
12+
products: [
13+
// Products define the executables and libraries a package produces, and make them visible to other packages.
14+
.library(
15+
name: "tauri-plugin-python",
16+
type: .static,
17+
targets: ["tauri-plugin-python"]),
18+
],
19+
dependencies: [
20+
.package(name: "Tauri", path: "../.tauri/tauri-api")
21+
],
22+
targets: [
23+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
24+
// Targets can depend on other targets in this package, and on products in packages this package depends on.
25+
.target(
26+
name: "tauri-plugin-python",
27+
dependencies: [
28+
.byName(name: "Tauri")
29+
],
30+
path: "Sources")
31+
]
32+
)

ios/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Tauri Plugin python
2+
3+
A description of this package.

ios/Sources/ExamplePlugin.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import SwiftRs
2+
import Tauri
3+
import UIKit
4+
import WebKit
5+
6+
class PingArgs: Decodable {
7+
let value: String?
8+
}
9+
10+
class ExamplePlugin: Plugin {
11+
}
12+
13+
@_cdecl("init_plugin_python")
14+
func initPlugin() -> Plugin {
15+
return ExamplePlugin()
16+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import XCTest
2+
@testable import ExamplePlugin
3+
4+
final class ExamplePluginTests: XCTestCase {
5+
func testExample() throws {
6+
let plugin = ExamplePlugin()
7+
}
8+
}

0 commit comments

Comments
 (0)