allelo
Niko PLP 3 days ago
parent ffdf99aff6
commit 3289e0d95f
  1. 5
      Cargo.lock
  2. 14
      app/allelo/src-tauri/src/lib.rs
  3. 8
      app/nextgraph/README.md
  4. 3
      app/tauri-plugin-contacts-importer/Cargo.toml
  5. 2
      app/tauri-plugin-contacts-importer/build.rs
  6. 10
      app/tauri-plugin-contacts-importer/ios/.gitignore
  7. 32
      app/tauri-plugin-contacts-importer/ios/Package.swift
  8. 3
      app/tauri-plugin-contacts-importer/ios/README.md
  9. 28
      app/tauri-plugin-contacts-importer/ios/Sources/ExamplePlugin.swift
  10. 8
      app/tauri-plugin-contacts-importer/ios/Tests/PluginTests/PluginTests.swift
  11. 2
      app/tauri-plugin-contacts-importer/src/lib.rs

5
Cargo.lock generated

@ -6901,9 +6901,9 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin" name = "tauri-plugin"
version = "2.4.0" version = "2.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9946a3cede302eac0c6eb6c6070ac47b1768e326092d32efbb91f21ed58d978f" checksum = "076c78a474a7247c90cad0b6e87e593c4c620ed4efdb79cbe0214f0021f6c39d"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"glob", "glob",
@ -6937,6 +6937,7 @@ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
"tauri", "tauri",
"tauri-build",
"tauri-plugin", "tauri-plugin",
"thiserror 2.0.16", "thiserror 2.0.16",
] ]

@ -1009,13 +1009,13 @@ impl AppBuilder {
// .add_plugins(["window", "event"]), // .add_plugins(["window", "event"]),
// ); // );
// } // }
if cfg!(debug_assertions) { // if cfg!(debug_assertions) {
app.handle().plugin( // app.handle().plugin(
tauri_plugin_log::Builder::default() // tauri_plugin_log::Builder::default()
.level(log::LevelFilter::Info) // .level(log::LevelFilter::Info)
.build(), // .build(),
)?; // )?;
} // }
Ok(()) Ok(())
}); });
builder = builder.plugin(tauri_plugin_opener::init()); builder = builder.plugin(tauri_plugin_opener::init());

@ -63,12 +63,8 @@ export RANLIB="$NDK_HOME/toolchains/llvm/prebuilt/$(ls -1 $NDK_HOME/toolchains/l
to run the dev env : to run the dev env :
``` ```
## on macos ## on macos or linux or win
cargo tauri dev --no-watch --target x86_64-apple-darwin cargo tauri dev --no-watch
## on linux
cargo tauri dev --no-watch --target x86_64-unknown-linux-gnu
## on win
cargo tauri dev --no-watch --target x86_64-pc-windows-msvc
``` ```
to build the production app installer : to build the production app installer :

@ -15,4 +15,5 @@ serde_json = "1"
thiserror = "2" thiserror = "2"
[build-dependencies] [build-dependencies]
tauri-plugin = { version = "2.4.0", features = ["build"] } tauri-plugin = { version = "2.5.1", features = ["build"] }
tauri-build = "2.5.1"

@ -5,4 +5,4 @@ fn main() {
.android_path("android") .android_path("android")
.ios_path("ios") .ios_path("ios")
.build(); .build();
} }

@ -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()
}
}

@ -45,4 +45,4 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
Ok(()) Ok(())
}) })
.build() .build()
} }
Loading…
Cancel
Save