From 31351eb0b351e0cb3ed3772f72176838be401ef7 Mon Sep 17 00:00:00 2001 From: wtto00 Date: Thu, 6 Jun 2024 21:58:56 +0800 Subject: [PATCH] core: add plugin only on macos --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index aa41cda..542ade8 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,13 @@ A plugin of In App Purchase for Tauri on MacOS. ```rs fn main() { tauri::Builder::default() - .plugin(tauri_plugin_iap::init()) // Add this line + .setup(move |app| { + // Add this line + #[cfg(target_os="macos")] + app.app_handle().plugin(plugins::refister_iap())?; + + Ok(()) + }) .run(tauri::generate_context!()) .expect("error while running tauri application"); }