Search Results for

    Show / Hide Table of Contents

    How to configure the Android manifest and iOS entitlements

    Purpose: give the host app the permissions, entitlements and declarations the library needs. Platforms: Android, iOS. Status: stable.

    The library never edits the host's manifest, Info.plist or signing. Misconfiguration is reported as a typed Configuration result or capability diagnostic (portable code portable.configuration.missing), never as a fake success.

    Android

    Add to Platforms/Android/AndroidManifest.xml:

    <uses-permission android:name="android.permission.NFC" />
    <uses-feature android:name="android.hardware.nfc" android:required="false" />
    

    Use android:required="true" only to exclude devices without NFC from the store listing.

    Discovery you use Additional host configuration
    Reader mode (default) None: no intent filters, technology XML or exported activity.
    Foreground dispatch None in the manifest: in-app dispatch uses runtime filters while the activity is resumed.
    Intent entry (EnableIntentLaunch) An exported, SingleTop entry activity with NDEF_DISCOVERED/TECH_DISCOVERED intent filters and technology XML, declared as in the launch guide's Android configuration. Do not export an activity only to enable in-app reading.
    Launch from a tag See launch your app from a tag.

    A missing permission is reported as android.permission.nfc.denied.

    iOS

    1. Add NFCReaderUsageDescription to Platforms/iOS/Info.plist with a localized, meaningful sentence.

    2. Add the reader session format to Platforms/iOS/Entitlements.plist. Use TAG for both NDEF and tag sessions; do not add the legacy NDEF value, which can fail signing or distribution validation:

      <key>com.apple.developer.nfc.readersession.formats</key>
      <array>
        <string>TAG</string>
      </array>
      
    3. Enable NFC Tag Reading for the app identifier and sign with a matching provisioning profile.

    4. Declare the format when you register the library (IosNfcIntegrationOptions is in the Nementis.Maui.NFC.IosExtensions namespace):

      builder.UseNfc(new IosNfcIntegrationOptions { ReaderSessionFormats = ["TAG"] });
      

      The declaration is a configuration check, not an inspection of the signed entitlements. Without it the provider reports ios.configuration.readerSessionFormats.declarationAndEntitlement.

    ISO 7816 and FeliCa identifiers

    Only when you use these protocols, add to Info.plist:

    Key Value
    com.apple.developer.nfc.readersession.iso7816.select-identifiers Every AID you select: complete hexadecimal values of 5-16 bytes.
    com.apple.developer.nfc.readersession.felica.systemcodes Specific four-digit hexadecimal system codes. FFFF is not a wildcard.

    Malformed entries are configuration failures. The samples include no production AIDs or system codes.

    Check the result

    A security error from Core NFC is reported as ios.configuration.entitlementOrProvisioning with the native domain and code. Check the app identifier, the provisioning profile and the effective signed entitlements, not only the source files. Launching the app from a tag needs the Associated Domains entitlement instead; see launch your app from a tag.

    Related

    • Launch the app from a tag: launch your app from a tag.
    • Capability reports and diagnostics: capabilities.
    • Edit this page
    In this article
    Back to top Nementis MAUI NFC documentation