Skip to content

[health 13.1.4] App crashes on launch with DYLD Symbol missing on iOS 16 #1279

@anies1212

Description

@anies1212

Plugin Name

health

Plugin Version

13.1.4

Device

iPhone 8 (iPhone10,1)

Operating System

iOS version: 16.0.2

Describe the bug

Description

App crashes immediately on launch on iOS 16 devices. The crash occurs before any Flutter code executes.

This started happening after upgrading from health 11.1.1 to 13.1.4.

Workaround

Downgrade to health: ^11.1.1

Additional Context

This issue appears to have been introduced in health 13.0.0 with the Swift native code refactoring (PR #1208). The HKElectrocardiogramQuery Swift extension seems to require iOS 17+.

Please consider either:

  1. Updating the podspec to reflect the actual minimum iOS version requirement
  2. Adding @available checks to maintain iOS 16 compatibility

Steps to Reproduce

  1. Create a new Flutter project
  2. Add health: ^13.1.4 to pubspec.yaml
  3. Run flutter pub get
  4. Add HealthKit capability and required Info.plist entries
  5. Build and run the app on an iOS 16 device (or simulator)
  6. App crashes immediately on launch before any code executes

Expected Behavior

App should launch on iOS 16 devices, as the podspec states s.ios.deployment_target = '14.0'.

Actual Behavior

App crashes at launch due to missing Swift symbol (HKElectrocardiogramQuery.Result.measurement) in iOS 16's HealthKit framework.

Flutter Logs

Hardware Model: iPhone10,1
OS Version: iPhone OS 16.0.2 (20A380)

Exception Type: EXC_CRASH (SIGABRT)
Termination Reason: DYLD 4 Symbol missing

Symbol not found: _$sSo24HKElectrocardiogramQueryC9HealthKitE6ResultO11measurementyAESo0A18VoltageMeasurementCcAEmFWC
Referenced from: Runner.app/Runner
Expected in: /System/Library/Frameworks/HealthKit.framework/HealthKit
(terminated at launch; ignore backtrace)

Screenshots

No response

Flutter Doctor Output

❯ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.38.3, on macOS 26.1 25B78 darwin-arm64, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
[✓] Xcode - develop for iOS and macOS (Xcode 26.0)
[✓] Chrome - develop for the web
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions