stripe/stripe-ios

[BUG] CI script can't compile

JohanAlbrectsen opened this issue · 2 comments

Summary

Can't compile App in GitHub Actions CI/CD after adding Stripe. It says there are issues with AnalyticLoggableError at line 62 and 69. But when navigating to the files, they don't appear to be problematic.

Code to reproduce

Workflow file:

name: Develop Gate 🚪 (feature -> develop)

on:
  pull_request:
    branches: [ "develop" ]

jobs:
  build:
    name: Build and Test default scheme using any available iPhone simulator
    runs-on: macos-latest
    env:
      GH_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

    steps:
      - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/
      - name: Checkout
        uses: actions/checkout@v3
      - name: Build
        uses: mxcl/xcodebuild@v1
        with:
          platform: iOS Simulator
          scheme: App Development
          warnings-as-errors: false
      - name: Test
        run: |
          xcodebuild test -scheme "App" -destination 'platform=iOS Simulator,name=iPhone 13' -only-testing:AppTests -resultBundlePath TestResults.xcresult -verbose
        continue-on-error: true
      - uses: kishikawakatsumi/xcresulttool@v1
        with:
          path: TestResults.xcresult
        continue-on-error: true
      - name: Clean Up
        run: rm -rf "/Users/runner/work/ios-app/ios-app/App/🛢️ Resources/"
Screenshot 2024-04-23 at 11 06 19

Please look at the result:
test.xcresult.zip

iOS version

Standard CI/CD iPhone simulator

Installation method

Swift Package Manager

SDK version

Latest

Thank you for attaching the xcresult file, super helpful!

It looks like this xcresult file is from a very old version of Xcode (~2022). Could you try running your job on Xcode 15? We don't support Xcode 14 or below anymore, as Apple requires Xcode 15 to submit to the App Store.

Hey @davidme-stripe
It seems as if setting the Xcode version to 15.3 and adjusting some commands solved the issue.
Thanks!