fix: complete SPM migration — runtime crash fixes, use arrrrny/google-mlkit-swiftpm 9.0.0-1#881
fix: complete SPM migration — runtime crash fixes, use arrrrny/google-mlkit-swiftpm 9.0.0-1#881arrrrny wants to merge 25 commits into
Conversation
… update gitignore
…ir name for local path deps)
…tion with explanatory comment
…d build phase to replace SPM thin wrapper
…n model dylib + build script
…rny/google-mlkit-swiftpm - Delete all 22 CocoaPods podspecs across all packages - Update all 11 Package.swift files to reference arrrrny/google-mlkit-swiftpm - Add per-language OCR resource bundles (Latin, Chinese, Japanese, Korean, Devanagari) - Set -ObjC linker flag in example apps for ObjC category support - Create focused text_recognition_example app - Update Package.resolved files for SPM consistency - Clean up stale CocoaPods artifacts and build caches - Fixes text recognition 'Invalid model path' crash (d-date#106) - Fixes dyld flat-namespace crash on TestFlight/Release builds
…en 9.0.0-1 tag The 9.0.0-1 tag on arrrrny/google-mlkit-swiftpm points to an old commit with duplicate binary target entries. Use the fixed commit directly.
|
Addressing your comments: 1. linux/, macos/, web/, RunnerTests files — You're right, these are NOT needed. They were accidentally included when the example app's iOS configuration was regenerated. They should be removed from the PR. I'll push a cleanup. 2. OCR resource bundle files — These ARE needed. They contain the TFLite model files ( 3. Merge conflicts — I'll resolve them by rebasing |
…te files These files were accidentally generated by flutter create when the example app's iOS configuration was regenerated. They are not part of the iOS SPM migration and add noise to the PR.
|
✅ Cleaned up — pushed commit The remaining new files are:
The PR now only contains iOS-relevant changes. |



Description
This PR builds on the SPM migration in
feature/spmand adds critical runtime fixes that were discovered after the original PR (#874) was merged and reverted.What's Fixed
Runtime Crashes Resolved
MLKTextRecognizerInternalErrorCreationFailure: Invalid model path— ML Kit Text Recognition model bundles weren't being found in SPM static-link builds. Fixed by switching toarrrrny/google-mlkit-swiftpmrelease9.0.0-1which properly packages resource bundles.[MLKITx_GMVUtility grayPixelData:...] unrecognized selector sent to class— ObjC category methods not loaded. Fixed by adding-ObjCand-all_loadlinker flags to all plugin targets.dyld flat-namespace crash on TestFlight/Release builds — Resolved by ensuring proper Mach-O linking for ML Kit static frameworks.
Changes Included
arrrrny/google-mlkit-swiftpm(withrevisionpinning to the fixed commit)-ObjC+-all_loadlinker flags in xcconfig files for all plugin targetsPodfile,Podfile.lock,Pods/), stale build caches, package.resolved files for library targetsTesting
Related