fluttercommunity / plus_plugins

Flutter Community Plus Plugins
BSD 3-Clause "New" or "Revised" License
1.59k stars 957 forks source link

[Bug]: App crashes on iPhone 15, failing to register ConnectivityPlusPlugin #3300

Open sindhu238 opened 1 week ago

sindhu238 commented 1 week ago

Platform

iPhone 14, iPhone 15

Plugin

connectivity_plus

Version

6.0.5

Flutter SDK

3.22.3

Steps to reproduce

I am trying to run my app flutter app in iPhone 15 and i have also tried in iPhone 14, but it always crashes on app start-up. My app is using nb_utils plugin which is in turn using 'connectivity_plus' plugin. I am using nb_utils version 7.0.0 which is refering to connectivity_plus plugin version 6.0.5. Not sure why it still keeps crashing for me even when i am using recent versions that addressed this fix: [https://github.com/ehwplus/app-backlog/issues/340].

My iOS deployment targets are set to 13.0.

Screenshot 2024-10-04 at 23 25 42 Screenshot 2024-10-04 at 23 26 06

Code Sample

No response

Logs

EXC_BAD_ACCESS near line + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
  [SwiftConnectivityPlusPlugin registerWithRegistrar:registrar];
}

Flutter Doctor

Flutter (Channel stable, 3.22.3, on macOS 14.6.1 23G93 darwin-arm64, locale en-GB)
    • Flutter version 3.22.3 on channel stable at /Users/srisindhusaride/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b0850beeb2 (3 months ago), 2024-07-16 21:43:41 -0700
    • Engine revision 235db911ba
    • Dart version 3.4.4
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/srisindhusaride/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/srisindhusaride/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

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

[✓] Android Studio (version 2024.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[!] Android Studio (version unknown)
    • Android Studio at /Users/srisindhusaride/Downloads/Android Studio Preview.app/Contents
    • 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
    ✗ Unable to determine Android Studio version.
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Community Edition (version 2024.2.0.1)
    • IntelliJ at /Users/srisindhusaride/Applications/IntelliJ IDEA Community Edition.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

[✓] Connected device (5 available)
    • iPhone 15 Pro (mobile)          • 5DF314C0-5536-4E2D-B1DB-39E313083AAD • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-5
      (simulator)
    • iPhone 14 (mobile)              • AC13D84F-98E5-4433-8EE9-9F7D95F51F12 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-4
      (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64   • macOS 14.6.1 23G93 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 14.6.1 23G93 darwin-arm64
    • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 129.0.6668.90

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Checklist before submitting a bug

ARASHz4 commented 3 days ago

I have the same problem

miquelbeltran commented 3 days ago

Maybe this helps: https://github.com/fluttercommunity/plus_plugins/issues/2276#issuecomment-1773056178 tldr: ensure your deployment target is iOS 12 or greater, not iOS 11 or lower

sindhu238 commented 1 day ago

Hi @miquelbeltran, thank you for your response. But

  1. In podfile i have this ' platform :ios, '13.0'
  2. I dont have any settings related to IPHONEOS_DEPLOYMENT_TARGET field in post_install
  3. In AppFrameworkInfo.plist specify MinimumOSVersion is set to 13
  4. In Build Settings iOS Deployement Target is set to 13.0
lockiechen commented 2 hours ago

I have the same problem, any suggestion? Xcode: 16 Flutter 3.24.3 • channel stable Tools • Dart 3.5.3