Open arrutherford opened 3 years ago
Ive managed to get it working by altering NfcInFlutterPlugin.m
altering the if statement at line 391 to the following: if ([@"T" isEqualToString:recordType]) { payloadData = [[NSString stringWithFormat:@"%c%@%@", recordLanguageCode.length, recordLanguageCode, recordPayload] dataUsingEncoding:NSUTF8StringEncoding]; tnfValue = NFCTypeNameFormatNFCWellKnown; }
it seems that the "wellKnownTypeTextPayloadWithString" function call in the original code always returned the record as utf16
Hi there,
I've been using nfc_in_flutter on android quite successfully, but when I got around to setting it up on iOS the result wasn't as expected.
I am creating a tag with a single text record, on android it writes as expected (encoding the payload in utf8), however, on iOS it encodes as utf-16.
List records = [
NDEFRecord.text(
payload,
)
];
Has anyone else seen this issue?