Skip to content

docs(readme): update plugin documentation for SwiftPM, Android SDK 36, and API accuracy - #910

Merged
fbernaly merged 1 commit into
developfrom
chore/readmes
Nov 4, 2026
Merged

fbernaly merged 1 commit into
developfrom
chore/readmes

Conversation

@fbernaly

@fbernaly fbernaly commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

📌 Overview

This PR audits and updates all 24 README.md files, 6 package example/README.md files, and 4 pubspec.yaml descriptions across the monorepo to align the documentation with the current Dart, Android (Kotlin/Gradle), and iOS (Swift Package Manager) implementations. It replaces obsolete CocoaPods workarounds with SwiftPM setup and resource bundle instructions, updates Android SDK requirements to API 36 with Kotlin DSL (build.gradle.kts) snippets, clarifies ModelManager remote model downloading behavior, completes the GenAI plugin documentation, and fixes code snippets and typos.


🛠 Key Changes

Root, Umbrella, Commons & Example App Documentation

  • 🟡 README.md: Added the Common APIs table (google_mlkit_commons), updated iOS requirements to Swift Package Manager (Swift 5.9, d-date/google-mlkit-swiftpm 9.0.2), updated Android targetSdkVersion/compileSdkVersion to 36 with per-plugin minSdkVersion notes (21, 24, 26), added the general Production Disclaimer, and formatted the camera_android / flutter/flutter#145961 note.
  • 🟡 packages/google_ml_kit/README.md: Synced feature tables (Common APIs), clarified which packages google_ml_kit re-exports vs. standalone packages (google_mlkit_document_scanner, google_mlkit_subject_segmentation), updated iOS SwiftPM and Android SDK 36 requirements, and synced the migration and camera streaming sections.
  • 🟡 packages/google_mlkit_commons/README.md: Added InputImage.fromBitmap(...) and Managing remote models (ModelManager) usage sections, fixed camera stream snippet variables (camera, controller) and ResolutionPreset.high, updated the iOS Swift source link (MLKVisionImage+FlutterPlugin.swift), and updated iOS/Android requirements.
  • 🟡 packages/example/README.md: Added iOS ML Kit resource bundle download instructions (./download_mlkit_bundles.sh), Android configuration notes (minSdk = 26, camera_android), and integration test instructions (integration_test/ml_kit_integration_test.dart).

Vision & Natural Language Plugin READMEs

  • 🟡 packages/google_mlkit_barcode_scanning/README.md: Replaced CocoaPods instructions with SwiftPM setup (-ObjC, -all_load), updated Android SDK to 36, and documented Barcode.rawBytes and BarcodeFormat usage.
  • 🟡 packages/google_mlkit_digital_ink_recognition/README.md: Updated iOS setup for SwiftPM and MLKitDigitalInkRecognition_resource.bundle, added Supported languages section, added tip for import 'package:flutter/material.dart' hide Ink;, clarified StrokePoint.t (int milliseconds), and documented that remote models must be downloaded before calling recognize().
  • 🟡 packages/google_mlkit_document_scanner/README.md: Updated Android SDK to 36 and added missing await documentScanner.scanDocument() and DocumentScanningResult (result.pdf, result.images) usage snippet.
  • 🟡 packages/google_mlkit_entity_extraction/README.md: Updated iOS setup for SwiftPM, updated Android SDK to 36, fixed annotateText() snippet to use EntityAnnotation.text, Entity.rawValue, and EntityType subclasses (DateTimeEntity, FlightNumberEntity, MoneyEntity), and clarified auto-download vs. EntityExtractorModelManager.
  • 🟡 packages/google_mlkit_face_detection/README.md: Updated iOS setup for SwiftPM and GoogleMVFaceDetectorResources.bundle, updated Android SDK to 36, and documented all FaceDetectorOptions fields.
  • 🟡 packages/google_mlkit_face_mesh_detection/README.md: Updated Android SDK to 36 and expanded FaceMeshDetector usage (FaceMeshDetectorOptions, points, triangles, contours).
  • 🟡 packages/google_mlkit_image_labeling/README.md: Updated iOS setup for SwiftPM (MLKitImageLabelingResources.bundle, MLKitObjectDetectionCommonResources.bundle), added androidResources { noCompress ... } in Groovy and Kotlin DSL (build.gradle.kts), documented #if canImport(MLKitLinkFirebase) on iOS, and clarified pre-downloading Firebase models.
  • 🟡 packages/google_mlkit_language_id/README.md: Updated iOS setup for SwiftPM, updated Android SDK to 36, and documented und (LanguageIdentifier.undeterminedLanguageCode).
  • 🟡 packages/google_mlkit_object_detection/README.md: Updated iOS setup for SwiftPM (MLKitObjectDetectionResources.bundle, MLKitObjectDetectionCommonResources.bundle), added androidResources { noCompress ... } in Groovy and Kotlin DSL (build.gradle.kts), documented optional confidenceThreshold and maximumLabelsPerObject parameters, and noted #if canImport(MLKitLinkFirebase) on iOS.
  • 🟡 packages/google_mlkit_pose_detection/README.md: Updated iOS setup for SwiftPM (MLKitPoseDetectionFastResources.bundle, MLKitPoseDetectionAccurateResources.bundle, MLKitPoseDetectionCommonResources.bundle, MLKitXenoResources.bundle) with physical device GPU/Metal note, updated Android SDK to 36, and documented PoseDetectionModel and PoseLandmark.likelihood.
  • 🟡 packages/google_mlkit_selfie_segmentation/README.md: Updated iOS setup for SwiftPM (MLKitSegmentationSelfieResources.bundle, MLKitSegmentationCommonResources.bundle, MLKitXenoResources.bundle) with physical device GPU/Metal note, updated Android SDK to 36, and documented SegmenterMode and SegmentationMask fields.
  • 🟡 packages/google_mlkit_smart_reply/README.md: Updated iOS setup for SwiftPM (PredictOnDeviceResource.bundle), updated Android SDK to 36, added Supported languages (English only), and documented clearConversation().
  • 🟡 packages/google_mlkit_subject_segmentation/README.md: Added top-level Beta Android-only notice, ### iOS section under Requirements, updated Android SDK to 36, and expanded SubjectSegmenter usage to show foregroundBitmap, foregroundConfidenceMask, and per-subject fields.
  • 🟡 packages/google_mlkit_text_recognition/README.md: Updated iOS setup for SwiftPM OCR bundles (LatinOCRResources.bundle, ChineseOCRResources.bundle, DevanagariOCRResources.bundle, JapaneseOCRResources.bundle, KoreanOCRResources.bundle), added Kotlin DSL (build.gradle.kts) script dependencies, and noted Android-only confidence, angle, and symbols fields.
  • 🟡 packages/google_mlkit_translation/README.md: Updated iOS setup for SwiftPM (MLKitTranslate_resource.bundle), updated Android SDK to 36, and documented isWifiRequired and auto-download behavior in translateText().

