adyen-react-native icon indicating copy to clipboard operation
adyen-react-native copied to clipboard

[Expo] Apple Pay: entitlements incorrectly set as string instead of array of string(s)

Open zegenerative opened this issue 1 year ago • 5 comments

Describe the bug Failed to sync capability identifiers:

iOS entitlement "com.apple.developer.in-app-payments" has invalid value ""merchant.com.adyen.xxx.test",". Expected an array of strings, where each string is prefixed with "merchant.", ex: ["merchant.myapp"]

To Reproduce Steps to reproduce the behavior:

  1. Build app for internal distribution (Expo)
  2. Verify the error stops the build process

Expected behavior Internal distribution build for testing Apple pay on physical device

Screenshots N/A

Desktop

  • Expo SDK 50
  • Version adyen-react-native 2.1.0

Smartphone N/A

Expected bug location plugin/src/setEntitlements.ts

zegenerative avatar Jul 04 '24 12:07 zegenerative

Thanks for feedback @zegenerative 💚

Will take a look.

descorp avatar Jul 04 '24 12:07 descorp

Hey @zegenerative

I wasn't able to reproduce this issue on latest 2.1.0 with expo 51 and 50:

Works fine for all three:

 "merchantIdentifier": "merchant.com.my-merchant-id"
 "merchantIdentifier": ["merchant.com.my-merchant-id"]
 "merchantIdentifier": ["merchant.com.my-merchant-id", "merchant.com.my-merchant-id-2", "merchant.com.my-merchant-id-3"]

How is your app.json plugins look like?

descorp avatar Jul 11 '24 10:07 descorp

Could you describe how you created a build? Because when I run eas build --profile preview --platform ios (internal distribution) It throws the error, regardless of how the merchantIdentifier is configured

[
      "@adyen/react-native",
      {
        merchantIdentifier: [
          process.env.PAYMENT_APPLEPAY_MERCHANT_ID,
        ],
      },
 ]

or

[
      "@adyen/react-native",
      {
        merchantIdentifier: process.env.PAYMENT_APPLEPAY_MERCHANT_ID,
      },
 ]

this is my Configuration:

  applepay: {
    merchantID: Constants?.expoConfig?.extra?.environment.PAYMENT_APPLEPAY_MERCHANT_ID,
    merchantName: Constants?.expoConfig?.extra?.environment.PAYMENT_MERCHANT_ACCOUNT,
  },

zegenerative avatar Jul 11 '24 12:07 zegenerative

Oh, I see - you are using a variable there. I was simply hard coding the value and running npx expo prebuild --clean

Let me try that.

descorp avatar Jul 11 '24 13:07 descorp

Hey @zegenerative

How do you store property PAYMENT_APPLEPAY_MERCHANT_ID ? I have tried to play around with app.config.js and .env and still wasn't able to reproduce it.

descorp avatar Jul 12 '24 13:07 descorp

Hey @zegenerative

Were you able to resolve this?

descorp avatar Aug 08 '24 09:08 descorp

I am closing this ticket due to a lack of activity. Feel free to continue here or re-open.

descorp avatar Aug 29 '24 13:08 descorp