Fastlane and EAS deploy to production error when adding Stripe

Fastlane and EAS deploy to production error when adding Stripe

Managed workflow

eas-cli eas-cli/3.7.2 darwin-x64 node-v16.15.0
expo sdk 47
react-native: 0.70.5

Summary

I’m attempting to incorporate Stripe & Apple Pay using the Expo Documentation. I am getting a FastLane error when deploying with EAS to “production”. App works as expected in Simulator “development”.

eas.json
    "base": {
      "node": "16.15.0",
      "yarn": "1.22.17",
      "ios": {
        "credentialsSource": "local",
        "image": "latest",
        "resourceClass": "m1-medium",
        "env": {
          "PLATFORM": "ios"
        }
      }
    },
metro.config
    const { getDefaultConfig } = require('@expo/metro-config');
    
    const config = getDefaultConfig(__dirname);
    
    // Remove all console logs in production  ...
    config.transformer.minifierConfig.compress.drop_console = true;
    
    module.exports = config;

I install stripe:

$ npx expo install @stripe/stripe-react-native
› Installing 1 SDK 47.0.0 compatible native module using Yarn
> yarn add @stripe/stripe-react-native@0.19.0

Adding @stripe/stripe-react-native@0.19.0, note that the latest is 0.25.0.

I’ve created the Merchant ID and followed Stripe’s “Accept Apple Pay” documentation. The only step that I believe is not necessary, is “Integration with Xcode” since I’m using EAS production. Note that I am using local credentials.json. I assume that the merchant ID and Stripe API key in app.json are sufficient for the Apple Payment?

I’ve added to my app.json:

expo {
...  
  extra: {
      stripe : {
          apiKey: '<my api key>'
          merchantIdentifier: '<my merchant id>'
      },
  },
  ..
  plugins: [
    [
      "@stripe/stripe-react-native",
      {
         merchantIdentifier: '<my merchant id>'
      }
    ]
  ],
...
}

I add React Native code to trigger an ApplePay request

Stripe Functions used

import { useApplePay, useStripe } from '@stripe/stripe-react-native';
import Button from '@core/components/Button';
import { TextSemiBold } from '@core/components/StyledText';
import Styles from '@core/constants/Styles';
import Constants from 'expo-constants';
import React, { useCallback } from 'react';

interface ApplePayButtonProps {
  applePayLabel: string; // text passed to native Apple Pay via stripe "presentApplePay()"
  label: string; // button text
  amount: string;
}
export default function ApplePayButton({
  applePayLabel,
  label,
  amount,
}: ApplePayButtonProps) {
  const { confirmApplePayPayment } = useStripe();
  const { presentApplePay } = useApplePay();

  const handlePress = useCallback(async () => {
    const { paymentMethod, error } = presentApplePay({
      currency: 'usd',
      country: 'US',
      cartItems: [{ paymentType: 'Immediate', label: applePayLabel, amount }],
    });
    if (!error) {
      const clientSecret = process.env.STRIPE_SECRET;
      const { error: confirmApplePayError } = await confirmApplePayPayment(
        clientSecret,
      );
      confirmApplePayPayment(clientSecret);
      if (confirmApplePayError) {
        console.log(confirmApplePayError.code, confirmApplePayError.message);
      } else {
        console.log('Success', 'The payment was confirmed successfully!');
      }
    }
  }, [confirmApplePayPayment, presentApplePay]);

  return (
    <Button style={{ margin: 10 }} onPressOut={handlePress}>
      <TextSemiBold style={Styles.h5}>{label}</TextSemiBold>
    </Button>
  );
}

I fail in fastlane on eas with this log output:

