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
+