Hello, I have read your guide UG10045 and I have successfully integrated the Taplink iOS SDK in a demo Project.
In section 5.2 you describe the selection and change of applications.
I am interested because I want to use EV3 Card features.
So I tried to do a creation and selection of a specific application, with appId = [0x11, 022, 0x33]
As reference, I do the same operations on a Android App using the TApLink SDK Android; in Android enviroment everything goes smoothly.
I report my code
//var desfire = TLLibraryManager.shared().getDESFireEV3Instance()
desfire.selectApplicationPICCP1 { selectedPICCOK in
let text = "Selected PICC: \(selectedPICCOK)"
os_log("Internal Log - %{public}@", log: OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "DemoLog"), type: .error, text)
let settings = CreateAppSettingsModel()
settings.appKeySettingChangable = true
settings.masterKeyInterchangable = true
settings.authRequiredForFileManagement = false
settings.authRequiredForFileConfiguration = false
settings.keyType = .AES128
desfire.createApplication(withAppID: self.appId, withNumberOfBytes: 16, withAppSettings: settings) { createdOK in
let text = "CREATED Application: \(createdOK)"
os_log("Internal Log - %{public}@", log: OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "DemoLog"), type: .error, text)
desfire.selectApplication(withAppID: self.appId, withNumberOfBytes: 16) { selectedOK in
let text = "SELECTED Application: \(createdOK)"
os_log("Internal Log - %{public}@", log: OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "DemoLog"), type: .error, text)
I initialize the appId in this way:
private let appId: Int32 = 0x112233
That seems to generate strange errors; I received this from library:
com.nxp.nfclib.exceptions.UsageException: Application ID [appId] must be 3 bytes
but the appId is indeed 3 bytes!
I attach complete logs.
I hope you can help me to resolve this.