Creating Gymfile
Gymfile created
Successfully loaded '/Users/expo/workingdir/build/packages/native/ios/Gymfile' 📄
+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|                                                                  Detected Values from './Gymfile'                                                                   |
+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| suppress_xcode_output | true                                                                                                                                        |
| clean                 | false                                                                                                                                       |
| scheme                | AppName                                                                                                                                   |
| configuration         | Release                                                                                                                                     |
| export_options        |                                                                                                                                             |
| export_xcargs         | OTHER_CODE_SIGN_FLAGS="--keychain /var/folders/rp/_x4mwf8x2f52ml0n3qt65jw80000gn/T/turtle-v2-bbf5d290-fd6d-424a-9ddb-cd9296f6037b.keychain" |
| disable_xcpretty      | true                                                                                                                                        |
| buildlog_path         | /Users/expo/workingdir/logs                                                                                                                 |
| output_directory      | ./build                                                                                                                                     |
+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
Resolving Swift Package Manager dependencies...
$ xcodebuild -resolvePackageDependencies -workspace ./AppName.xcworkspace -scheme AppName -configuration Release
▸ Command line invocation:
▸     /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace ./AppName.xcworkspace -scheme AppName -configuration Release
▸ User defaults from command line:
▸     IDEPackageSupportUseBuiltinSCM = YES
▸ --- xcodebuild: WARNING: Using the first of multiple matching destinations:
▸ { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:0000FE00-66D45333AEB93EDA }
▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
▸ { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
▸ { platform:iOS Simulator, id:94EE5B62-6A73-4410-8C64-A56FBFD9C55D, OS:16.2, name:iPad (10th generation) }
▸ { platform:iOS Simulator, id:537FF0C8-8B14-4E2E-9828-0ED246BE9E38, OS:16.2, name:iPad Air (5th generation) }
▸ { platform:iOS Simulator, id:777A520C-1C1B-484A-99C6-35943FA97067, OS:16.2, name:iPad Pro (11-inch) (4th generation) }
▸ { platform:iOS Simulator, id:A5447295-3264-4816-9C78-50E5F35C1122, OS:16.2, name:iPad Pro (12.9-inch) (6th generation) }
▸ { platform:iOS Simulator, id:067F74D9-EEC3-4066-B8A8-B3EAD0EE5649, OS:16.2, name:iPad mini (6th generation) }
▸ { platform:iOS Simulator, id:3A1FD6BA-A84C-4728-A0AA-E7D9DF147BA7, OS:16.2, name:iPhone 14 }
▸ { platform:iOS Simulator, id:5D252FD0-2816-4FAE-B85D-C29DC8D2C73C, OS:16.2, name:iPhone 14 Plus }
▸ { platform:iOS Simulator, id:AA475350-BBB4-4568-A722-4528CF187FA8, OS:16.2, name:iPhone 14 Pro }
▸ { platform:iOS Simulator, id:01B24393-FC59-4FEC-87FD-338E47BABDAE, OS:16.2, name:iPhone 14 Pro Max }
▸ { platform:iOS Simulator, id:88B2387A-FF6D-4979-9155-B06611A97148, OS:16.2, name:iPhone SE (3rd generation) }
▸ resolved source packages:
$ xcodebuild -showBuildSettings -workspace ./AppName.xcworkspace -scheme AppName -configuration Release
[stderr] 
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
[stderr] 
{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:0000FE00-66D45333AEB93EDA }
[stderr] 
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
[stderr] 
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
[stderr] 
{ platform:iOS Simulator, id:94EE5B62-6A73-4410-8C64-A56FBFD9C55D, OS:16.2, name:iPad (10th generation) }
[stderr] 
{ platform:iOS Simulator, id:537FF0C8-8B14-4E2E-9828-0ED246BE9E38, OS:16.2, name:iPad Air (5th generation) }
[stderr] 
{ platform:iOS Simulator, id:777A520C-1C1B-484A-99C6-35943FA97067, OS:16.2, name:iPad Pro (11-inch) (4th generation) }
[stderr] 
{ platform:iOS Simulator, id:A5447295-3264-4816-9C78-50E5F35C1122, OS:16.2, name:iPad Pro (12.9-inch) (6th generation) }
[stderr] 
{ platform:iOS Simulator, id:067F74D9-EEC3-4066-B8A8-B3EAD0EE5649, OS:16.2, name:iPad mini (6th generation) }
[stderr] 
{ platform:iOS Simulator, id:3A1FD6BA-A84C-4728-A0AA-E7D9DF147BA7, OS:16.2, name:iPhone 14 }
[stderr] 
{ platform:iOS Simulator, id:5D252FD0-2816-4FAE-B85D-C29DC8D2C73C, OS:16.2, name:iPhone 14 Plus }
[stderr] 
{ platform:iOS Simulator, id:AA475350-BBB4-4568-A722-4528CF187FA8, OS:16.2, name:iPhone 14 Pro }
[stderr] 
{ platform:iOS Simulator, id:01B24393-FC59-4FEC-87FD-338E47BABDAE, OS:16.2, name:iPhone 14 Pro Max }
[stderr] 
{ platform:iOS Simulator, id:88B2387A-FF6D-4979-9155-B06611A97148, OS:16.2, name:iPhone SE (3rd generation) }
Command timed out after 3 seconds on try 1 of 4, trying again with a 6 second timeout...
[stderr] 
2023-03-01 07:47:32.036 xcodebuild[8759:26747] Requested but did not find extension point with identifier Xcode.InterfaceBuilderBuildSupport.PlatformDefinition
[stderr] 
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
[stderr] 
{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:0000FE00-66D45333AEB93EDA }
[stderr] 
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
[stderr] 
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
[stderr] 
{ platform:iOS Simulator, id:94EE5B62-6A73-4410-8C64-A56FBFD9C55D, OS:16.2, name:iPad (10th generation) }
[stderr] 
{ platform:iOS Simulator, id:537FF0C8-8B14-4E2E-9828-0ED246BE9E38, OS:16.2, name:iPad Air (5th generation) }
[stderr] 
{ platform:iOS Simulator, id:777A520C-1C1B-484A-99C6-35943FA97067, OS:16.2, name:iPad Pro (11-inch) (4th generation) }
[stderr] 
{ platform:iOS Simulator, id:A5447295-3264-4816-9C78-50E5F35C1122, OS:16.2, name:iPad Pro (12.9-inch) (6th generation) }
[stderr] 
{ platform:iOS Simulator, id:067F74D9-EEC3-4066-B8A8-B3EAD0EE5649, OS:16.2, name:iPad mini (6th generation) }
[stderr] 
{ platform:iOS Simulator, id:3A1FD6BA-A84C-4728-A0AA-E7D9DF147BA7, OS:16.2, name:iPhone 14 }
[stderr] 
{ platform:iOS Simulator, id:5D252FD0-2816-4FAE-B85D-C29DC8D2C73C, OS:16.2, name:iPhone 14 Plus }
[stderr] 
{ platform:iOS Simulator, id:AA475350-BBB4-4568-A722-4528CF187FA8, OS:16.2, name:iPhone 14 Pro }
[stderr] 
{ platform:iOS Simulator, id:01B24393-FC59-4FEC-87FD-338E47BABDAE, OS:16.2, name:iPhone 14 Pro Max }
[stderr] 
{ platform:iOS Simulator, id:88B2387A-FF6D-4979-9155-B06611A97148, OS:16.2, name:iPhone SE (3rd generation) }
[stderr] 
2023-03-01 07:47:32.897 xcodebuild[8777:26854] Requested but did not find extension point with identifier Xcode.InterfaceBuilderBuildSupport.PlatformDefinition
Detected provisioning profile mapping: {:"com.balt.AppName"=>"c49fed13-e7df-40ac-a922-1dd0ef52d670"}
+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
|                                                                                       Summary for gym 2.211.0                                                                                        |
+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| workspace                                              | ./AppName.xcworkspace                                                                                                                     |
| scheme                                                 | AppName                                                                                                                                   |
| clean                                                  | false                                                                                                                                       |
| output_directory                                       | ./build                                                                                                                                     |
| output_name                                            | AppName                                                                                                                                   |
| configuration                                          | Release                                                                                                                                     |
| silent                                                 | false                                                                                                                                       |
| skip_package_ipa                                       | false                                                                                                                                       |
| skip_package_pkg                                       | false                                                                                                                                       |
| export_options.method                                  | app-store                                                                                                                                   |
| export_options.provisioningProfiles.com.balt.AppName | c49fed13-e7df-40ac-a922-1dd0ef52d670                                                                                                        |
| export_xcargs                                          | OTHER_CODE_SIGN_FLAGS="--keychain /var/folders/rp/_x4mwf8x2f52ml0n3qt65jw80000gn/T/turtle-v2-bbf5d290-fd6d-424a-9ddb-cd9296f6037b.keychain" |
| build_path                                             | /Users/expo/Library/Developer/Xcode/Archives/2023-03-01                                                                                     |
| result_bundle                                          | false                                                                                                                                       |
| buildlog_path                                          | /Users/expo/workingdir/logs                                                                                                                 |
| destination                                            | generic/platform=iOS                                                                                                                        |
| suppress_xcode_output                                  | true                                                                                                                                        |
| xcodebuild_formatter                                   | xcpretty                                                                                                                                    |
| disable_xcpretty                                       | true                                                                                                                                        |
| skip_profile_detection                                 | false                                                                                                                                       |
| xcodebuild_command                                     | xcodebuild                                                                                                                                  |
| skip_package_dependencies_resolution                   | false                                                                                                                                       |
| disable_package_automatic_updates                      | false                                                                                                                                       |
| use_system_scm                                         | false                                                                                                                                       |
| xcode_path                                             | /Applications/Xcode.app                                                                                                                     |
+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
$ set -o pipefail && xcodebuild -workspace ./AppName.xcworkspace -scheme AppName -configuration Release -destination 'generic/platform=iOS' -archivePath /Users/expo/Library/Developer/Xcode/Archives/2023-03-01/AppName\ 2023-03-01\ 07.47.33.xcarchive archive | tee /Users/expo/workingdir/logs/AppName-AppName.log > /dev/null
    Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')
    Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-bridging' from project 'Pods')
    Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RCT-Folly' from project 'Pods')
    Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'fmt' from project 'Pods')
    Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-Codegen' from project 'Pods')
    Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'AppName' from project 'AppName')
    Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'AppName' from project 'AppName')
    Run script build phase 'Upload source maps to Bugsnag' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'AppName' from project 'AppName')
    Run script build phase '[CP-User] [RNFB] Core Configuration' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'AppName' from project 'AppName')
    Run script build phase '[CP-User] Generate app.manifest for expo-updates' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXUpdates' from project 'Pods')
