Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when unlocking lock in maui #39

Open
uengmim opened this issue Aug 28, 2024 · 5 comments
Open

Error when unlocking lock in maui #39

uengmim opened this issue Aug 28, 2024 · 5 comments

Comments

@uengmim
Copy link

uengmim commented Aug 28, 2024

Hello, I'm using TTLock in maui. I converted the Objective-C code to C# for developing the ios code, but the following error occurs.
Objective-C exception thrown. Narne: NSInvalidArgumentException Reason: [NSInlineData AES256DecryptWithKey:glv:]: unrecognized selector sent to instance Ox117 15800 Native stack trace 0 CoreFoundation Ox0000000180fb7070 6174789A-E88C-3F5C- BA39-DE2E9EDC0750+626800 1 libobjc.A.dylib 0x00000001994d1f54 objc_exception_throw + 60 2 CoreFoundation Ox000000018109401c 6174789A-E88C-3F5C- BA39-DE2E9EDC0750+ 1531932 3 CoreFoundation Ox0000000180f4c484 6174789A-E88C-3F5C- BA39-DE2E9EDC0750+ 189572 4 CoreFoundation 0x0000000180f4b5c0_CF_forwarding_prep_0 t 96 5 WorkerScreen 0x0000000100fb7d9c WorkerScreen +195996 6 WorkerScreen 0x000000010f9b3a8 WorkerScreen +78760 7 WorkerScreen Ox0000000100fb869c WorkerScreen +198300 8 WorkerScreen Ox0000000100fb8640 WorkerScreen + 198208 9 WorkerScreen 0x0000000100f8c8c0 WorkerScreen + 18624 10 WorkerScreen 0x0000000100f9dfac WorkerScreen +90028 11 WorkerScreen Ox0000000101016088 xamarin_get_original_working_directory_path +8604 12 WorkerScreen Ox0000000101342818
What kind of error is this?

    /// <summary>
    /// TTLOCK UnLock
    /// </summary>
    /// <param name="device">Lock devide</param>
    /// <param name="LockData">Lock data</param>
    public void DoUnlock(LockDevice device, string LockData)
    {

        TTLock.ControlLockWithControlAction(TTControlAction.TTControlActionUnlock, LockData, ControlActionSucceedBlock, ControlActionFailedBlock);
    }
    
    C# is using it like this.
@ttlock
Copy link
Owner

ttlock commented Aug 28, 2024

Reason: [NSInlineData AES256DecryptWithKey:glv:] ... Because it is missing -ObjC.
Important! Find Target->Build Settings -> Linking -> Other Linker Flags ,add -ObjC(If it already exists, there is no need to add it.)

@mingyu0805
Copy link

이유: [NSInlineData AES256DecryptWithKey:glv:] ... -ObjC가 없기 때문입니다. 중요! 대상 찾기->빌드 설정 -> 연결 -> 다른 링커 플래그, -ObjC 추가(이미 있는 경우 추가할 필요가 없습니다.)

Thank you for your answer.
The same error occurs even though -ObjC has already been added to the Other Linker Flags in XCode.
In that case, do I need to set up something else?
It is being developed by visual studio.

@ttlock
Copy link
Owner

ttlock commented Aug 28, 2024

target Maybe this position is not checked.

@uengmim
Copy link
Author

uengmim commented Sep 3, 2024

Reason: [NSInlineData AES256DecryptWithKey:glv:] ... Because it is missing -ObjC. Important! Find Target->Build Settings -> Linking -> Other Linker Flags ,add -ObjC(If it already exists, there is no need to add it.)

Do I have to use XCode? Can't I just run it with VisualStudio?
This method cannot be added in VisualStudio.

@ttlock
Copy link
Owner

ttlock commented Sep 3, 2024

sorry, We do not used Visual Studio before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants