Skip to main content

Requirements

  • iOS 13.0 or later
  • Device with NFC hardware (iPhone 7 and later)
iOS cannot act as a merchant. Apple restricts Host Card Emulation (HCE) to Apple Pay only. On iOS, TapRails can only operate in customer mode (reading NFC tags). The merchant device must be Android.

1. Install CocoaPods

After installing npm/yarn dependencies, run:
cd ios && pod install && cd ..
Re-run this whenever you install new native packages.

2. Add NFC Usage Description

Open ios/<YourApp>/Info.plist and add the NFC usage description key:
ios/<YourApp>/Info.plist
<key>NFCReaderUsageDescription</key>
<string>We need NFC access to read contactless payment requests.</string>
This key is required by Apple — your app will be rejected from the App Store if it’s missing and the app uses NFC APIs. The string is shown to users in the iOS permission dialog.

3. Enable NFC Capability (if not already enabled)

In Xcode:
  1. Open your project’s Signing & Capabilities tab
  2. Click + Capability
  3. Add Near Field Communication Tag Reading
This adds the com.apple.developer.nfc.readersession.formats entitlement to your app’s entitlements file automatically.

4. Verify

Build and run your iOS app:
npm run ios
# or
react-native run-ios
NFC entitlements only work on a physical device — the iOS Simulator does not support NFC. You must run on a real iPhone to test tap-to-pay.
iOS setup complete! You can now use useNFCCustomer and the customer PaymentFlowManager flow on iOS devices.