▸ ** ARCHIVE FAILED **
** ARCHIVE FAILED **
Exit status: 65
+-------------+-------------------------+
|           Build environment           |
+-------------+-------------------------+
| xcode_path  | /Applications/Xcode.app |
| gym_version | 2.211.0                 |
| sdk         | iPhoneOS16.2.sdk        |
+-------------+-------------------------+
Looks like fastlane ran into a build/archive error with your project
It's hard to tell what's causing the error, so we wrote some guides on how
to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
Before submitting an issue on GitHub, please follow the guide above and make
sure your project is set up correctly.
fastlane uses `xcodebuild` commands to generate your binary, you can see the
the full commands printed out in yellow in the above log.
Make sure to inspect the output above, as usually you'll find more error information there
[stderr] 
[!] Error building the application - see the log above
Error: The "Run fastlane" step failed with an unknown error. Refer to "Xcode Logs" below for additional, more detailed logs.

If I go back to my main branch I do not have this error.

Do I need to include the certificate I created from the Stripe Create a new Apple Pay certificate documentation within my credentials.json?
I thought those credentials were taken from Stripe’s dashboard since my app authorizes Stripe via the <StripeProvider publishableKey={Constants.expoConfig.extra.stripe.apiKey} merchantIdentifier={Constants.expoConfig.extra.stripe.merchantIdentifier}> using the merchant ID and the Stripe API key in app.json?

