fix(react-native-iap): avoid iOS listener cleanup crash after unmount… #549
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI - react-native-iap | |
| on: | |
| pull_request: | |
| branches: [main, next] | |
| paths: | |
| - "libraries/react-native-iap/**" | |
| - "packages/gql/src/generated/types.ts" | |
| - "packages/apple/Sources/**" | |
| - "packages/apple/Package.swift" | |
| - "openiap-versions.json" | |
| - ".github/workflows/ci-react-native-iap.yml" | |
| push: | |
| branches: [main, next] | |
| paths: | |
| - "libraries/react-native-iap/**" | |
| - "packages/gql/src/generated/types.ts" | |
| - "packages/apple/Sources/**" | |
| - "packages/apple/Package.swift" | |
| - "openiap-versions.json" | |
| - ".github/workflows/ci-react-native-iap.yml" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| working-directory: libraries/react-native-iap | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 1 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 20 | |
| - name: Enable Corepack | |
| run: corepack enable && corepack prepare yarn@3.6.1 --activate | |
| - name: Cache Yarn | |
| uses: actions/cache@v6 | |
| with: | |
| path: libraries/react-native-iap/.yarn/cache | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('libraries/react-native-iap/yarn.lock') }} | |
| restore-keys: ${{ runner.os }}-yarn- | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Type check | |
| run: yarn lint:tsc | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 1 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 20 | |
| - name: Enable Corepack | |
| run: corepack enable && corepack prepare yarn@3.6.1 --activate | |
| - name: Cache Yarn | |
| uses: actions/cache@v6 | |
| with: | |
| path: libraries/react-native-iap/.yarn/cache | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('libraries/react-native-iap/yarn.lock') }} | |
| restore-keys: ${{ runner.os }}-yarn- | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Test | |
| run: yarn test | |
| - name: Consumer install smoke test | |
| run: yarn verify:consumer-install | |
| ios-xcode-27: | |
| name: iOS example (Xcode 27) | |
| if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: xcode-27 | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 1 | |
| persist-credentials: false | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 20 | |
| - name: Enable Corepack | |
| run: corepack enable && corepack prepare yarn@3.6.1 --activate | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Generate Nitro bridge | |
| run: yarn nitrogen | |
| - name: Install Ruby dependencies | |
| working-directory: libraries/react-native-iap/example | |
| run: bundle install | |
| - name: Install CocoaPods dependencies | |
| working-directory: libraries/react-native-iap/example/ios | |
| run: bundle exec pod install --repo-update | |
| - name: Build scene-based iOS example | |
| working-directory: libraries/react-native-iap/example/ios | |
| run: | | |
| set -o pipefail | |
| xcodebuild build \ | |
| -workspace example.xcworkspace \ | |
| -scheme example \ | |
| -destination 'generic/platform=iOS Simulator' \ | |
| -configuration Debug \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| COMPILER_INDEX_STORE_ENABLE=NO |