Skip to content

App crashes on startup on iOS devices lower than 26.x #1040

@vivek03codes

Description

@vivek03codes

Describe the bug
The iOS build of my Flutter app fails to launch on a real device due to a DYLD runtime crash caused by this plugin (location).
The crash points to the location.framework (vendored iOS framework) attempting to load a private Apple system framework:
/System/Library/Frameworks/_LocationEssentials.framework/_LocationEssentials

This private system framework does not exist on many iOS devices (including the one I tested on), which causes the app to crash immediately at launch.

The issue persists even after:

  • flutter clean
  • pod deintegrate && pod install
  • updating to the latest version of the plugin
  • setting different iOS deployment targets (15.0, 17.0)
  • using static linking / disabling dynamic frameworks
  • cleaning Xcode derived data
  • rebuilding release & debug builds

The crash happens only on some devices, depending on their iOS build and dyld cache.
Other devices may succeed because they allow weak linking.
Affected devices crash 100% of the time.

This indicates that the binary inside the plugin (iOS vendored framework) was compiled with references to private Apple frameworks, which is not allowed, and results in unrecoverable dyld errors.

Expected behavior

  • The plugin should not link against or reference private Apple frameworks.
  • The generated iOS framework should:
  • load on all iOS 15+ devices
  • not require runtime loading of private system frameworks
  • not crash dyld on startup
  • be compiled without weak-linking _LocationEssentials.framework

Tested on:

  • Android (works fine on all android levels)
  • iOS
    • iPhone 14 Pro Max
    • iOS 18.6.2
    • Real physical device
    • App crashes instantly on launch before main.dart runs

Tested also on:

  • iPhone 13 (iOS 26.0) – Works
  • iPhone 15 (iOS 26.1) – Works
  • iPhone 13 (iOS 26.2) - Works
  • iPhone 16 (Simulator) (iOS 26.0) - Works

Additional logs
warning: (arm64) /var/containers/Bundle/Application/7C20A2B0-8FA6-4AD3-8DF3-FE224BCA2B89/BankG.app/BankG(0x00000001040b0000) empty dSYM file detected, dSYM was created with an executable with no debug info. dyld[915]: Library not loaded: /System/Library/Frameworks/_LocationEssentials.framework/_LocationEssentials Referenced from: <BC63DC30-44B5-3AB0-9BAF-55E02D1A9112> /private/var/containers/Bundle/Application/7C20A2B0-8FA6-4AD3-8DF3-FE224BCA2B89/BankG.app/Frameworks/camerawesome.framework/camerawesome (built for iOS 26.0 which is newer than running OS) Reason: tried: '/System/Library/Frameworks/_LocationEssentials.framework/_LocationEssentials' (no such file), '/private/preboot/Cryptexes/OS/System/Library/Frameworks/_LocationEssentials.framework/_LocationEssentials' (no such file), '/System/Library/Frameworks/_LocationEssentials.framework/_LocationEssentials' (no such file, not in dyld cache)Library not loaded: /System/Library/Frameworks/_LocationEssentials.framework/_LocationEssentials Referenced from: <8136564E-CDDD-3305-8BEC-737CA10281C8> /private/var/containers/Bundle/Application/7C20A2B0-8FA6-4AD3-8DF3-FE224BCA2B89/BankG.app/Frameworks/geocoding_ios.framework/geocoding_ios (built for iOS 26.0 which is newer than running OS) Reason: tried: '/System/Library/Frameworks/_LocationEssentials.framework/_LocationEssentials' (no such file), '/private/preboot/Cryptexes/OS/System/Library/Frameworks/_LocationEssentials.framework/_LocationEssentials' (no such file), '/System/Library/Frameworks/_LocationEssentials.framework/_LocationEssentials' (no such file, not in dyld cache)Library not loaded: /System/Library/Frameworks/_LocationEssentials.framework/_LocationEssentials Referenced from: <D2F5F005-20F9-3AF2-AAAF-6317CD7329F5> /private/var/containers/Bundle/Application/7C20A2B0-8FA6-4AD3-8DF3-FE224BCA2B89/BankG.app/Frameworks/location.framework/location (built for iOS 26.0 which is newer than running OS) Reason: tried: '/System/Library/Frameworks/_LocationEssentials.framework/_LocationEssentials' (no such file), '/private/preboot/Cryptexes/OS/System/Library/Frameworks/_LocationEssentials.framework/_LocationEssentials' (no such file), '/System/Library/Frameworks/_LocationEssentials.framework/_LocationEssentials' (no such file, not in dyld cache) Process 915 stopped * thread #1, stop reason = signal SIGABRT frame #0: 0x00000001b61375e0 dyld__abort_with_payload + 8 dyld__abort_with_payload: -> 0x1b61375e0 <+8>: b.lo 0x1b6137600 ; <+40> 0x1b61375e4 <+12>: pacibsp 0x1b61375e8 <+16>: stp x29, x30, [sp, #-0x10]! 0x1b61375ec <+20>: mov x29, sp Target 0: (BankG) stopped.

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