Check the “Xcode logs” at the very bottom of your EAS Build logs. They’re rather verbose, but will have more specifics about the Error 65 you’re seeing. When it comes to Apple Pay, we have seen build failures related to a mismatch between merchant ID’s in app.json and the provisioning profile. If that’s the case, you’ll see it in that log.

1 Like

TLDR: SOLUTION!

Turns out that in addition to the documentation on Stripe’s website you need to update your identifiers to accept “Apple Pay Payment Processing”. This should be all you need; however, I had to download and replace the provisioning profile that is being referenced in credentials.json.

I suggest the documentation on Expo’s website is updated to reflect these required additional steps as this is not clear, especially when using generated provisioning profiles or local ones.


DETAILS

Thanks for the tip! @keith-kurak. These are the entirety of the Xcode logs:

Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace ./AppName.xcworkspace -scheme AppName -configuration Release -destination generic/platform=iOS -archivePath "/Users/expo/Library/Developer/Xcode/Archives/2023-03-02/AppName 2023-03-02 12.51.46.xcarchive" archive

User defaults from command line:
    IDEArchivePathOverride = /Users/expo/Library/Developer/Xcode/Archives/2023-03-02/AppName 2023-03-02 12.51.46.xcarchive
    IDEPackageSupportUseBuiltinSCM = YES

Prepare packages

Computing target dependency graph and provisioning inputs

