Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Unable to run with --no-sound-null-safety on iOS #77912

@b-jan

Description

@b-jan

I usually run my app on several mobile devices.
I just upgraded to Flutter Null Safety (mixing some null-safe libs and not yet null safe libs)

flutter run -d my_device_id --no-sound-null-safety is working on my physical android devices but not on my physical iOS devices (iPhone 6s and iPhone 6).

Steps to Reproduce

  1. Create a Flutter project with at least one lib not null safe (for example pull_to_refresh, firebase_dynamic_links or firebase_remote_config)
  2. Run it locally on a physical iOS device
  3. Get the error below
Error: Cannot run with sound null safety,
    because the following dependencies
    don't support null safety

Logs

Logs
(...)
    ../../flutter/.pub-cache/hosted/pub.dartlang.org
    /firebase_remote_config_platform_interface-0.2.0
    -dev.0/lib/src/method_channel/utils/exception.da
    rt:1:1: Error: A library can't opt out of null
    safety by default, when using sound null safety.
    // @dart=2.9
    ^^^^^^^^^^^^
Error: Cannot run with sound null safety,
    because the following dependencies
    don't support null safety:

     - package:pull_to_refresh
     - package:flutter_facebook_login
     - package:apple_sign_in
     - package:carousel_slider
     - package:smooth_star_rating
     
 For solutions, see
    https://dart.dev/go/unsound-null-safety

    Command PhaseScriptExecution failed with a
    nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Could not build the precompiled application for the
device.
Result of `flutter doctor`
[✓] Flutter (Channel stable, 2.0.1, on Mac OS X
    10.15.7 19H2 darwin-x64, locale fr-FR)
[✓] Android toolchain - develop for Android devices
    (Android SDK version 30.0.1)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.53.2)
[✓] Connected device (5 available)

• No issues found!

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: null-safetySupport for Dart's null safety featurec: crashStack traces logged to the consoleplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versiontoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions