bug(ios): NFC reader dialog does not open
robingenz opened this issue ยท 1 comments
robingenz commented
Plugin version:
- 0.1.1
Platform(s):
- iOS
Current behavior:
The NFC reader dialog does not open.
import { Nfc, NfcUtils } from '@capawesome-team/capacitor-nfc';
const createNdefTextRecord = async () => {
const utils = new NfcUtils();
const { record } = utils.createNdefTextRecord({ text: 'Capacitor NFC Plugin' });
return record;
};
const write = async () => {
const record = createNdefTextRecord();
Nfc.addListener('nfcTagScanned', async (event) => {
await Nfc.write({ message: { records: [record] } });
});
await Nfc.startScanSession();
};
Expected behavior:
The NFC reader dialog should open.
Steps to reproduce:
Related code:
insert short code snippets here
Other information:
Capacitor doctor:
๐ Capacitor Doctor ๐
Latest Dependencies:
@capacitor/cli: 4.3.0
@capacitor/core: 4.3.0
@capacitor/android: 4.3.0
@capacitor/ios: 4.3.0
Installed Dependencies:
@capacitor/cli: 4.3.0
@capacitor/android: 4.3.0
@capacitor/core: 4.3.0
@capacitor/ios: 4.3.0
[success] iOS looking great! ๐
robingenz commented
Temporary Workaround
Add the following to your Info.plist
:
<key>com.apple.developer.nfc.readersession.felica.systemcodes</key>
<array>
<string>0003</string>
</array>
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>D2760000850100</string>
<string>D2760000850101</string>
</array>