Skip to content

Swift Compiler Error (Xcode): Expression pattern of type 'String' cannot match values of type 'ArraySlice<String.Element>' (aka 'ArraySlice<Character>') record_ios/RecordConfig.swift:89:11 #551

@hurelhuyag

Description

@hurelhuyag

Package version
record: ^6.1.2

Environment

  • OS: macos-latest from Github runner
  • Xcode: 16.4 Build version 16F6
  • Flutter: 3.35.5 • channel stable

Describe the bug

A few days ago, it was working fine. But today it is giving me an error.

await _recorder.start(const r.RecordConfig(), path: recordPath);

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'create github workflow'
  2. Click on 'open GitHub run that created workflow'
  3. Scroll down to ' flutter build ipa --release --obfuscate --no-codesign --split-debug-info=build/ios/ipa/debug-info --build-number=$BUILD_NUMBER' command output
  4. See error

Expected behavior

compiles successfully

Additional context

Here is my github actions config

name: iOS Build & Upload to TestFlight

on:
  workflow_dispatch:   # run manually
  push:
    branches: [ "main" ]

jobs:
  build-ios:
    runs-on: macos-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v5

      - name: Setup Flutter
        uses: subosito/flutter-action@v2
        with:
          channel: stable
          flutter-version: "3.35.5"

      - name: flutter --version && xcodebuild -version
        run: |
          flutter --version
          xcodebuild -version

      - name: Flutter Pub Get
        run: flutter pub get

      - name: dart run build_runner build
        run: dart run build_runner build

      - name: Build iOS For Test Flight
        env:
          BUILD_NUMBER: ${{ github.run_number }}
        run: flutter build ipa --release --obfuscate --no-codesign --split-debug-info=build/ios/ipa/debug-info --build-number=$BUILD_NUMBER

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions