mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-23 11:36:13 +02:00
fe79adb5c7
* feat: scaffold NFC plugin, initial iOS code * adjust script paths (api example) * update entitlements & plist * update class name * update api * sketch api, remove desktop * update response data * add write fn * remove commands * fixes for write mode * check nfc state before using the APIs * fix(example): downgrade internal-ip to v7 * feat: typed iOS arguments * update swift requirement * android updates * update tauri * fix icon * update example * fix build * fix notification example * fix clipboard * fix ios notification build * fix info.plist * update tauri * add change file * fmt * update to new args class syntax :( [skip ci] * add lang code handling in RTD_TEXT helper (written payload is broken without it) * update nfc to latest tauri. use tauri from git * update lockfile * android: add initial nfc writer implementation * check sdk version for pendingintent flag * quicksaving basic ndef reading that doesn't crash * add basic ndef reading (android) * small cleanup * change pending action type * validate available state * gradle 8.0.0 * use session class * implement keep session alive * fix notification crash?? * remove dox feature, fix breaking changes * update dependencies * fix shell tests [skip ci] * fmt [skip ci] * type safe args * scan kind options * commit .idea files * update api * update example * fix app check * alertmessage options for iOS * default to tag on example * fix(ios): always close session on write, remove keepsessionalive option * add kind input to write options * empty records if message not found * fill tag metadata for ndef read * add contributors * update vite * covector setup * tauri/dox removed * docs and examples * fmt [skip ci] --------- Co-authored-by: FabianLars-crabnebula <fabianlars@crabnebula.dev> Co-authored-by: Lucas Nogueira <lucas@tauri.app> Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
44 lines
1.3 KiB
Rust
44 lines
1.3 KiB
Rust
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
use std::process::exit;
|
|
|
|
fn main() {
|
|
if let Err(error) = tauri_build::mobile::PluginBuilder::new()
|
|
.android_path("android")
|
|
.ios_path("ios")
|
|
.run()
|
|
{
|
|
println!("{error:#}");
|
|
exit(1);
|
|
}
|
|
|
|
// TODO: triple check if this can reference the plugin's xml as it expects rn
|
|
// TODO: This has to be configurable if we want to support handling nfc tags when the app is not open.
|
|
tauri_build::mobile::update_android_manifest(
|
|
"NFC PLUGIN",
|
|
"activity",
|
|
r#"<intent-filter>
|
|
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
</intent-filter>
|
|
|
|
<intent-filter>
|
|
<action android:name="android.nfc.action.TECH_DISCOVERED" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
</intent-filter>
|
|
|
|
<intent-filter>
|
|
<action android:name="android.nfc.action.TAG_DISCOVERED" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
</intent-filter>
|
|
|
|
<meta-data
|
|
android:name="android.nfc.action.TECH_DISCOVERED"
|
|
android:resource="@xml/nfc_tech_filter" />"#
|
|
.to_string(),
|
|
)
|
|
.expect("failed to rewrite AndroidManifest.xml");
|
|
}
|