Skip to content

Fix Flutter iOS simulator native asset packaging#46

Merged
marcobambini merged 1 commit intosqliteai:mainfrom
alealv:fix/flutter-ios-simulator-native-asset
Mar 11, 2026
Merged

Fix Flutter iOS simulator native asset packaging#46
marcobambini merged 1 commit intosqliteai:mainfrom
alealv:fix/flutter-ios-simulator-native-asset

Conversation

@alealv
Copy link
Contributor

@alealv alealv commented Mar 11, 2026

Fixes #45.

Summary

  • thin the bundled iOS simulator dylib per target architecture in the Flutter native-asset build hook
  • emit an architecture-specific simulator asset instead of returning the same fat dylib for both arm64 and x86_64 targets
  • add a changelog entry for the Flutter package

Why

The current hook returns native_libraries/ios-sim/vector_ios-sim.dylib for every iOS simulator target. That file already contains both simulator architectures, so Flutter can end up trying to combine duplicate fat inputs during code asset packaging and fail with a lipo error.

Verification

  • reproduced the failure in a Flutter app using sqlite_vector on iOS simulator builds
  • verified locally that thinning the simulator dylib per architecture fixes the packaging failure
  • ran dart pub get && dart analyze in packages/flutter

dart analyze reports two existing informational lints unrelated to this change:

  • unnecessary_library_name in lib/sqlite_vector.dart
  • non_constant_identifier_names in lib/src/sqlite_vector.dart

@marcobambini marcobambini merged commit bda1841 into sqliteai:main Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS simulator native asset hook returns the same fat dylib for arm64 and x86_64 Flutter builds

2 participants