GenAI Plugin READMEs & Missing example/README.md Files

  • 🟡 packages/google_mlkit_genai_summarization/README.md: Added Beta Android-only notice, restored full PLEASE READ THIS section, added ### iOS requirements section, documented all enum options, and added Android native implementation notes.
  • 🟡 packages/google_mlkit_genai_proofreading/README.md: Added Beta Android-only notice, restored full PLEASE READ THIS section, added ### iOS requirements section, documented all enum options, and added Android native implementation notes.
  • 🟡 packages/google_mlkit_genai_rewriting/README.md: Added Beta Android-only notice, restored full PLEASE READ THIS section, added ### iOS requirements section, documented all enum options, and added Android native implementation notes.
  • 🟡 packages/google_mlkit_genai_image_description/README.md: Added Beta Android-only notice, restored full PLEASE READ THIS section, added ### iOS requirements section, documented 'file', 'bytes', and inputImage.toJson() inputs, and added Android native implementation notes.
  • 🟡 packages/google_mlkit_genai_speech_recognition/README.md: Added Alpha Android-only notice, restored full PLEASE READ THIS section, added ### iOS requirements section, and documented current Android native implementation status.
  • 🟡 packages/google_mlkit_genai_prompt/README.md: Added Alpha Android-only notice, restored full PLEASE READ THIS section, added ### iOS requirements section, documented 'file', 'bytes', and inputImage.toJson() multimodal inputs, and documented current Android native implementation status.
  • 🟢 packages/google_mlkit_genai_image_description/example/README.md: Added missing package example README linking to packages/example.
  • 🟢 packages/google_mlkit_genai_prompt/example/README.md: Added missing package example README linking to packages/example.
  • 🟢 packages/google_mlkit_genai_rewriting/example/README.md: Added missing package example README linking to packages/example.
  • 🟢 packages/google_mlkit_genai_speech_recognition/example/README.md: Added missing package example README linking to packages/example.
  • 🟡 packages/google_mlkit_genai_proofreading/example/README.md: Standardized heading to ## Example app.
  • 🟡 packages/google_mlkit_genai_summarization/example/README.md: Standardized heading to ## Example app.

Package pubspec.yaml Descriptions

  • 🟡 packages/google_mlkit_commons/pubspec.yaml: Fixed grammar in package description.
  • 🟡 packages/google_mlkit_entity_extraction/pubspec.yaml: Fixed grammar (to recognize specific entities within static text).
  • 🟡 packages/google_mlkit_selfie_segmentation/pubspec.yaml: Fixed typo (the background from users within a scene).
  • 🟡 packages/google_mlkit_subject_segmentation/pubspec.yaml: Fixed punctuation and standardized wording (Google's ML Kit Subject Segmentation API).

🧪 Verification & Testing

  • Verified all README code snippets, method signatures, enum values, and default parameters against Dart, Kotlin, and Swift source files.
  • Verified iOS SwiftPM .bundle names against packages/example/ios/download_mlkit_bundles.sh and d-date/google-mlkit-swiftpm 9.0.2.
  • Verified Android minSdkVersion, targetSdkVersion, compileSdkVersion, and native ML Kit artifact versions against plugin build.gradle files.

⚠️ Notes & Risk Assessment

  • Breaking Changes: None (documentation-only changes).
  • Migration Required: No.
  • Environment Variables: No new env vars required.

@fbernaly
fbernaly requested a review from bensonarafat November 4, 2026 21:46
@fbernaly

fbernaly commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

@pumano : Could you review these updates I made after your SPM changes?

@fbernaly
fbernaly requested a review from pumano November 4, 2026 21:59
@pumano

pumano commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Looks good to me 👍

@fbernaly
fbernaly merged commit a9d67f2 into develop Nov 4, 2026
4 checks passed
@fbernaly
fbernaly deleted the chore/readmes branch November 4, 2026 22:22
@fbernaly

fbernaly commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

@pumano : branch off latest develop for you next PR, and make sure the READMEs are updated with your changes.

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