v0.1.42 - fix: update iOS version check for experimentalMLE5EngineUsage from 16 to 17 (#408)
π Summary
v0.1.42 makes the Flutter YOLO plugin safer on iOS, adds a clean API to choose front/back camera by default, and improves model initialization and stability across platforms. π
π Key Changes
-
β iOS stability fix for Core ML config (
experimentalMLE5EngineUsage)- Updated the iOS version guard so
experimentalMLE5EngineUsageis only used on iOS 17+. - Prevents crashes on iOS 16 and earlier caused by setting an unsupported Core ML configuration key.
- Implemented in
BasePredictor.swiftusing a stricter#available(iOS 17.0, *)check.
- Updated the iOS version guard so
-
π₯ New
lensFacingparameter inYOLOView(front/back camera selection)- Added
enum LensFacing { back, front }to the Dart API. YOLOViewnow acceptslensFacing, defaulting toLensFacing.backfor full backward compatibility.- On Android:
- Reads
lensFacingfrom creation params ("front"/"back"). - Maps to
CameraSelector.LENS_FACING_FRONT/LENS_FACING_BACK. - New
setLensFacing()onYOLOViewrestarts the camera with the chosen lens when needed.
- Reads
- On iOS:
- Uses
AVCaptureDevice.Position.front/.backbased on the passedlensFacing. YOLOViewinitializer now takes acameraPositionparameter and starts with that lens.
- Uses
- Example app updated:
CameraInferenceControllertracksLensFacingand exposes it.YOLOViewincamera_inference_content.dartpasseslensFacingand uses a more specificValueKeyto avoid stale views.
- Added
-
π§ Model initialization robustness (
YOLO.isInitialized+ saferloadModel()/predict())- New
bool get isInitializedlets you check if the model is ready before callingpredict(). _isInitializedis now set only after a successfulloadModel()result.loadModel()returns aboolindicating success and only flips_isInitializedwhen loading works.predict():- Auto-calls
loadModel()if not initialized. - Throws a clear
ModelNotLoadedExceptionif loading fails, instead of silently misbehaving.
- Auto-calls
- New
-
π Fix for
MissingPluginExceptionwith default YOLO instances- Restored backward-compatible channel naming:
"default"instance IDs are treated the same asnullβ no_defaultsuffix.- Default channel name stays
yolo_single_image_channel.
- Prevents
MissingPluginExceptionwhen using the default instance withoutuseMultiInstance: true. - Added tests validating channel names for default, null, and custom instance IDs.
- Restored backward-compatible channel naming:
-
π§ͺ Expanded tests for reliability
- New test coverage for:
ChannelConfigbehavior with default, null, and custom instance IDs.YOLOViewβslensFacingdefaults and combinations with other parameters.- Widget creation scenarios with front/back camera configurations.
- New test coverage for:
-
π New GitHub issue templates for better support
- Added structured templates for:
- π Bug reports
- π Feature requests
- β Questions
- Centralized useful links (Flutter plugin docs, forum, Discord, Reddit) via
config.yml.
- Added structured templates for:
-
π§± CI & tooling maintenance
- Bumped
actions/checkoutfrom v5 to v6 across workflows for up-to-date GitHub Actions support. - Pinned
python-version: "3.13"informat.ymlto avoid early Python 3.14 compatibility issues.
- Bumped
-
π§Ύ Versioning & changelog
pubspec.yamlbumped from0.1.40β0.1.42.CHANGELOG.mdupdated to document:- The new
lensFacingfeature. - The
MissingPluginExceptionfix for default instances.
- The new
π― Purpose & Impact
-
π‘οΈ Crash-free experience on older iOS versions
- By guarding
experimentalMLE5EngineUsagebehind an iOS 17+ check, apps no longer crash on iOS 16 and below due to unsupported Core ML configuration keys. - Impact: smoother rollouts across mixed iOS fleets without conditional code on your side.
- By guarding
-
πΈ Better camera UX with explicit front/back selection
- You can now control which camera starts by default:
YOLOView( modelPath: 'assets/models/yolo11n.tflite', task: YOLOTask.detect, lensFacing: LensFacing.front, // π start with selfie camera ) - Impact:
- Easier to build selfie, video-call, or front-cameraβcentric apps.
- Behavior remains unchanged if you do nothing (still defaults to back camera).
- You can now control which camera starts by default:
-
π§© More predictable model lifecycle & errors
YOLO.isInitializedand stricterloadModel()semantics give you precise control over when the model is actually ready.predict()failing fast withModelNotLoadedExceptionmakes issues easier to diagnose instead of chasing silent no-op behavior.- Impact: fewer runtime surprises, simpler debugging, and clearer integration flows.
-
π Restored compatibility for default plugin usage
- The channel naming fix ensures existing apps using the default YOLO instance (no custom
instanceId, nouseMultiInstance: true) work again withoutMissingPluginException. - Impact: safe upgrade path from v0.1.38+ for apps that previously broke on default channel changes.
- The channel naming fix ensures existing apps using the default YOLO instance (no custom
-
π€ Smoother collaboration & faster support
- Issue templates guide users to provide complete, structured information, reducing back-and-forth.
- Clear links to docs and community channels help users self-serve more effectively.
- Impact: higher-quality bug reports and feature requests, and quicker resolutions.
-
π§° More stable CI and tooling
- Keeping workflows on supported actions (checkout v6) and pinning Python versions makes automated checks more reliable.
- Impact: fewer CI-related interruptions and more consistent releases for the plugin.
Overall, v0.1.42 is a stability and ergonomics focused release: fewer crashes on iOS, safer model initialization, restored backward compatibility, and a more flexible camera API for real-world apps. π
What's Changed
- chore: expose isInitialized by @asabri97 in https://github.com/ultralytics/yolo-flutter-app/pull/392
- fix: missing plugin implementation by @asabri97 in https://github.com/ultralytics/yolo-flutter-app/pull/378
- Issue templates by @glenn-jocher in https://github.com/ultralytics/yolo-flutter-app/pull/402
- chore(deps): bump actions/checkout from 5 to 6 in /.github/workflows by @dependabot[bot] in https://github.com/ultralytics/yolo-flutter-app/pull/407
- Param set camera direction by @asabri97 in https://github.com/ultralytics/yolo-flutter-app/pull/406
- fix: update iOS version check for experimentalMLE5EngineUsage from 16 to 17 by @zhponng in https://github.com/ultralytics/yolo-flutter-app/pull/408
New Contributors
- @zhponng made their first contribution in https://github.com/ultralytics/yolo-flutter-app/pull/408
Full Changelog: https://github.com/ultralytics/yolo-flutter-app/compare/v0.1.40...v0.1.42