EAS build error: Provisioning profile (com.apple.developer.nfc.readersession.iso7816.select-identifiers)

Hi there!

I try to use nfc manager, and read and write data to ISO7816 NFCTAG, but my EAS build never builds.

I use eas to build development client, because I use react native nfc manager library. I have to add some custom AIDs. Therefore I have set some permissions for iPhone which are these (and it’s generated automatically by the plugin):

com.apple.developer.nfc.readersession.formats

<array>

  <string>NDEF</string>

  <string>TAG</string>

</array>

<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>

<array>

  <string>A0000001020304</string>

  <string>A000000063504B43532D3135</string>

  <string>E828BD080F</string>

  <string>D2760000850100</string>

  <string>D2760000850101</string>

</array>

When eas builds the development client it says:

:x: error: Provisioning profile “*[expo] com.freeridre.senityiosnfc AppStore 2021-07-23T12:02:36.833Z” doesn’t include the com.apple.developer.nfc.readersession.iso7816.select-identifiers entitlement. (in target ‘senityiosnfc’ from project ‘senityiosnfc’)

But I have included the necessary entitlement. So I don’t know what’s the problem…
In apple’s developer site the provisioning profile has the necessary entitlements.
Thank your for your helping hands.

Nobody knows the solution? Thus I can not use eas, I will cancel my subscription. :frowning:

Hi @freeridre

Please run expo diagnostics and post the results here.
Please also post the contents of app.json.

expo diagnostics result:

Expo CLI 4.8.1 environment info:
System:
OS: Windows 10 10.0.19042
Binaries:
Node: 14.17.3 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.10 - C:\Users\dani\AppData\Roaming\npm\yarn.CMD
npm: 6.14.13 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 4.2.0.0 AI-202.7660.26.42.7322048
npmPackages:
expo: ^42.0.0 => 42.0.0
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: ~0.63.4 => 0.63.4
react-native-web: ^0.17.1 => 0.17.1
Expo Workflow: bare

App.json:

{

  "expo": {

    "plugins": [

      [

        "react-native-nfc-manager",

        {

          "nfcPermission": "Senity Security Systems Ltd.",

          "selectIdentifiers": [

            "A0000001020304",

            "A000000063504B43532D3135",

            "E828BD080F",

            "D2760000850100",

            "D2760000850101",

            "12FC"

          ]

        }

      ]

    ],

    "name": "senity",

    "slug": "senityiosnfc",

    "version": "1.0.1",

    "orientation": "portrait",

    "icon": "./assets/Images/Senity app icon_blue_v2 1024 v4 180x180.png",

    "splash": {

      "image": "./assets/splash.png",

      "resizeMode": "contain",

      "backgroundColor": "#ffffff"

    },

    "updates": {

      "fallbackToCacheTimeout": 0

    },

    "assetBundlePatterns": [

      "**/*"

    ],

    "ios": {

      "supportsTablet": true,

      "requireFullScreen": true,

      "bundleIdentifier": "com.freeridre.senityApp"     

    },

    "android": {

      "adaptiveIcon": {

        "foregroundImage": "./assets/adaptive-icon.png",

        "backgroundColor": "#FFFFFF"

      },

      "package": "com.freeridre.senityiosnfc"

    },

    "web": {

      "favicon": "./assets/favicon.png"

    }

  }

}

Any solutions?

I see you are using the bare workflow. Was there a reason you ejected?

Could you try rolling back to before you ejected, making sure the react-native-nfc-manager plugin is still configured with the selectIdentifiers you need, and then building with eas build?

How to rolling back? Are there any command for that?

The usual way would be to run git log to find the commit just before you ejected and then e.g., assuming the commit ID is abc123def:

git checkout -b before-eject abc123def

That would create a new branch called before-eject in Git starting at the point just before you ejected.

Or create a new project :smiley:

1 Like

Hi Woodin,
Could be a problem if I use this:

eas build --profile development --platform ios

That looks fine for a dev client.

Unfortunately I do not currently have access to an iOS device or Simulator to test this with myself.

Well, I make a totally new project. Now I build the app without AIDs, but when I install the development client it never loads… I don’t know why. No error messages. And when I start the expo start --dev-client I can not use the QR code…

What do you mean “without AIDs”? You would need to put them in the plugin config in app.json.

I am not sure why the QR code would not work, but if you log in to the dev client (in the profile section) then the project should show up under the RECENTLY IN DEVELOPMENT heading.

I meant the ISO7816 application IDs as AID.
Now I wrote this:

"plugins": [
      ["react-native-nfc-manager",
        {
          "nfcPermission": "Senity Security Systems ltd.",
          "selectIdentifiers":
          [
            "A000000063504B43532D3135",
            "E828BD080F",
            "D2760000850100",
            "D2760000850101"
          ]
        }
      ]
      
    
    
    ]

I figured out that something was wrong with the eas build. I built another one and that works perfect without AIDs. Now I added the AIDs as you can see above, as the react native nfc-manager’s github page shows. I’m curious very much!

Well… I’m sad so much… It didn’t work. :frowning: :disappointed_relieved: :sob:
The same error again, when building with

eas build --profile development --platform ios

or

eas build

:x: error: Provisioning profile “*[expo] com.freeridre.SenityNFCForiOS AdHoc 1627310348265” doesn’t include the com.apple.developer.nfc.readersession.iso7816.select-identifiers entitlement. (in target ‘Senity’ from project ‘Senity’)

when I check the entitlements with expo tools it shows:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

  <dict>

    <key>aps-environment</key>

    <string>development</string>

    <key>com.apple.developer.nfc.readersession.formats</key>

    <array>

      <string>NDEF</string>

      <string>TAG</string>

    </array>

    <key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>

    <array>

      <string>A000000063504B43532D3135</string>

      <string>E828BD080F</string>

      <string>D2760000850100</string>

      <string>D2760000850101</string>

    </array>

  </dict>

</plist>

and here is the info.plist:

n="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

  <dict>

    <key>CFBundleDisplayName</key>

    <string>Senity</string>

    <key>CFBundleShortVersionString</key>

    <string>1.0.0</string>

    <key>CFBundleURLTypes</key>

    <array>

      <dict>

        <key>CFBundleURLSchemes</key>

        <array>

          <string>com.freeridre.SenityNFCForiOS</string>

        </array>

      </dict>

      <dict>

        <key>CFBundleURLSchemes</key>

        <array>

          <string>exp+senitynfcforios</string>

        </array>

      </dict>

    </array>

    <key>CFBundleVersion</key>

    <string>1</string>

    <key>NFCReaderUsageDescription</key>

    <string>Senity Security Systems ltd.</string>

    <key>UILaunchStoryboardName</key>

    <string>SplashScreen</string>

    <key>UIRequiresFullScreen</key>

    <true/>

    <key>UISupportedInterfaceOrientations</key>

    <array>

      <string>UIInterfaceOrientationPortrait</string>

      <string>UIInterfaceOrientationPortraitUpsideDown</string>

    </array>

  </dict>

</plist>

So it’s an eas bug, or something wrong with the library?!?!! :frowning:

Here is the solution that I wrote:
The library caused the error…

1 Like

I’m glad you figured it out!