From 4db0e14c026379a2b8bf549e56c642cb86a3f37c Mon Sep 17 00:00:00 2001
From: denggaofeng <1139968554@qq.com>
Date: Mon, 26 Jan 2026 12:11:02 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
NFCLockDemoV2/MainPage.xaml.cs | 8 ++++++--
NFCLockDemoV2/Platforms/iOS/Info.plist | 6 ++++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/NFCLockDemoV2/MainPage.xaml.cs b/NFCLockDemoV2/MainPage.xaml.cs
index 6a18fea..bf13a89 100644
--- a/NFCLockDemoV2/MainPage.xaml.cs
+++ b/NFCLockDemoV2/MainPage.xaml.cs
@@ -66,12 +66,16 @@ public partial class MainPage : ContentPage
InitializeComponent();
_mainMainViewModel = mainViewModel;
BindingContext = _mainMainViewModel;
-
+ }
+
+ protected override void OnAppearing()
+ {
+ base.OnAppearing();
#if IOS
SetNFCCallbacks();
#endif
}
-
+
private void LockClicked(object? sender, EventArgs e)
{
#if IOS
diff --git a/NFCLockDemoV2/Platforms/iOS/Info.plist b/NFCLockDemoV2/Platforms/iOS/Info.plist
index d867286..bae4984 100644
--- a/NFCLockDemoV2/Platforms/iOS/Info.plist
+++ b/NFCLockDemoV2/Platforms/iOS/Info.plist
@@ -30,5 +30,11 @@
Assets.xcassets/appicon.appiconset
NFCReaderUsageDescription
此应用需要使用NFC功能来与智能锁设备通信
+ UIBackgroundModes
+
+ fetch
+
+ nfc-tag-reading
+