diff --git a/NFCLockDemoV2/MainPage.xaml b/NFCLockDemoV2/MainPage.xaml index dd679d5..4ace71b 100644 --- a/NFCLockDemoV2/MainPage.xaml +++ b/NFCLockDemoV2/MainPage.xaml @@ -5,7 +5,8 @@ xmlns:viewModels="clr-namespace:NFCLockDemoV2.ViewModels" xmlns:converter="clr-namespace:NFCLockDemoV2.Converters" Shell.TabBarIsVisible="False" - Shell.NavBarIsVisible="False"> + Shell.NavBarIsVisible="False" + x:DataType="viewModels:MainViewModel"> @@ -18,7 +19,7 @@ - + --> + + + + + + + + + + + diff --git a/NFCLockDemoV2/MauiProgram.cs b/NFCLockDemoV2/MauiProgram.cs index 50af6e8..c9897ce 100644 --- a/NFCLockDemoV2/MauiProgram.cs +++ b/NFCLockDemoV2/MauiProgram.cs @@ -1,5 +1,8 @@ using Microsoft.Extensions.Logging; using NFCLockDemoV2.ViewModels; +#if ANDROID +using NFCLockDemoV2.Platforms.Android; +#endif namespace NFCLockDemoV2 { @@ -20,6 +23,9 @@ namespace NFCLockDemoV2 builder.Logging.AddDebug(); #endif builder.Services.AddSingleton(); +#if ANDROID + builder.Services.AddSingleton(); +#endif return builder.Build(); } } diff --git a/NFCLockDemoV2/NFCLockDemoV2.csproj b/NFCLockDemoV2/NFCLockDemoV2.csproj index 55c9ee5..e0004e0 100644 --- a/NFCLockDemoV2/NFCLockDemoV2.csproj +++ b/NFCLockDemoV2/NFCLockDemoV2.csproj @@ -80,6 +80,7 @@ manual iPhone Distribution + nfclockdemoProfile diff --git a/NFCLockDemoV2/Platforms/Android/MainActivity.cs b/NFCLockDemoV2/Platforms/Android/MainActivity.cs index 66b055a..0db7612 100644 --- a/NFCLockDemoV2/Platforms/Android/MainActivity.cs +++ b/NFCLockDemoV2/Platforms/Android/MainActivity.cs @@ -19,44 +19,24 @@ namespace NFCLockAppV2; public class MainActivity : MauiAppCompatActivity { private NFCHelper? nfcHelper; - private MainViewModel mainViewModel; - + private NFCCallbacks? NFCCallbacks; + protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); - InitializeNFC(); } private void InitializeNFC() { - if (!TryInitializeNFC()) - { - Microsoft.Maui.Controls.Application.Current.Dispatcher.Dispatch(() => - { - TryInitializeNFC(); - }); - } - } - - private bool TryInitializeNFC() - { - if (nfcHelper != null && mainViewModel != null) - return true; - - MainViewModel viewModel = null; if (Microsoft.Maui.Controls.Application.Current?.Handler?.MauiContext?.Services != null) { - viewModel = Microsoft.Maui.Controls.Application.Current.Handler.MauiContext.Services.GetService(); - } - - if (viewModel != null) - { - NFCCallbacks nFCCallbacks = new NFCCallbacks(viewModel); - nfcHelper = new NFCHelper(this, nFCCallbacks); - return true; + NFCCallbacks = Microsoft.Maui.Controls.Application.Current.Handler.MauiContext.Services.GetService(); } - return false; + if (NFCCallbacks != null) + { + nfcHelper = new NFCHelper(this, NFCCallbacks); + } } protected override void OnResume() @@ -64,18 +44,18 @@ public class MainActivity : MauiAppCompatActivity base.OnResume(); // 确保NFC功能在每次恢复时都已初始化 InitializeNFC(); - nfcHelper.OnResume(); + nfcHelper?.OnResume(); } protected override void OnPause() { base.OnPause(); - nfcHelper.OnPause(); + nfcHelper?.OnPause(); } protected override void OnNewIntent(Intent intent) { base.OnNewIntent(intent); - nfcHelper.OnNewIntent(intent); + nfcHelper?.OnNewIntent(intent); } } \ No newline at end of file diff --git a/NFCLockDemoV2/Platforms/Android/NFCCallbacks.cs b/NFCLockDemoV2/Platforms/Android/NFCCallbacks.cs index ff72e1f..14accc1 100644 --- a/NFCLockDemoV2/Platforms/Android/NFCCallbacks.cs +++ b/NFCLockDemoV2/Platforms/Android/NFCCallbacks.cs @@ -3,14 +3,13 @@ using Com.Lvcheng.Lock.Shared.Nfc.Example.Java; using NFCLockDemoV2.ViewModels; using Android.Util; using Exception = System.Exception; -using Microsoft.Maui.ApplicationModel; namespace NFCLockDemoV2.Platforms.Android { public class NFCCallbacks : Java.Lang.Object, INFCCallbacks { private readonly MainViewModel mainViewModel; - private ViewModels.OperationType? operation => mainViewModel.Operation; + private ViewModels.OperationType? Operation => mainViewModel.Operation; public NFCCallbacks(MainViewModel mainViewModel) { this.mainViewModel = mainViewModel; @@ -18,32 +17,25 @@ namespace NFCLockDemoV2.Platforms.Android public void OnFinished() { - MainThread.BeginInvokeOnMainThread(() => - { - mainViewModel.DeviceId = "--"; - mainViewModel.DeviceRssi = "--"; - mainViewModel.DeviceStatus = "NFC操作完成"; - mainViewModel.Operation = null; - mainViewModel.ArcProgress = 0; - }); + mainViewModel.DeviceId = "--"; + mainViewModel.DeviceRssi = "--"; + mainViewModel.DeviceStatus = "NFC操作完成"; + //mainViewModel.Operation = null; + mainViewModel.ArcProgress = 0; } public Java.Lang.Boolean? OnLoop(DeviceManagerWrapper? wrapper, Long? id, Java.Lang.Boolean? isNew, Integer? rssi) { try { - // 在主线程上更新UI - MainThread.BeginInvokeOnMainThread(() => - { - // 更新设备信息 - mainViewModel.DeviceId = id?.ToString() ?? "--"; - mainViewModel.DeviceRssi = rssi?.ToString() ?? "--"; - }); + // 更新设备信息 + mainViewModel.DeviceId = id?.ToString() ?? "--"; + mainViewModel.DeviceRssi = rssi?.ToString() ?? "--"; string password = mainViewModel.Password; // 开关锁需要先充电 - if (operation == ViewModels.OperationType.LOCK || operation == ViewModels.OperationType.UNLOCK) + if (Operation == ViewModels.OperationType.LOCK || Operation == ViewModels.OperationType.UNLOCK) { while (true) { @@ -52,19 +44,16 @@ namespace NFCLockDemoV2.Platforms.Android { Integer? level = wrapper.MGetChargeLevel(); string levelText = level?.ToString() ?? "0"; - + // 在主线程上更新UI - MainThread.BeginInvokeOnMainThread(() => + mainViewModel.UpdateMessage("充电中(" + levelText + "%)"); + + // 更新进度条 + if (level != null) { - mainViewModel.UpdateMessage("充电中(" + levelText + "%)"); - - // 更新进度条 - if (level != null) - { - mainViewModel.ArcProgress = level.IntValue(); - } - }); - + mainViewModel.ArcProgress = level.IntValue(); + } + if (level != null && level.IntValue() >= 100) { break; @@ -72,19 +61,13 @@ namespace NFCLockDemoV2.Platforms.Android } else if (result == Com.Lvcheng.Lock.Shared.Nfc.Result.Unauthorized) { - MainThread.BeginInvokeOnMainThread(() => - { - mainViewModel.UpdateMessage("验证失败"); - }); + mainViewModel.UpdateMessage("验证失败"); // 返回 false 手动结束 NFC 连接 return new Java.Lang.Boolean(false); } else { - MainThread.BeginInvokeOnMainThread(() => - { - mainViewModel.UpdateMessage("充电失败"); - }); + mainViewModel.UpdateMessage("充电失败"); return new Java.Lang.Boolean(false); } @@ -93,58 +76,40 @@ namespace NFCLockDemoV2.Platforms.Android } } - if (operation != null) + if (Operation != null) { - switch (operation) + switch (Operation) { case ViewModels.OperationType.UNLOCK: if (wrapper.Control(password, false) == Com.Lvcheng.Lock.Shared.Nfc.Result.Ok) { - MainThread.BeginInvokeOnMainThread(() => - { - mainViewModel.UpdateMessage("开锁成功"); - }); + mainViewModel.UpdateMessage("开锁成功"); } else { - MainThread.BeginInvokeOnMainThread(() => - { - mainViewModel.UpdateMessage("开锁失败"); - }); + mainViewModel.UpdateMessage("开锁失败"); } return new Java.Lang.Boolean(false); case ViewModels.OperationType.LOCK: if (wrapper.Control(password, true) == Com.Lvcheng.Lock.Shared.Nfc.Result.Ok) { - MainThread.BeginInvokeOnMainThread(() => - { - mainViewModel.UpdateMessage("关锁成功"); - }); + mainViewModel.UpdateMessage("关锁成功"); } else { - MainThread.BeginInvokeOnMainThread(() => - { - mainViewModel.UpdateMessage("关锁失败"); - }); + mainViewModel.UpdateMessage("关锁失败"); } return new Java.Lang.Boolean(false); case ViewModels.OperationType.SET_PASSWORD: if (wrapper.SetKey(password, "") == Com.Lvcheng.Lock.Shared.Nfc.Result.Ok) { - MainThread.BeginInvokeOnMainThread(() => - { - mainViewModel.UpdateMessage("设置密码成功"); - }); + mainViewModel.UpdateMessage("设置密码成功"); } else { - MainThread.BeginInvokeOnMainThread(() => - { - mainViewModel.UpdateMessage("设置密码失败"); - }); + mainViewModel.UpdateMessage("设置密码失败"); } return new Java.Lang.Boolean(false); } @@ -155,24 +120,18 @@ namespace NFCLockDemoV2.Platforms.Android catch (Exception ex) { Log.Error("NFCCallbacks", "Error in OnLoop: " + ex.Message); - MainThread.BeginInvokeOnMainThread(() => - { - mainViewModel.UpdateMessage("操作异常: " + ex.Message); - }); + mainViewModel.UpdateMessage("操作异常: " + ex.Message); return new Java.Lang.Boolean(false); } } public void OnLost() - { - MainThread.BeginInvokeOnMainThread(() => - { - mainViewModel.DeviceId = "--"; - mainViewModel.DeviceRssi = "--"; - mainViewModel.DeviceStatus = "设备连接断开"; - mainViewModel.Operation = null; - mainViewModel.ArcProgress = 0; - }); + { + mainViewModel.DeviceId = "--"; + mainViewModel.DeviceRssi = "--"; + mainViewModel.DeviceStatus = "设备连接断开"; + //mainViewModel.Operation = null; + mainViewModel.ArcProgress = 0; } } } \ No newline at end of file diff --git a/NFCLockDemoV2/Platforms/iOS/Info.plist b/NFCLockDemoV2/Platforms/iOS/Info.plist index e37729a..92ef7b2 100644 --- a/NFCLockDemoV2/Platforms/iOS/Info.plist +++ b/NFCLockDemoV2/Platforms/iOS/Info.plist @@ -36,6 +36,8 @@ nfc-tag-reading CFBundleIdentifier - + com.elitesys.nfclockdemov2 + MinimumOSVersion + 15.0 diff --git a/NFCLockDemoV2/ViewModels/MainViewModel.cs b/NFCLockDemoV2/ViewModels/MainViewModel.cs index c2f14b4..7a61d7d 100644 --- a/NFCLockDemoV2/ViewModels/MainViewModel.cs +++ b/NFCLockDemoV2/ViewModels/MainViewModel.cs @@ -1,3 +1,4 @@ +using System.Collections.ObjectModel; using System.Windows.Input; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; @@ -24,7 +25,13 @@ public class MainViewModel : ObservableObject public string DeviceId { get => _deviceId; - set => SetProperty(ref _deviceId, value); + set + { + if (SetProperty(ref _deviceId, value)) + { + AddDevice(value); + } + } } private string _deviceStatus = ""; @@ -49,14 +56,32 @@ public class MainViewModel : ObservableObject } public ICommand ControlCommand { get; set; } + public ICommand CopyCommand { get; set; } public void UpdateMessage(string message) { DeviceStatus = message; } + + public ObservableCollection Devices { get; set; } + + private void AddDevice(string deviceId) + { + if (deviceId != "--" && !Devices.Contains(deviceId)) + { + Devices.Add(deviceId); + } + } + + private async Task CopyToDeviceClipboardAsync(string text) + { + await Clipboard.SetTextAsync(text); + await Application.Current.MainPage.DisplayAlert("提示", $"已复制:{text}", "确定"); + } public MainViewModel() { + Devices = new ObservableCollection(); ControlCommand = new AsyncRelayCommand(val => { switch (val) @@ -77,5 +102,13 @@ public class MainViewModel : ObservableObject return Task.CompletedTask; }); + + CopyCommand = new AsyncRelayCommand(async (text) => + { + if (!string.IsNullOrEmpty(text)) + { + await CopyToDeviceClipboardAsync(text); + } + }); } } \ No newline at end of file diff --git a/NfcLock.Ios.Binding/NFCSDK.framework/Headers/NFCSDK.h b/NfcLock.Ios.Binding/NFCSDK.framework/Headers/NFCSDK.h deleted file mode 100644 index d56f6de..0000000 --- a/NfcLock.Ios.Binding/NFCSDK.framework/Headers/NFCSDK.h +++ /dev/null @@ -1,707 +0,0 @@ -#import -#import -#import -#import -#import -#import -#import - -@class NFCSDKCV, NFCSDKCVCompanion, NFCSDKCallFunctionTask, NFCSDKChargeLevel, NFCSDKCommonTask, NFCSDKControlProgress, NFCSDKControlTask, NFCSDKCtrl, NFCSDKCtrlCompanion, NFCSDKDevice, NFCSDKDeviceInfo, NFCSDKDeviceLog, NFCSDKDeviceManager, NFCSDKGetLogTask, NFCSDKKotlinArray, NFCSDKKotlinByteArray, NFCSDKKotlinByteIterator, NFCSDKKotlinEnum, NFCSDKKotlinEnumCompanion, NFCSDKKotlinException, NFCSDKKotlinIllegalStateException, NFCSDKKotlinPair<__covariant A, __covariant B>, NFCSDKKotlinRuntimeException, NFCSDKKotlinThrowable, NFCSDKKotlinUnit, NFCSDKMet, NFCSDKMetCompanion, NFCSDKParameters, NFCSDKResult, NFCSDKSetKeyTask, NFCSDKSetParametersTask, NFCSDKUserType, NFCSDKUserTypeCompanion; - -@protocol NFCSDKKotlinComparable, NFCSDKKotlinIterator, NFCSDKNFCCallbacks, NFCSDKNFCTag; - -NS_ASSUME_NONNULL_BEGIN -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunknown-warning-option" -#pragma clang diagnostic ignored "-Wincompatible-property-type" -#pragma clang diagnostic ignored "-Wnullability" - -#pragma push_macro("_Nullable_result") -#if !__has_feature(nullability_nullable_result) -#undef _Nullable_result -#define _Nullable_result _Nullable -#endif - -__attribute__((swift_name("KotlinBase"))) -@interface NFCSDKBase : NSObject -- (instancetype)init __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -+ (void)initialize __attribute__((objc_requires_super)); -@end - -@interface NFCSDKBase (NFCSDKBaseCopying) -@end - -__attribute__((swift_name("KotlinMutableSet"))) -@interface NFCSDKMutableSet : NSMutableSet -@end - -__attribute__((swift_name("KotlinMutableDictionary"))) -@interface NFCSDKMutableDictionary : NSMutableDictionary -@end - -@interface NSError (NSErrorNFCSDKKotlinException) -@property (readonly) id _Nullable kotlinException; -@end - -__attribute__((swift_name("KotlinNumber"))) -@interface NFCSDKNumber : NSNumber -- (instancetype)initWithChar:(char)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedChar:(unsigned char)value __attribute__((unavailable)); -- (instancetype)initWithShort:(short)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedShort:(unsigned short)value __attribute__((unavailable)); -- (instancetype)initWithInt:(int)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedInt:(unsigned int)value __attribute__((unavailable)); -- (instancetype)initWithLong:(long)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedLong:(unsigned long)value __attribute__((unavailable)); -- (instancetype)initWithLongLong:(long long)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedLongLong:(unsigned long long)value __attribute__((unavailable)); -- (instancetype)initWithFloat:(float)value __attribute__((unavailable)); -- (instancetype)initWithDouble:(double)value __attribute__((unavailable)); -- (instancetype)initWithBool:(BOOL)value __attribute__((unavailable)); -- (instancetype)initWithInteger:(NSInteger)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedInteger:(NSUInteger)value __attribute__((unavailable)); -+ (instancetype)numberWithChar:(char)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedChar:(unsigned char)value __attribute__((unavailable)); -+ (instancetype)numberWithShort:(short)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedShort:(unsigned short)value __attribute__((unavailable)); -+ (instancetype)numberWithInt:(int)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedInt:(unsigned int)value __attribute__((unavailable)); -+ (instancetype)numberWithLong:(long)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedLong:(unsigned long)value __attribute__((unavailable)); -+ (instancetype)numberWithLongLong:(long long)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedLongLong:(unsigned long long)value __attribute__((unavailable)); -+ (instancetype)numberWithFloat:(float)value __attribute__((unavailable)); -+ (instancetype)numberWithDouble:(double)value __attribute__((unavailable)); -+ (instancetype)numberWithBool:(BOOL)value __attribute__((unavailable)); -+ (instancetype)numberWithInteger:(NSInteger)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedInteger:(NSUInteger)value __attribute__((unavailable)); -@end - -__attribute__((swift_name("KotlinByte"))) -@interface NFCSDKByte : NFCSDKNumber -- (instancetype)initWithChar:(char)value; -+ (instancetype)numberWithChar:(char)value; -@end - -__attribute__((swift_name("KotlinUByte"))) -@interface NFCSDKUByte : NFCSDKNumber -- (instancetype)initWithUnsignedChar:(unsigned char)value; -+ (instancetype)numberWithUnsignedChar:(unsigned char)value; -@end - -__attribute__((swift_name("KotlinShort"))) -@interface NFCSDKShort : NFCSDKNumber -- (instancetype)initWithShort:(short)value; -+ (instancetype)numberWithShort:(short)value; -@end - -__attribute__((swift_name("KotlinUShort"))) -@interface NFCSDKUShort : NFCSDKNumber -- (instancetype)initWithUnsignedShort:(unsigned short)value; -+ (instancetype)numberWithUnsignedShort:(unsigned short)value; -@end - -__attribute__((swift_name("KotlinInt"))) -@interface NFCSDKInt : NFCSDKNumber -- (instancetype)initWithInt:(int)value; -+ (instancetype)numberWithInt:(int)value; -@end - -__attribute__((swift_name("KotlinUInt"))) -@interface NFCSDKUInt : NFCSDKNumber -- (instancetype)initWithUnsignedInt:(unsigned int)value; -+ (instancetype)numberWithUnsignedInt:(unsigned int)value; -@end - -__attribute__((swift_name("KotlinLong"))) -@interface NFCSDKLong : NFCSDKNumber -- (instancetype)initWithLongLong:(long long)value; -+ (instancetype)numberWithLongLong:(long long)value; -@end - -__attribute__((swift_name("KotlinULong"))) -@interface NFCSDKULong : NFCSDKNumber -- (instancetype)initWithUnsignedLongLong:(unsigned long long)value; -+ (instancetype)numberWithUnsignedLongLong:(unsigned long long)value; -@end - -__attribute__((swift_name("KotlinFloat"))) -@interface NFCSDKFloat : NFCSDKNumber -- (instancetype)initWithFloat:(float)value; -+ (instancetype)numberWithFloat:(float)value; -@end - -__attribute__((swift_name("KotlinDouble"))) -@interface NFCSDKDouble : NFCSDKNumber -- (instancetype)initWithDouble:(double)value; -+ (instancetype)numberWithDouble:(double)value; -@end - -__attribute__((swift_name("KotlinBoolean"))) -@interface NFCSDKBoolean : NFCSDKNumber -- (instancetype)initWithBool:(BOOL)value; -+ (instancetype)numberWithBool:(BOOL)value; -@end - -__attribute__((swift_name("KotlinComparable"))) -@protocol NFCSDKKotlinComparable -@required -- (int32_t)compareToOther:(id _Nullable)other __attribute__((swift_name("compareTo(other:)"))); -@end - -__attribute__((swift_name("KotlinEnum"))) -@interface NFCSDKKotlinEnum : NFCSDKBase -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) NFCSDKKotlinEnumCompanion *companion __attribute__((swift_name("companion"))); -- (int32_t)compareToOther:(E)other __attribute__((swift_name("compareTo(other:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@property (readonly) int32_t ordinal __attribute__((swift_name("ordinal"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("CV"))) -@interface NFCSDKCV : NFCSDKKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) NFCSDKCVCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) NFCSDKCV *low __attribute__((swift_name("low"))); -@property (class, readonly) NFCSDKCV *medium __attribute__((swift_name("medium"))); -@property (class, readonly) NFCSDKCV *high __attribute__((swift_name("high"))); -+ (NFCSDKKotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); -@property (readonly) uint16_t value __attribute__((swift_name("value"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("CV.Companion"))) -@interface NFCSDKCVCompanion : NFCSDKBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) NFCSDKCVCompanion *shared __attribute__((swift_name("shared"))); -- (NFCSDKCV * _Nullable)fromValueValue:(uint16_t)value __attribute__((swift_name("fromValue(value:)"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ChargeLevel"))) -@interface NFCSDKChargeLevel : NFCSDKBase -- (instancetype)initWithLevel:(uint16_t)level complete:(BOOL)complete __attribute__((swift_name("init(level:complete:)"))) __attribute__((objc_designated_initializer)); -- (NFCSDKChargeLevel *)doCopyLevel:(uint16_t)level complete:(BOOL)complete __attribute__((swift_name("doCopy(level:complete:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) BOOL complete __attribute__((swift_name("complete"))); -@property (readonly) uint16_t level __attribute__((swift_name("level"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ControlProgress"))) -@interface NFCSDKControlProgress : NFCSDKBase -- (instancetype)initWithProgress:(uint16_t)progress complete:(BOOL)complete __attribute__((swift_name("init(progress:complete:)"))) __attribute__((objc_designated_initializer)); -- (NFCSDKControlProgress *)doCopyProgress:(uint16_t)progress complete:(BOOL)complete __attribute__((swift_name("doCopy(progress:complete:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) BOOL complete __attribute__((swift_name("complete"))); -@property (readonly) uint16_t progress __attribute__((swift_name("progress"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ctrl"))) -@interface NFCSDKCtrl : NFCSDKKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) NFCSDKCtrlCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) NFCSDKCtrl *lock __attribute__((swift_name("lock"))); -@property (class, readonly) NFCSDKCtrl *unlock __attribute__((swift_name("unlock"))); -+ (NFCSDKKotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); -@property (readonly) uint8_t value __attribute__((swift_name("value"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ctrl.Companion"))) -@interface NFCSDKCtrlCompanion : NFCSDKBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) NFCSDKCtrlCompanion *shared __attribute__((swift_name("shared"))); -- (NFCSDKCtrl * _Nullable)fromValueValue:(uint8_t)value __attribute__((swift_name("fromValue(value:)"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Device"))) -@interface NFCSDKDevice : NFCSDKBase -- (instancetype)initWithS:(uint32_t)s __attribute__((swift_name("init(s:)"))) __attribute__((objc_designated_initializer)); -- (NFCSDKDevice *)doCopyS:(uint32_t)s __attribute__((swift_name("doCopy(s:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (uint32_t)shiftC:(uint16_t)c __attribute__((swift_name("shift(c:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) uint32_t s __attribute__((swift_name("s"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("DeviceInfo"))) -@interface NFCSDKDeviceInfo : NFCSDKBase -- (instancetype)initWithId:(uint64_t)id isNew:(BOOL)isNew __attribute__((swift_name("init(id:isNew:)"))) __attribute__((objc_designated_initializer)); -- (NFCSDKDeviceInfo *)doCopyId:(uint64_t)id isNew:(BOOL)isNew __attribute__((swift_name("doCopy(id:isNew:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) uint64_t id __attribute__((swift_name("id"))); -@property (readonly) BOOL isNew __attribute__((swift_name("isNew"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("DeviceLog"))) -@interface NFCSDKDeviceLog : NFCSDKBase -- (instancetype)initWithTimestamp:(uint64_t)timestamp username:(NSString *)username ctrl:(NFCSDKCtrl * _Nullable)ctrl __attribute__((swift_name("init(timestamp:username:ctrl:)"))) __attribute__((objc_designated_initializer)); -- (NFCSDKDeviceLog *)doCopyTimestamp:(uint64_t)timestamp username:(NSString *)username ctrl:(NFCSDKCtrl * _Nullable)ctrl __attribute__((swift_name("doCopy(timestamp:username:ctrl:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NFCSDKCtrl * _Nullable ctrl __attribute__((swift_name("ctrl"))); -@property (readonly) uint64_t timestamp __attribute__((swift_name("timestamp"))); -@property (readonly) NSString *username __attribute__((swift_name("username"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("DeviceManager"))) -@interface NFCSDKDeviceManager : NFCSDKBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)deviceManager __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) NFCSDKDeviceManager *shared __attribute__((swift_name("shared"))); - -/** - * @note This method converts instances of CancellationException to errors. - * Other uncaught Kotlin exceptions are fatal. -*/ -- (void)controlT:(id)t d:(NFCSDKDevice *)d key:(NFCSDKKotlinByteArray *)key ctrl:(NFCSDKCtrl *)ctrl completionHandler:(void (^)(NFCSDKResult * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("control(t:d:key:ctrl:completionHandler:)"))); -- (NFCSDKKotlinByteArray *)encKey:(NFCSDKKotlinByteArray *)key info:(NFCSDKDeviceInfo *)info __attribute__((swift_name("enc(key:info:)"))); - -/** - * @note This method converts instances of CancellationException to errors. - * Other uncaught Kotlin exceptions are fatal. -*/ -- (void)getChargeLevelT:(id)t d:(NFCSDKDevice *)d key:(NFCSDKKotlinByteArray *)key completionHandler:(void (^)(NFCSDKKotlinPair * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("getChargeLevel(t:d:key:completionHandler:)"))); - -/** - * @note This method converts instances of CancellationException to errors. - * Other uncaught Kotlin exceptions are fatal. -*/ -- (void)getControlProgressT:(id)t d:(NFCSDKDevice *)d key:(NFCSDKKotlinByteArray *)key completionHandler:(void (^)(NFCSDKKotlinPair * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("getControlProgress(t:d:key:completionHandler:)"))); - -/** - * @note This method converts instances of CancellationException to errors. - * Other uncaught Kotlin exceptions are fatal. -*/ -- (void)getInfoT:(id)t d:(NFCSDKDevice *)d completionHandler:(void (^)(NFCSDKKotlinPair * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("getInfo(t:d:completionHandler:)"))); - -/** - * @note This method converts instances of CancellationException to errors. - * Other uncaught Kotlin exceptions are fatal. -*/ -- (void)getLogT:(id)t d:(NFCSDKDevice *)d key:(NFCSDKKotlinByteArray *)key completionHandler:(void (^)(NFCSDKKotlinPair *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("getLog(t:d:key:completionHandler:)"))); - -/** - * @note This method converts instances of CancellationException to errors. - * Other uncaught Kotlin exceptions are fatal. -*/ -- (void)getRssiT:(id)t d:(NFCSDKDevice *)d completionHandler:(void (^)(NFCSDKKotlinPair * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("getRssi(t:d:completionHandler:)"))); - -/** - * @note This method converts instances of CancellationException to errors. - * Other uncaught Kotlin exceptions are fatal. -*/ -- (void)getVersionT:(id)t d:(NFCSDKDevice *)d key:(NFCSDKKotlinByteArray *)key completionHandler:(void (^)(NFCSDKKotlinPair *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("getVersion(t:d:key:completionHandler:)"))); - -/** - * @note This method converts instances of CancellationException to errors. - * Other uncaught Kotlin exceptions are fatal. -*/ -- (void)doInitT:(id)t completionHandler:(void (^)(NFCSDKKotlinPair * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("doInit(t:completionHandler:)"))); - -/** - * @note This method converts instances of CancellationException to errors. - * Other uncaught Kotlin exceptions are fatal. -*/ -- (void)selectT:(id)t d:(NFCSDKDevice *)d type:(NFCSDKUserType *)type completionHandler:(void (^)(NFCSDKResult * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("select(t:d:type:completionHandler:)"))); - -/** - * @note This method converts instances of CancellationException to errors. - * Other uncaught Kotlin exceptions are fatal. -*/ -- (void)setKeyT:(id)t d:(NFCSDKDevice *)d info:(NFCSDKDeviceInfo *)info key:(NFCSDKKotlinByteArray *)key sKey:(NFCSDKKotlinByteArray *)sKey completionHandler:(void (^)(NFCSDKResult * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("setKey(t:d:info:key:sKey:completionHandler:)"))); - -/** - * @note This method converts instances of CancellationException to errors. - * Other uncaught Kotlin exceptions are fatal. -*/ -- (void)setParametersT:(id)t d:(NFCSDKDevice *)d key:(NFCSDKKotlinByteArray *)key p:(NFCSDKParameters *)p completionHandler:(void (^)(NFCSDKResult * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("setParameters(t:d:key:p:completionHandler:)"))); -- (NFCSDKKotlinByteArray *)toFixed16Input:(NSString *)input __attribute__((swift_name("toFixed16(input:)"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("IOSNFCHelper"))) -@interface NFCSDKIOSNFCHelper : NFCSDKBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)controlPassword:(NSString *)password ctrl:(NFCSDKCtrl *)ctrl __attribute__((swift_name("control(password:ctrl:)"))); -- (void)lockPassword:(NSString *)password __attribute__((swift_name("lock(password:)"))); - -/** - * @note This method converts instances of CancellationException to errors. - * Other uncaught Kotlin exceptions are fatal. -*/ -- (void)processWithCompletionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("process(completionHandler:)"))); -- (void)setChargingCbCb:(void (^ _Nullable)(NSString *, NFCSDKInt * _Nullable))cb __attribute__((swift_name("setChargingCb(cb:)"))); -- (void)setControllingCbCb:(void (^ _Nullable)(NSString *, NFCSDKInt * _Nullable))cb __attribute__((swift_name("setControllingCb(cb:)"))); -- (void)setFinishedCbCb:(void (^ _Nullable)(void))cb __attribute__((swift_name("setFinishedCb(cb:)"))); -- (void)setLoopCbCb:(NFCSDKBoolean *(^)(NSString *, NFCSDKBoolean *, NFCSDKInt * _Nullable))cb __attribute__((swift_name("setLoopCb(cb:)"))); -- (void)setLostCbCb:(void (^ _Nullable)(void))cb __attribute__((swift_name("setLostCb(cb:)"))); -- (void)setTransceiverT:(void (^ _Nullable)(NFCSDKKotlinByteArray *, NFCSDKKotlinUnit *(^)(NFCSDKKotlinByteArray *)))t __attribute__((swift_name("setTransceiver(t:)"))); -- (void)unlockPassword:(NSString *)password __attribute__((swift_name("unlock(password:)"))); -@property void (^ _Nullable charging)(NSString *, NFCSDKInt * _Nullable) __attribute__((swift_name("charging"))); -@property void (^ _Nullable controlling)(NSString *, NFCSDKInt * _Nullable) __attribute__((swift_name("controlling"))); -@property void (^ _Nullable finished)(void) __attribute__((swift_name("finished"))); -@property NFCSDKBoolean *(^ _Nullable loop)(NSString *, NFCSDKBoolean *, NFCSDKInt * _Nullable) __attribute__((swift_name("loop"))); -@property void (^ _Nullable lost)(void) __attribute__((swift_name("lost"))); -@property void (^ _Nullable transceiver)(NFCSDKKotlinByteArray *, NFCSDKKotlinUnit *(^)(NFCSDKKotlinByteArray *)) __attribute__((swift_name("transceiver"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Met"))) -@interface NFCSDKMet : NFCSDKKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) NFCSDKMetCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) NFCSDKMet *single __attribute__((swift_name("single"))); -@property (class, readonly) NFCSDKMet *voltage __attribute__((swift_name("voltage"))); -@property (class, readonly) NFCSDKMet *timer __attribute__((swift_name("timer"))); -+ (NFCSDKKotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); -@property (readonly) uint8_t value __attribute__((swift_name("value"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Met.Companion"))) -@interface NFCSDKMetCompanion : NFCSDKBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) NFCSDKMetCompanion *shared __attribute__((swift_name("shared"))); -- (NFCSDKMet * _Nullable)fromValueValue:(uint8_t)value __attribute__((swift_name("fromValue(value:)"))); -@end - -__attribute__((swift_name("NFCTag"))) -@protocol NFCSDKNFCTag -@required - -/** - * @note This method converts instances of CancellationException to errors. - * Other uncaught Kotlin exceptions are fatal. -*/ -- (void)transceiveData:(NFCSDKKotlinByteArray *)data completionHandler:(void (^)(NFCSDKKotlinByteArray * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("transceive(data:completionHandler:)"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Parameters"))) -@interface NFCSDKParameters : NFCSDKBase -- (instancetype)initWithMethod:(NFCSDKMet *)method clampingVoltage:(NFCSDKCV *)clampingVoltage totalMotorRuntime:(uint16_t)totalMotorRuntime p1:(uint16_t)p1 p2:(uint16_t)p2 __attribute__((swift_name("init(method:clampingVoltage:totalMotorRuntime:p1:p2:)"))) __attribute__((objc_designated_initializer)); -- (NFCSDKParameters *)doCopyMethod:(NFCSDKMet *)method clampingVoltage:(NFCSDKCV *)clampingVoltage totalMotorRuntime:(uint16_t)totalMotorRuntime p1:(uint16_t)p1 p2:(uint16_t)p2 __attribute__((swift_name("doCopy(method:clampingVoltage:totalMotorRuntime:p1:p2:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NFCSDKCV *clampingVoltage __attribute__((swift_name("clampingVoltage"))); -@property (readonly) NFCSDKMet *method __attribute__((swift_name("method"))); -@property (readonly) uint16_t p1 __attribute__((swift_name("p1"))); -@property (readonly) uint16_t p2 __attribute__((swift_name("p2"))); -@property (readonly) uint16_t totalMotorRuntime __attribute__((swift_name("totalMotorRuntime"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Result"))) -@interface NFCSDKResult : NFCSDKKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) NFCSDKResult *ok __attribute__((swift_name("ok"))); -@property (class, readonly) NFCSDKResult *error __attribute__((swift_name("error"))); -@property (class, readonly) NFCSDKResult *unauthorized __attribute__((swift_name("unauthorized"))); -+ (NFCSDKKotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("UserType"))) -@interface NFCSDKUserType : NFCSDKKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) NFCSDKUserTypeCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) NFCSDKUserType *normal __attribute__((swift_name("normal"))); -@property (class, readonly) NFCSDKUserType *supervisor __attribute__((swift_name("supervisor"))); -+ (NFCSDKKotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); -@property (readonly) uint8_t value __attribute__((swift_name("value"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("UserType.Companion"))) -@interface NFCSDKUserTypeCompanion : NFCSDKBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) NFCSDKUserTypeCompanion *shared __attribute__((swift_name("shared"))); -- (NFCSDKUserType * _Nullable)fromValueValue:(uint8_t)value __attribute__((swift_name("fromValue(value:)"))); -@end - -__attribute__((swift_name("CommonTask"))) -@interface NFCSDKCommonTask : NFCSDKBase -@property (readonly) NSString *password __attribute__((swift_name("password"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("CallFunctionTask"))) -@interface NFCSDKCallFunctionTask : NFCSDKCommonTask -- (instancetype)initWithPassword:(NSString *)password data:(NSArray *)data index:(uint8_t)index callback:(void (^)(NFCSDKResult *, NSArray * _Nullable))callback __attribute__((swift_name("init(password:data:index:callback:)"))) __attribute__((objc_designated_initializer)); -- (NFCSDKCallFunctionTask *)doCopyPassword:(NSString *)password data:(NSArray *)data index:(uint8_t)index callback:(void (^)(NFCSDKResult *, NSArray * _Nullable))callback __attribute__((swift_name("doCopy(password:data:index:callback:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) void (^callback)(NFCSDKResult *, NSArray * _Nullable) __attribute__((swift_name("callback"))); -@property (readonly) NSArray *data __attribute__((swift_name("data"))); -@property (readonly) uint8_t index __attribute__((swift_name("index"))); -@property (readonly) NSString *password __attribute__((swift_name("password"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ControlTask"))) -@interface NFCSDKControlTask : NFCSDKCommonTask -- (instancetype)initWithPassword:(NSString *)password ctrl:(NFCSDKCtrl *)ctrl ignoreProgress:(BOOL)ignoreProgress chargeCallback:(void (^)(NFCSDKResult *, NFCSDKChargeLevel * _Nullable))chargeCallback controlCallback:(void (^)(NFCSDKResult *, NFCSDKControlProgress * _Nullable))controlCallback __attribute__((swift_name("init(password:ctrl:ignoreProgress:chargeCallback:controlCallback:)"))) __attribute__((objc_designated_initializer)); -- (NFCSDKControlTask *)doCopyPassword:(NSString *)password ctrl:(NFCSDKCtrl *)ctrl ignoreProgress:(BOOL)ignoreProgress chargeCallback:(void (^)(NFCSDKResult *, NFCSDKChargeLevel * _Nullable))chargeCallback controlCallback:(void (^)(NFCSDKResult *, NFCSDKControlProgress * _Nullable))controlCallback __attribute__((swift_name("doCopy(password:ctrl:ignoreProgress:chargeCallback:controlCallback:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) void (^chargeCallback)(NFCSDKResult *, NFCSDKChargeLevel * _Nullable) __attribute__((swift_name("chargeCallback"))); -@property (readonly) void (^controlCallback)(NFCSDKResult *, NFCSDKControlProgress * _Nullable) __attribute__((swift_name("controlCallback"))); -@property (readonly) NFCSDKCtrl *ctrl __attribute__((swift_name("ctrl"))); -@property (readonly) BOOL ignoreProgress __attribute__((swift_name("ignoreProgress"))); -@property (readonly) NSString *password __attribute__((swift_name("password"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("GetLogTask"))) -@interface NFCSDKGetLogTask : NFCSDKCommonTask -- (instancetype)initWithPassword:(NSString *)password callback:(void (^)(NFCSDKResult *, NSArray * _Nullable))callback __attribute__((swift_name("init(password:callback:)"))) __attribute__((objc_designated_initializer)); -- (NFCSDKGetLogTask *)doCopyPassword:(NSString *)password callback:(void (^)(NFCSDKResult *, NSArray * _Nullable))callback __attribute__((swift_name("doCopy(password:callback:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) void (^callback)(NFCSDKResult *, NSArray * _Nullable) __attribute__((swift_name("callback"))); -@property (readonly) NSString *password __attribute__((swift_name("password"))); -@end - -__attribute__((swift_name("NFCCallbacks"))) -@protocol NFCSDKNFCCallbacks -@required -- (void)onFinished __attribute__((swift_name("onFinished()"))); -- (BOOL)onLoopInfo:(NFCSDKDeviceInfo *)info rssi:(NFCSDKUInt * _Nullable)rssi __attribute__((swift_name("onLoop(info:rssi:)"))); -- (void)onLost __attribute__((swift_name("onLost()"))); -@end - -__attribute__((swift_name("NFCHelper"))) -@interface NFCSDKNFCHelper : NFCSDKBase -- (instancetype)initWithCallback:(id)callback __attribute__((swift_name("init(callback:)"))) __attribute__((objc_designated_initializer)); - -/** - * @note This method converts instances of CancellationException to errors. - * Other uncaught Kotlin exceptions are fatal. -*/ -- (void)getNFCTagParameter:(id _Nullable)parameter completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("getNFCTag(parameter:completionHandler:)"))); - -/** - * @note This method converts instances of CancellationException to errors. - * Other uncaught Kotlin exceptions are fatal. -*/ -- (void)processParameter:(id _Nullable)parameter completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("process(parameter:completionHandler:)"))); -- (void)setTaskTask:(NFCSDKCommonTask * _Nullable)task __attribute__((swift_name("setTask(task:)"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("SetKeyTask"))) -@interface NFCSDKSetKeyTask : NFCSDKCommonTask -- (instancetype)initWithPassword:(NSString *)password sKey:(NSString *)sKey callback:(void (^)(NFCSDKResult *))callback __attribute__((swift_name("init(password:sKey:callback:)"))) __attribute__((objc_designated_initializer)); -- (NFCSDKSetKeyTask *)doCopyPassword:(NSString *)password sKey:(NSString *)sKey callback:(void (^)(NFCSDKResult *))callback __attribute__((swift_name("doCopy(password:sKey:callback:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) void (^callback)(NFCSDKResult *) __attribute__((swift_name("callback"))); -@property (readonly) NSString *password __attribute__((swift_name("password"))); -@property (readonly) NSString *sKey __attribute__((swift_name("sKey"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("SetParametersTask"))) -@interface NFCSDKSetParametersTask : NFCSDKCommonTask -- (instancetype)initWithPassword:(NSString *)password parameters:(NFCSDKParameters *)parameters callback:(void (^)(NFCSDKResult *))callback __attribute__((swift_name("init(password:parameters:callback:)"))) __attribute__((objc_designated_initializer)); -- (NFCSDKSetParametersTask *)doCopyPassword:(NSString *)password parameters:(NFCSDKParameters *)parameters callback:(void (^)(NFCSDKResult *))callback __attribute__((swift_name("doCopy(password:parameters:callback:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) void (^callback)(NFCSDKResult *) __attribute__((swift_name("callback"))); -@property (readonly) NFCSDKParameters *parameters __attribute__((swift_name("parameters"))); -@property (readonly) NSString *password __attribute__((swift_name("password"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Platform_iosKt"))) -@interface NFCSDKPlatform_iosKt : NFCSDKBase -+ (int64_t)platformGetCurrentTimestamp __attribute__((swift_name("platformGetCurrentTimestamp()"))); -+ (NSString *)platformGetName __attribute__((swift_name("platformGetName()"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinEnumCompanion"))) -@interface NFCSDKKotlinEnumCompanion : NFCSDKBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) NFCSDKKotlinEnumCompanion *shared __attribute__((swift_name("shared"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinArray"))) -@interface NFCSDKKotlinArray : NFCSDKBase -+ (instancetype)arrayWithSize:(int32_t)size init:(T _Nullable (^)(NFCSDKInt *))init __attribute__((swift_name("init(size:init:)"))); -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); -- (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); -@end - -__attribute__((swift_name("KotlinThrowable"))) -@interface NFCSDKKotlinThrowable : NFCSDKBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCause:(NFCSDKKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(NFCSDKKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); - -/** - * @note annotations - * kotlin.experimental.ExperimentalNativeApi -*/ -- (NFCSDKKotlinArray *)getStackTrace __attribute__((swift_name("getStackTrace()"))); -- (void)printStackTrace __attribute__((swift_name("printStackTrace()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NFCSDKKotlinThrowable * _Nullable cause __attribute__((swift_name("cause"))); -@property (readonly) NSString * _Nullable message __attribute__((swift_name("message"))); -- (NSError *)asError __attribute__((swift_name("asError()"))); -@end - -__attribute__((swift_name("KotlinException"))) -@interface NFCSDKKotlinException : NFCSDKKotlinThrowable -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCause:(NFCSDKKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(NFCSDKKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); -@end - -__attribute__((swift_name("KotlinRuntimeException"))) -@interface NFCSDKKotlinRuntimeException : NFCSDKKotlinException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCause:(NFCSDKKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(NFCSDKKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); -@end - -__attribute__((swift_name("KotlinIllegalStateException"))) -@interface NFCSDKKotlinIllegalStateException : NFCSDKKotlinRuntimeException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCause:(NFCSDKKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(NFCSDKKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); -@end - - -/** - * @note annotations - * kotlin.SinceKotlin(version="1.4") -*/ -__attribute__((swift_name("KotlinCancellationException"))) -@interface NFCSDKKotlinCancellationException : NFCSDKKotlinIllegalStateException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCause:(NFCSDKKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(NFCSDKKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinByteArray"))) -@interface NFCSDKKotlinByteArray : NFCSDKBase -+ (instancetype)arrayWithSize:(int32_t)size __attribute__((swift_name("init(size:)"))); -+ (instancetype)arrayWithSize:(int32_t)size init:(NFCSDKByte *(^)(NFCSDKInt *))init __attribute__((swift_name("init(size:init:)"))); -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (int8_t)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (NFCSDKKotlinByteIterator *)iterator __attribute__((swift_name("iterator()"))); -- (void)setIndex:(int32_t)index value:(int8_t)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinPair"))) -@interface NFCSDKKotlinPair<__covariant A, __covariant B> : NFCSDKBase -- (instancetype)initWithFirst:(A _Nullable)first second:(B _Nullable)second __attribute__((swift_name("init(first:second:)"))) __attribute__((objc_designated_initializer)); -- (NFCSDKKotlinPair *)doCopyFirst:(A _Nullable)first second:(B _Nullable)second __attribute__((swift_name("doCopy(first:second:)"))); -- (BOOL)equalsOther:(id _Nullable)other __attribute__((swift_name("equals(other:)"))); -- (int32_t)hashCode __attribute__((swift_name("hashCode()"))); -- (NSString *)toString __attribute__((swift_name("toString()"))); -@property (readonly) A _Nullable first __attribute__((swift_name("first"))); -@property (readonly) B _Nullable second __attribute__((swift_name("second"))); -@end - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinUnit"))) -@interface NFCSDKKotlinUnit : NFCSDKBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)unit __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) NFCSDKKotlinUnit *shared __attribute__((swift_name("shared"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@end - -__attribute__((swift_name("KotlinIterator"))) -@protocol NFCSDKKotlinIterator -@required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); -@end - -__attribute__((swift_name("KotlinByteIterator"))) -@interface NFCSDKKotlinByteIterator : NFCSDKBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (NFCSDKByte *)next __attribute__((swift_name("next()"))); -- (int8_t)nextByte __attribute__((swift_name("nextByte()"))); -@end - -#pragma pop_macro("_Nullable_result") -#pragma clang diagnostic pop -NS_ASSUME_NONNULL_END diff --git a/NfcLock.Ios.Binding/NFCSDK.framework/Info.plist b/NfcLock.Ios.Binding/NFCSDK.framework/Info.plist deleted file mode 100644 index fde4c1f..0000000 --- a/NfcLock.Ios.Binding/NFCSDK.framework/Info.plist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - CFBundleExecutable - NFCSDK - CFBundleIdentifier - com.lvcheng.lock.shared.nfc.kmp.NFCSDK - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - NFCSDK - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSupportedPlatforms - - iPhoneOS - - CFBundleVersion - 1 - MinimumOSVersion - 12.0 - UIDeviceFamily - - 1 - 2 - - UIRequiredDeviceCapabilities - - arm64 - - - \ No newline at end of file diff --git a/NfcLock.Ios.Binding/NFCSDK.framework/Modules/module.modulemap b/NfcLock.Ios.Binding/NFCSDK.framework/Modules/module.modulemap deleted file mode 100644 index 4348bc5..0000000 --- a/NfcLock.Ios.Binding/NFCSDK.framework/Modules/module.modulemap +++ /dev/null @@ -1,8 +0,0 @@ -framework module "NFCSDK" { - umbrella header "NFCSDK.h" - - export * - module * { export * } - - use Foundation -} diff --git a/NfcLock.Ios.Binding/NFCSDK.framework/NFCSDK b/NfcLock.Ios.Binding/NFCSDK.framework/NFCSDK deleted file mode 100755 index db0a37a..0000000 Binary files a/NfcLock.Ios.Binding/NFCSDK.framework/NFCSDK and /dev/null differ diff --git a/NfcLock.Ios.Binding/NfcLock.Ios.Binding.csproj b/NfcLock.Ios.Binding/NfcLock.Ios.Binding.csproj index 105147e..3f12e35 100644 --- a/NfcLock.Ios.Binding/NfcLock.Ios.Binding.csproj +++ b/NfcLock.Ios.Binding/NfcLock.Ios.Binding.csproj @@ -41,7 +41,7 @@ - CoreNFC Foundation + CoreNFC NFCSDK Framework True False @@ -60,7 +60,7 @@ Framework True - CoreNFC Foundation + CoreNFC NFCSDK False