I would like to send APDU commands to SIM card which is a smart card with TKSmardCard. It wasn't possible to use TKSmardCard before iOS13 but it is now. Is TKSmartCard api only for external Smart Card reader and not for the built-in SIM card (Smart Card) reader?
import CryptoTokenKit
class SmartCardManager: NSObject {
let smartCardSlotManager: TKSmartCardSlotManager?
override init() {
smartCardSlotManager = TKSmartCardSlotManager()
}
}
I have set 'com.apple.security.smartcard' entitlement to YES. I have an error message when I want to use TKSmartCardSlotManager:
SmartCard[2408:150605] [smartcard] ctk: connecting to slot registration server
(<NSXPCConnection: 0x600003221440> connection to service on pid 0 named com.apple.ctkd.slot-client) failed,
error Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.ctkd.slot-client was invalidated."
UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.ctkd.slot-client was invalidated.}
I didn't find anything linked to 'com.apple.ctkd.slot-client' on Google.