plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[Bug]: warning: result of call to 'ensurePathMonitor()' is unused ensurePathMonitor()

Open Nolbir01 opened this issue 3 years ago • 0 comments

Platform

MacOS Monterey 12.5.1

Plugin

connectivity_plus_macos

Version

1.2.4

Flutter SDK

Flutter 3.3.2 • channel stable

Steps to reproduce

1.show warning on build my macos project. WX20220918-133442@2x

Code Sample

No response

Logs

/Users/xxx/Library/flutter/.pub-cache/hosted/pub.flutter-io.cn/connectivity_plus_macos-1.2.4/macos/Classes/PathMonitorConnectivityProvider.swift:29:5: warning: result of call to 'ensurePathMonitor()' is unused
    ensurePathMonitor()
    ^                ~~
/Users/xxx/Library/flutter/.pub-cache/hosted/pub.flutter-io.cn/connectivity_plus_macos-1.2.4/macos/Classes/PathMonitorConnectivityProvider.swift:33:5: warning: result of call to 'ensurePathMonitor()' is unused
    ensurePathMonitor()
    ^                ~~
/Users/xxx/Library/flutter/.pub-cache/hosted/pub.flutter-io.cn/connectivity_plus_macos-1.2.4/macos/Classes/ReachabilityConnectivityProvider.swift:9:36: warning: left side of nil coalescing operator '??' has non-optional type 'Reachability.Connection', so the right side is never used
    switch reachability.connection ?? .unavailable {
           ~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~

/Users/xxx/Library/flutter/.pub-cache/hosted/pub.flutter-io.cn/connectivity_plus_macos-1.2.4/macos/Classes/ReachabilityConnectivityProvider.swift:23:5: warning: result of call to 'ensureReachability()' is unused
    ensureReachability()
    ^                 ~~
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Flutter Assemble' from project 'Runner')

Flutter Doctor

[✓] Flutter (Channel stable, 3.3.2, on macOS 12.5.1 21G83 darwin-x64, locale en)
    • Flutter version 3.3.2 on channel stable at /Users/xxx/Library/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision e3c29ec00c (4 days ago), 2022-09-14 08:46:55 -0500
    • Engine revision a4ff2c53d8
    • Dart version 2.18.1
    • DevTools version 2.15.0
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/xxx/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A309
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.8052
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] IntelliJ IDEA Community Edition (version 2022.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.71.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.48.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 12.5.1 21G83 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 105.0.5195.125

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

Nolbir01 avatar Sep 18 '22 05:09 Nolbir01