Skip to content

iOS build fails with record 6.2.0 due to record_linux 1.2.1 compatibility issue #581

@iCodePoet

Description

@iCodePoet

Description

iOS build fails when using record: ^6.2.0 due to a method signature mismatch in record_linux 1.2.1.

Error

../../../.pub-cache/hosted/pub.dev/record_linux-1.2.1/lib/record_linux.dart:45:16: Error: The method 'RecordLinux.hasPermission' has fewer named arguments than those of overridden method 'RecordMethodChannelPlatformInterface.hasPermission'.
  Future<bool> hasPermission(String recorderId) {
               ^

Why does Linux code affect iOS builds?

Flutter compiles all platform Dart code together during the build process, regardless of the target platform. This means:

  • When building for iOS, Flutter still compiles record_linux Dart code
  • The Dart analyzer checks method signatures across all platform implementations
  • Even though Linux code won't run on iOS, it must still compile without errors

This is why a bug in record_linux breaks iOS builds, even though the Linux platform code is never executed on iOS devices.

Root Cause

  • record_linux 1.3.0 was released 3 days ago with an updated hasPermission() method signature (added request parameter)
  • record 6.2.0 still depends on record_linux 1.2.1
  • The old version has a method signature that doesn't match the platform interface

Workaround

Add this to pubspec.yaml:

dependency_overrides:
  record_linux: 1.3.0  # Fix iOS build error

Solution

Please update the record_linux dependency in record/pubspec.yaml from ^1.2.1 to ^1.3.0 and release a new version.

Environment

  • Flutter: 3.32.0
  • record: 6.2.0
  • record_linux: 1.2.1 (breaks) / 1.3.0 (works)
  • Platform: iOS build (but affects all platforms due to Dart compilation)

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