parent
9a5521dfd2
commit
cfc5fc699e
@ -1,116 +1,116 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images": [
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
"size": "20x20",
|
||||||
"idiom" : "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "AppIcon-20x20@2x.png",
|
"filename": "AppIcon-20x20@2x.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
"size": "20x20",
|
||||||
"idiom" : "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "AppIcon-20x20@3x.png",
|
"filename": "AppIcon-20x20@3x.png",
|
||||||
"scale" : "3x"
|
"scale": "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
"size": "29x29",
|
||||||
"idiom" : "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "AppIcon-29x29@2x-1.png",
|
"filename": "AppIcon-29x29@2x-1.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
"size": "29x29",
|
||||||
"idiom" : "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "AppIcon-29x29@3x.png",
|
"filename": "AppIcon-29x29@3x.png",
|
||||||
"scale" : "3x"
|
"scale": "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
"size": "40x40",
|
||||||
"idiom" : "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "AppIcon-40x40@2x.png",
|
"filename": "AppIcon-40x40@2x.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
"size": "40x40",
|
||||||
"idiom" : "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "AppIcon-40x40@3x.png",
|
"filename": "AppIcon-40x40@3x.png",
|
||||||
"scale" : "3x"
|
"scale": "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "60x60",
|
"size": "60x60",
|
||||||
"idiom" : "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "AppIcon-60x60@2x.png",
|
"filename": "AppIcon-60x60@2x.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "60x60",
|
"size": "60x60",
|
||||||
"idiom" : "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "AppIcon-60x60@3x.png",
|
"filename": "AppIcon-60x60@3x.png",
|
||||||
"scale" : "3x"
|
"scale": "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
"size": "20x20",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-20x20@1x.png",
|
"filename": "AppIcon-20x20@1x.png",
|
||||||
"scale" : "1x"
|
"scale": "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
"size": "20x20",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-20x20@2x-1.png",
|
"filename": "AppIcon-20x20@2x-1.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
"size": "29x29",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-29x29@1x.png",
|
"filename": "AppIcon-29x29@1x.png",
|
||||||
"scale" : "1x"
|
"scale": "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
"size": "29x29",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-29x29@2x.png",
|
"filename": "AppIcon-29x29@2x.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
"size": "40x40",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-40x40@1x.png",
|
"filename": "AppIcon-40x40@1x.png",
|
||||||
"scale" : "1x"
|
"scale": "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
"size": "40x40",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-40x40@2x-1.png",
|
"filename": "AppIcon-40x40@2x-1.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "76x76",
|
"size": "76x76",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-76x76@1x.png",
|
"filename": "AppIcon-76x76@1x.png",
|
||||||
"scale" : "1x"
|
"scale": "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "76x76",
|
"size": "76x76",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-76x76@2x.png",
|
"filename": "AppIcon-76x76@2x.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "83.5x83.5",
|
"size": "83.5x83.5",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-83.5x83.5@2x.png",
|
"filename": "AppIcon-83.5x83.5@2x.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "1024x1024",
|
"size": "1024x1024",
|
||||||
"idiom" : "ios-marketing",
|
"idiom": "ios-marketing",
|
||||||
"filename" : "AppIcon-512@2x.png",
|
"filename": "AppIcon-512@2x.png",
|
||||||
"scale" : "1x"
|
"scale": "1x"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info": {
|
||||||
"version" : 1,
|
"version": 1,
|
||||||
"author" : "xcode"
|
"author": "xcode"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"info" : {
|
"info": {
|
||||||
"version" : 1,
|
"version": 1,
|
||||||
"author" : "xcode"
|
"author": "xcode"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
if("__TAURI__"in window){var __TAURI_NFC__=function(_){"use strict";return _.scanNdef=async function(){},_.scanTag=async function(){},_}({});Object.defineProperty(window.__TAURI__,"nfc",{value:__TAURI_NFC__})}
|
if("__TAURI__"in window){var __TAURI_NFC__=function(n){"use strict";var _;return n.ScanKind=void 0,(_=n.ScanKind||(n.ScanKind={}))[_.Ndef=0]="Ndef",_[_.Tag=1]="Tag",n.isAvailable=async function(){return await window.__TAURI_INVOKE__("plugin:nfc|isAvailable")},n.scan=async function(_,i){return await window.__TAURI_INVOKE__("plugin:nfc|scan",{kind:_===n.ScanKind.Ndef?"ndef":"tag",...i})},n}({});Object.defineProperty(window.__TAURI__,"nfc",{value:__TAURI_NFC__})}
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
// SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
use serde::de::DeserializeOwned;
|
|
||||||
use tauri::{plugin::PluginApi, AppHandle, Runtime};
|
|
||||||
|
|
||||||
use crate::models::*;
|
|
||||||
|
|
||||||
pub fn init<R: Runtime, C: DeserializeOwned>(
|
|
||||||
app: &AppHandle<R>,
|
|
||||||
_api: PluginApi<R, C>,
|
|
||||||
) -> crate::Result<Nfc<R>> {
|
|
||||||
Ok(Nfc(app.clone()))
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Access to the nfc APIs.
|
|
||||||
pub struct Nfc<R: Runtime>(AppHandle<R>);
|
|
||||||
|
|
||||||
impl<R: Runtime> Nfc<R> {
|
|
||||||
pub fn ping(&self, payload: PingRequest) -> crate::Result<PingResponse> {
|
|
||||||
Ok(PingResponse {
|
|
||||||
value: payload.value,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in new issue