ios
This commit is contained in:
parent
b10b9110aa
commit
ad79d89f6c
@ -14,7 +14,11 @@ public partial class MainPage : ContentPage
|
|||||||
#if IOS
|
#if IOS
|
||||||
private void SetNFCCallbacks()
|
private void SetNFCCallbacks()
|
||||||
{
|
{
|
||||||
NFCManager.SetLoopCbWithCb();
|
NFCManager.SetLoopCbWithCb((NSString id, bool isNew,int rssi) => {
|
||||||
|
_mainMainViewModel.DeviceId = id;
|
||||||
|
_mainMainViewModel.DeviceRssi = rssi.ToString();
|
||||||
|
return true;
|
||||||
|
});
|
||||||
NFCManager.SetFinishedCbWithCb(() =>
|
NFCManager.SetFinishedCbWithCb(() =>
|
||||||
{
|
{
|
||||||
System.Diagnostics.Debug.WriteLine("finished");
|
System.Diagnostics.Debug.WriteLine("finished");
|
||||||
|
|||||||
@ -26,7 +26,7 @@ namespace NfcLock.Ios.Binding
|
|||||||
// +(void)setLoopCbWithCb:(id)cb;
|
// +(void)setLoopCbWithCb:(id)cb;
|
||||||
[Static]
|
[Static]
|
||||||
[Export ("setLoopCbWithCb:")]
|
[Export ("setLoopCbWithCb:")]
|
||||||
void SetLoopCbWithCb (Func<NSString, bool, nint, bool> callback);
|
void SetLoopCbWithCb (Func<NSString, bool, int, bool> cb);
|
||||||
|
|
||||||
// +(void)setFinishedCbWithCb:(void (^ _Nonnull)(void))cb;
|
// +(void)setFinishedCbWithCb:(void (^ _Nonnull)(void))cb;
|
||||||
[Static]
|
[Static]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user