Open AmaurySchmitt opened 3 years ago
Do you check and enable "NFC" in the signing and capabilities area ? (Don't forget to check for release and debug mode)
I have the same issue, even though NFC capabilities and Privacy Usage Description was added...
Do you check and enable "NFC" in the signing and capabilities area ? (Don't forget to check for release and debug mode)
Yes but always the same problem, idk why 🥲
Do you try to upgrade CapacitorJS to V2 ? Do you try your App on different devices ? Or only simulator ? (NFC doesn't work on Simulator)
Yes I'm currently in v2.4 for Capacitor, however the NFC work's fine with Android but doesn't work with IOS. Maybe, I need to have an account Apple Developer for unlock the functionality ?
And yes, all my tests are on real devices, not simulators. Maybe can help, I run my app on iPhone 11 Pro Max with IOS14.6
Maybe, I need to have an account Apple Developer for unlock the functionality ?
I wonder how did you manage to develop anything for ios until now without an apple dev. account!?
Add into your config.xml
(frankly speaking, this should be in phonegap-nfc/plugin.xml
):
<platform name="ios">
<config-file target="*.entitlements" parent="com.apple.developer.nfc.readersession.formats">
<array>
<string>NDEF</string>
<string>TAG</string>
</array>
</config-file>
</platform>
This code adds capability to NFC access, because this is missing in plugin.xml
.
It is nearly same as XCode -> "Signing&Capabilities" tab -> "+Capability" button -> "N.F.C. Tag Reading" list item.
Templated from here.
Also you need to do some setup in the Developer portal.
check the first step here: https://github.com/revtel/react-native-nfc-manager/blob/HEAD/setup.md
Hello,
I have a big problem with the NFC (I use Ionic & Capacitor), indeed despite having uninstalled and reinstalled it still gives me the same error when I compile it on an IOS emulator:
[CoreNFC] 00000002 822651e0 -[NFCHardwareManager areFeaturesSupported:outError:]:154 XPC Error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.nfcd.service.corenfc was invalidated from this process." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.nfcd.service.corenfc was invalidated from this process.
I don't understand this error, I correctly add the right line on Info.plist to say that I am using NFC :
Ionic v5.33.1 Angular v12.1.0 Capacitor v1.2.0