slot refused to allocate exclusive session for the card

I try to send apdu command via smartcard with Cryptotokenkit on IOS application but got some error

in debug log

[smartcard] slot refused to allocate exclusive session for the card "error domain=cryptotokenkit code=-2 "(null)""

for my code please see below code

// connect to the card
        mngr?.getSlot(withName: slotName, reply: {
            (slot:TKSmartCardSlot?) in
            let card = slot?.makeSmartCard()
            if card != nil {
                
                // begin session
                card?.beginSession{
                   ( success:Bool,error:Error?) in
                    if success {
                        // Send 1st APDU
                        card?.send(ins: 0x84, p1: 0x00, p2: 0x00,le:8){
                            (data:Data?,sw:UInt16,error:Error?) in
                            if error != nil {
                                print("sendIns error:",error!)
                            }else{
                                print("Response:",data!,String(sw,radix: 16))
                                //String(format: "%02X", data! as CVarArg)
                            }
                        }
                        
                    }else{
                        print("Session error:",error!)
                    }
                }
            }else{
                print("No card found")
            }
        })

So i'm not sure what i do wrong on this

Answered by DTS Engineer in 813592022
slot refused to allocate exclusive session for the card
 
 
Q