From 9683a09ac4ce8a112aad924ca849d4f4ebc05340 Mon Sep 17 00:00:00 2001 From: Arno Moonen Date: Tue, 4 Aug 2020 16:05:57 +0200 Subject: [PATCH] Use correct key for NDEF Record identifier in writeTag for iOS. --- src/ios/NfcPlugin.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ios/NfcPlugin.m b/src/ios/NfcPlugin.m index 9b40f251..8a3f2ccc 100644 --- a/src/ios/NfcPlugin.m +++ b/src/ios/NfcPlugin.m @@ -105,7 +105,7 @@ - (void)writeTag:(CDVInvokedUrlCommand*)command API_AVAILABLE(ios(13.0)){ NSNumber *tnfNumber = [recordData objectForKey:@"tnf"]; NFCTypeNameFormat tnf = (uint8_t)[tnfNumber intValue]; NSData *type = [self uint8ArrayToNSData:[recordData objectForKey:@"type"]]; - NSData *identifier = [self uint8ArrayToNSData:[recordData objectForKey:@"identifiers"]]; + NSData *identifier = [self uint8ArrayToNSData:[recordData objectForKey:@"id"]]; NSData *payload = [self uint8ArrayToNSData:[recordData objectForKey:@"payload"]]; NFCNDEFPayload *record = [[NFCNDEFPayload alloc] initWithFormat:tnf type:type identifier:identifier payload:payload]; [payloads addObject:record];