Skip to content

feat: SPM migration for all packages + support simulator#890

Open
pumano wants to merge 2 commits into
flutter-ml:feature/spmfrom
pumano:feature/spm-for-all-packages
Open

feat: SPM migration for all packages + support simulator#890
pumano wants to merge 2 commits into
flutter-ml:feature/spmfrom
pumano:feature/spm-for-all-packages

Conversation

@pumano

@pumano pumano commented Jul 17, 2026

Copy link
Copy Markdown

@fbernaly I found that fork https://github.com/mdata-group/google-mlkit-swiftpm fix simulator problem, but some things linked twice results to Error (Xcode): 115 duplicate symbols

There are 115 duplicate symbols because MLKitCommon gets linked multiple times. google_mlkit_commons depends on MLKitBarcodeScanning (which includes MLKitCommon), and other packages like barcode_scanning also depend on MLKitBarcodeScanning directly — causing MLKitCommon to be linked twice.

duplicate symbol 'MLKITx_strings::CleanStringLineEndings(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, bool)' in: duplicate symbol 'MLKITx_strings::ShellEscape(MLKITx_absl::string_view)' in: duplicate symbol 'MLKITx_strings::EightBase32DigitsToFiveBytes(char const*, unsigned char*)' in: duplicate symbol 'MLKITx_absl::WebSafeBase64Unescape(char const*, long, char*, long)' in: duplicate symbol 'MLKITx_strings::ByteStringToAscii(MLKITx_absl::string_view, long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)' in: duplicate symbol 'MLKITx_absl::base_internal::delete_hooks_' in: duplicate symbol 'MLKITx_absl::base_internal::MallocHook::AddNewHook(void (*)(MLKITx_tcmalloc::MallocHook::NewInfo const&))' in: duplicate symbol 'MLKITx_absl::base_internal::MallocHook::AddMremapHook(void (*)(void const*, void const*, unsigned long, unsigned long, int, void const*))' in: duplicate symbol 'MLKITx_strings::TenHexDigitsToEightBas…

Could you check it? Maybe you can fix it

@fbernaly

Copy link
Copy Markdown
Collaborator

@pumano : did you test running the example app and makeing sure the detection works? If yes then list the ones you have tested on an actual device.

@fbernaly fbernaly self-assigned this Jul 17, 2026
@pumano

pumano commented Jul 17, 2026

Copy link
Copy Markdown
Author

@fbernaly I push second commit and looks like I fix it! app launched successfully!! Check it out plz. I don't have real iphone device right now, can't test. If you can help with it - will be good

@fbernaly

Copy link
Copy Markdown
Collaborator

@pumano : not only launching the app but testing each of the features, with these migration work I have seen a lot of runtime errors that do not happen with cocoapods, that is why I have not released this SPM migration until all the features run with no runtime crashes

@pumano

pumano commented Jul 17, 2026

Copy link
Copy Markdown
Author

OK I will try to find real device tomorrow and debug it

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.

2 participants