Skip to content

App Crash on iOS 18.5 Simulator #2636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 2 tasks
gujjar1988 opened this issue May 31, 2025 · 11 comments
Open
1 of 2 tasks

App Crash on iOS 18.5 Simulator #2636

gujjar1988 opened this issue May 31, 2025 · 11 comments
Labels
bug Something isn't working

Comments

@gujjar1988
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: DYLD 1 Library missing
Library not loaded: /usr/lib/swift/libswiftWebKit.dylib
Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/DDCFE1F5-071E-451A-B1D7-E7EA176DC77B/data/Containers/Bundle/Application/838BDBEC-F5E8-4B02-99F2-9858C8BC8D1E/Runner.app/Frameworks/flutter_inappwebview_ios.framework/flutter_inappwebview_ios
Reason: tried: '/Library/Developer/CoreSimulator/Volumes/iOS_22F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswiftWebKit.dylib' (no such file), '/usr/lib/swift/libswiftWebKit.dylib' (no such file, not in dyld cache), '/Library/Developer/CoreSimulator/Volumes/iOS_22F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libswiftWebKit.dylib' (no such file)
(terminated at launch; ignore backtrace)

Expected Behavior

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: DYLD 1 Library missing
Library not loaded: /usr/lib/swift/libswiftWebKit.dylib
Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/DDCFE1F5-071E-451A-B1D7-E7EA176DC77B/data/Containers/Bundle/Application/838BDBEC-F5E8-4B02-99F2-9858C8BC8D1E/Runner.app/Frameworks/flutter_inappwebview_ios.framework/flutter_inappwebview_ios
Reason: tried: '/Library/Developer/CoreSimulator/Volumes/iOS_22F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswiftWebKit.dylib' (no such file), '/usr/lib/swift/libswiftWebKit.dylib' (no such file, not in dyld cache), '/Library/Developer/CoreSimulator/Volumes/iOS_22F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libswiftWebKit.dylib' (no such file)
(terminated at launch; ignore backtrace)

Steps with code example to reproduce

Steps with code example to reproduce
// Paste your code here

Stacktrace/Logs

Stacktrace/Logs
<Replace this line by pasting your stacktrace or logs here>

Flutter version

Flutter version 3.32.0

Operating System, Device-specific and/or Tool

iOS 18.5

Plugin version

latest

Additional information

No response

Self grab

  • I'm ready to work on this issue!
@gujjar1988 gujjar1988 added the bug Something isn't working label May 31, 2025
@EugenKuzn
Copy link

Same issue for me, no solution for now

@muhammad67uzair
Copy link

crashing on 18.4 as well

@husainazkas
Copy link

Probably regression issue with #2584 and #1495

I'm also facing this issue just now after upgrade Flutter to 3.32.1 and Xcode to 16.4 WITH SAME flutter_inappwebview version. Now I'm thinking like @TatsuUkraine in #2584 discussion since this randomly happens on some people.

I suspect the problem is coming from Simulator especially Simulator with Rosetta bcs in my case there is an ios library that explicitly can only run in Simulator x86_64 (which should run with Rosetta if machine host is Apple Silicon).

@husainazkas
Copy link

husainazkas commented Jun 3, 2025

after some research, this is not related with Simulator x86_64 that should be run using Rosetta in Apple Silicon host machine. This error only occur if you're running on Simulator iOS 18.4 or newer unless your IPHONEOS_DEPLOYMENT_TARGET is 18.4 or higher. In other word, if your deployment target is below 18.4 then you might not be able to run on Simulator iOS 18.4 or newer.

Downgrade Simulator to iOS 18.3.1 is worked for me to run.

Below references may help you guys on this issue.
https://bugs.webkit.org/show_bug.cgi?id=293831
https://developer.apple.com/forums/thread/780073?answerId=834363022#834363022
https://developer.apple.com/forums/thread/785964

@gie3d
Copy link

gie3d commented Jun 4, 2025

Tested with iOS 18.3.1 simulator, works for me as well

However on iOS 18.5,

  • simulator -> not work
  • device -> work

@NazmiBecerik
Copy link

If you're encountering this issue on an Apple Silicon Mac, you can resolve it by installing Rosetta using the following command: sudo softwareupdate --install-rosetta --agree-to-license

@varunlohade
Copy link

@NazmiBecerik I ran the command u entered it didnt work.
what all is to be done

@varunlohade
Copy link

so will downgradung xcode work?

@DieGlueckswurst
Copy link

thats a huge one! Any fixes ??

@nazarrd
Copy link

nazarrd commented Jun 13, 2025

I had the same issue when running my Flutter app with flutter_inappwebview on the iOS 18.5 simulator. It kept crashing.I found a workaround shared by Elliott Williams on the WebKit bug tracker.

Here's what worked for me without changing the deployment target:


✅ Workaround: Set DYLD_FALLBACK_LIBRARY_PATH in Xcode

  1. First, find the simulator runtime path using this command:

    xcrun simctl list runtimes -v

    Look for the path that ends with something like:

    /Library/Developer/CoreSimulator/Volumes/iOS_22F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.5.simruntime
    
  2. Add this to the end of that path:

    Contents/Resources/RuntimeRoot/System/Cryptexes/OS/usr/lib/swift
    

    So the full path will look like this:

    /Library/Developer/CoreSimulator/Volumes/iOS_22F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.5.simruntime/Contents/Resources/RuntimeRoot/System/Cryptexes/OS/usr/lib/swift
    
  3. Open Xcode → go to Product > Scheme > Edit Scheme
    Then go to the Run section → Arguments tab.

  4. Under Environment Variables, add this:

    • Name: DYLD_FALLBACK_LIBRARY_PATH
    • Value: (paste the full path from step 2)
  5. Now just run the app on iOS 18.5 simulator. No need to rebuild.


Hope this helps someone else!

@husainazkas
Copy link

I had the same issue when running my Flutter app with flutter_inappwebview on the iOS 18.5 simulator. It kept crashing.I found a workaround shared by Elliott Williams on the WebKit bug tracker.

Here's what worked for me without changing the deployment target:

✅ Workaround: Set DYLD_FALLBACK_LIBRARY_PATH in Xcode

  1. First, find the simulator runtime path using this command:
    xcrun simctl list runtimes -v

    Look for the path that ends with something like:

    /Library/Developer/CoreSimulator/Volumes/iOS_22F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.5.simruntime
    
  2. Add this to the end of that path:

    Contents/Resources/RuntimeRoot/System/Cryptexes/OS/usr/lib/swift
    

    So the full path will look like this:

    /Library/Developer/CoreSimulator/Volumes/iOS_22F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.5.simruntime/Contents/Resources/RuntimeRoot/System/Cryptexes/OS/usr/lib/swift
    
  3. Open Xcode → go to Product > Scheme > Edit Scheme
    Then go to the Run section → Arguments tab.

  4. Under Environment Variables, add this:

    • Name: DYLD_FALLBACK_LIBRARY_PATH
    • Value: (paste the full path from step 2)
  5. Now just run the app on iOS 18.5 simulator. No need to rebuild.

Hope this helps someone else!

That's a bit tricky but I would like not recommend that way because it pointing directly to a disk image of simulator and not flexible if you working in a team or well organized company.

Instead, you can use my alternative by install a bit lower version of simulator such as 18.3.1 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants