This library is built on the Expo Modules API, which does not require the Expo SDK. It
requires the
expo package, which ships the module and autolinking infrastructure and little
else.prebuild to run it — so the plist keys
and manifest XML are yours to write, and every setup page gives
you exactly what to write.
Install
install-expo-modules adds the expo package, switches the Babel config to
babel-preset-expo, and extends metro.config.js from expo/metro-config. Doing
it by hand means writing those three things yourself:
babel.config.js
metro.config.js
ios/Podfile
npx pod-install.
Requirements
CoreNFC has existed since iOS 11, so with a 16.4 floor there is no weak linking to
arrange and no
-weak_framework CoreNFC hack to copy from anywhere.
Native configuration
Pick the page for what you are building and copy the blocks under Bare React Native:NDEF
The baseline every project needs.
ISO 7816
Plus the AIDs you select.
FeliCa
Plus the system codes you read.
Background tags
Plus intent filters.
The iOS capability
Editing the entitlements file is not enough on its own. The App ID needs the capability too:1
Open your App ID
In the Apple Developer portal.
2
Enable Near Field Communication Tag Reading
In the identifier’s capability list.
3
Regenerate the provisioning profile
With “Automatically manage signing” in Xcode this happens for you. With a manually managed
profile it does not, and the failure appears at runtime as a session that will not open.
Verifying autolinking
If the module did not link, every call fails withcontractMismatch and a message
telling you to rebuild — which is the right answer often enough to be worth
checking first.
./gradlew :app:assembleDebug regenerates that list. On iOS,
npx pod-install after any dependency change.