Skip to content

Conversation

@dccarmo
Copy link

@dccarmo dccarmo commented Aug 20, 2025

Description

Closes #210

This PR adds initial support for MLKit Text Recognition v2 for both iOS and Android.

Please let me know if I missed any collaboration steps or if there's anything else that needs to be updated.

Future work

  • Add support for all scripts besides Latin
  • Improve return record type in each platform

@changeset-bot
Copy link

changeset-bot bot commented Aug 20, 2025

🦋 Changeset detected

Latest commit: c335f27

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@infinitered/react-native-mlkit-text-recognition Major
example-app Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dccarmo dccarmo changed the title Feat/text recognition Text Recognition Aug 20, 2025
@coolsoftwaretyler
Copy link

Hey @dccarmo - sorry for the long delay here. @frankcalise and I are going to review this sometime soon and get back to you. Appreciate the work!

Copy link
Collaborator

@frankcalise frankcalise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey thanks for the submission, couple of things to take a look at here if you don't mind.


struct TextRecord: Record {
@Field var text: String = ""
@Field var textBlocks: [TextBlockRecord] = []
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can rename this to blocks to match the API docs more closely.

Suggested change
@Field var textBlocks: [TextBlockRecord] = []
@Field var blocks: [BlockRecord] = []

struct TextBlockRecord: Record {
@Field var text: String = ""
@Field var frame: RectRecord = RectRecord()
@Field var recognizedLanguage: String = ""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the decision here to only return the first language code over retrieving the array as the data structure is documented?

Comment on lines +1 to +9
{
"permissions": {
"allow": [
"WebFetch(domain:developers.google.com)"
],
"deny": [],
"ask": []
}
} No newline at end of file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: please remove this claude config - I don't want other people to get the same permissions you granted on your machine.

[],
)

useEffect(() => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working on iOS when selecting images:

Image

@coolsoftwaretyler
Copy link

Hey @dccarmo - I rebased your PR against main. I opened a separate PR with the changes here: #235 in case you were in the middle of anything. I'll probably work on incorporating the feedback Frank and I left earlier as well, we'd like to ship this module soon. I'll make sure we get you added to the contributors list and everything. Thanks for getting this started! If you decide you want to take it to the finish line sooner than we can get to it, just let me know here. :)

@dccarmo
Copy link
Author

dccarmo commented Nov 18, 2025

Hey @coolsoftwaretyler, sorry for the late reply. I've been busy with two separate projects and while I appreciate the reviews from you and @frankcalise, unfortunately I don't have the time to fix them right now. Feel free to takeover and work on the required updates to release this to the public. Thanks so much!

@coolsoftwaretyler
Copy link

Thanks @dccarmo! We will take it from here.

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.

Add basic OCR feature

3 participants