You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
iOS simulator native asset hook returns the same fat dylib for arm64 and x86_64 Flutter builds #45
When sqlite_vector is used from a Flutter app on iOS simulator, the native-asset build hook returns the same fat simulator dylib for both arm64 and x86_64 targets. Flutter then tries to package those outputs together and fails during the simulator build.
Package Version
sqlite_vector0.9.85
Environment
Flutter 3.41.2
Xcode 26.1.1
iOS simulator build (just build ios --simulator --no-codesign in our case, but this is a normal Flutter iOS simulator build)
Failure
Flutter fails during iOS simulator packaging with an error like:
Target install_code_assets failed: Error: Failed to create universal binary:
fatal error: .../usr/bin/lipo: .../vector_ios-sim.dylib and .../vector_ios-sim.dylib have the same architectures (x86_64) and can't be in the same fat output file
Root Cause
The current hook returns native_libraries/ios-sim/vector_ios-sim.dylib for every iOS simulator build, regardless of target architecture:
That file is already a fat dylib containing both architectures, so Flutter ends up trying to combine duplicate inputs.
We confirmed this by inspecting the hook outputs for both simulator targets: both originally pointed at the same vector_ios-sim.dylib.
What Fixed It Locally
We patched the build hook so that for iOS simulator builds it thins the fat dylib per target architecture and emits an arch-specific output file:
arm64 -> vector_ios_sim_arm64.dylib
x86_64 -> vector_ios_sim_x86_64.dylib
After that, the Flutter iOS simulator build succeeded.
Suggested Fix
In hook/build.dart, for OS.iOS + simulator targets, emit an architecture-specific dylib instead of returning the same fat simulator binary for every target.
If helpful, I can open a PR with the hook change we tested locally.
The failing step is assemble and publish flutter package, and the relevant pub validation errors are:
pubspec.yaml is modified in git
packages/flutter/CHANGELOG.md does not mention 0.9.92
So the GitHub release exists, but the pub.dev publish step never completes. Thought it was worth pointing out explicitly in case it helps unblock the release.
Hi @alealv , thanks for the issue and the helpful PR! I've just fixed the workflow and now the latest released version on pub.dev is the 0.9.93 with your fix included!
Activity
marcobambini commentedon Mar 11, 2026
Hi @alealv yes please open a PR so we can better take a look at the fix, thanks!
alealv commentedon Mar 11, 2026
Small follow-up: it looks like the reason pub.dev is still stuck at
0.9.85is that the Flutter publish workflow is failing for the tag releases.I checked the
0.9.92run here:https://github.com/sqliteai/sqlite-vector/actions/runs/22264167954
The failing step is
assemble and publish flutter package, and the relevant pub validation errors are:pubspec.yamlis modified in gitpackages/flutter/CHANGELOG.mddoes not mention0.9.92So the GitHub release exists, but the pub.dev publish step never completes. Thought it was worth pointing out explicitly in case it helps unblock the release.
marcobambini commentedon Mar 11, 2026
Thanks, @alealv. We are working on a fix; @Gioee should trigger the new package.
Gioee commentedon Mar 11, 2026
Hi @alealv , thanks for the issue and the helpful PR! I've just fixed the workflow and now the latest released version on pub.dev is the
0.9.93with your fix included!