Create build description
Build description signature: 04ad94692f9d5fd71ffb0aa1ca45c3fd
Build description path: /Users/expo/Library/Developer/Xcode/DerivedData/AppName-fwjyrrkkwfecgigkesdiwsnufnpe/Build/Intermediates.noindex/ArchiveIntermediates/AppName/IntermediateBuildFilesPath/XCBuildData/04ad94692f9d5fd71ffb0aa1ca45c3fd-desc.xcbuild

note: Building targets in dependency order
warning: Run script build phase '[CP-User] Generate app.manifest for expo-updates' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXUpdates' from project 'Pods')
/Users/expo/workingdir/build/packages/native/ios/AppName.xcodeproj: error: Provisioning profile "*[expo] com.orgname.appname AppStore 2023-01-19T21:50:59.070Z" doesn't support the Apple Pay capability. (in target 'AppName' from project 'AppName')
/Users/expo/workingdir/build/packages/native/ios/AppName.xcodeproj: error: Provisioning profile "*[expo] com.orgname.appname AppStore 2023-01-19T21:50:59.070Z" doesn't include the com.apple.developer.in-app-payments entitlement. Profile qualification is using entitlement definitions that may be out of date. Connect to network to update. (in target 'AppName' from project 'AppName')
warning: Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'AppName' from project 'AppName')
warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'AppName' from project 'AppName')
warning: Run script build phase 'Upload source maps to Bugsnag' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'AppName' from project 'AppName')
warning: Run script build phase '[CP-User] [RNFB] Core Configuration' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'AppName' from project 'AppName')
warning: Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-bridging' from project 'Pods')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'fmt' from project 'Pods')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RCT-Folly' from project 'Pods')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-Codegen' from project 'Pods')

Seems to be similar to what was output in FastLane BUT it includes this:

/Users/expo/workingdir/build/packages/native/ios/AppName.xcodeproj: error: Provisioning profile "*[expo] com.orgname.appname AppStore 2023-01-19T21:50:59.070Z" doesn't support the Apple Pay capability. (in target 'AppName' from project 'AppName')
/Users/expo/workingdir/build/packages/native/ios/AppName.xcodeproj: error: Provisioning profile "*[expo] com.orgname.appname AppStore 2023-01-19T21:50:59.070Z" doesn't include the com.apple.developer.in-app-payments entitlement. Profile qualification is using entitlement definitions that may be out of date. Connect to network to update. (in target 'AppName' from project 'AppName')

Edit your provisioning profile and found this Apple reference which says:

Editing an App ID with additional capabilities for Xcode & Xcode Cloud

  1. In Certificates, Identifiers & Profiles, click Identifiers in the sidebar.
  2. Select the identifier associated to the app requiring any additional capabilities.
  3. Click the Additional Capabilities tab and enable any required capabilities.
  4. Click Save. If a warning dialog appears, click Confirm to finalize your changes.
  5. If building locally in Xcode, follow the steps listed in Provisioning in Xcode with Additional Capabilities.

I then downloaded my provisioning profile in the “Profile” section.

1 Like

Although the build has completing without error on EAS, after deploying via Transporter I receive an “Invalid Binary” email from App Store Connect.


App Store Connect

Dear Developer,

We identified one or more issues with a recent delivery for your app, “AppName” 1.0.0 (18). Please correct the following issues, then upload again.

ITMS-90683: Missing purpose string in Info.plist - Your app’s code references one or more APIs that access sensitive user data, or the app has one or more entitlements that permit such access. The Info.plist file for the “AppName.app” bundle should contain a NSCameraUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If your app supports multiple locales, you’re now required to provide a purpose string value in the Info.plist file in addition to a valid localized string across each of your app’s localization folders. If you’re using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. For details, visit: Requesting access to protected resources | Apple Developer Documentation.

Best regards,

The App Store Team


Turns out that this is because Stripe requires access to the camera within their SDK to scan credit cards by phone. I don’t need this with Apple Pay but it is still required for the App Store.

To fix this issue you need to update your app.json like this:

{
  expo: {
    ios: {
      "infoPlist": {
        "NSCameraUsageDescription": "To scan credit cards using Stripe sdk."
      }
    }
  }
}

Note: The string “To scan credit cards using Stripe sdk.” above can be whatever you think best describes why you need the camera. This could be what I wrote or your purpose.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.