[Expo] Apple Pay: entitlements incorrectly set as string instead of array of string(s)
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:
- Build app for internal distribution (Expo)
- 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
Thanks for feedback @zegenerative 💚
Will take a look.
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?
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,
},
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.
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.
Hey @zegenerative
Were you able to resolve this?
I am closing this ticket due to a lack of activity. Feel free to continue here or re-open.