native_ai_bridge 0.2.2
native_ai_bridge: ^0.2.2 copied to clipboard
A Flutter plugin for interacting with Apple's Foundation Models framework, providing on-device AI capabilities.
0.2.2 #
- Add experimental Siri AI annotations:
@SiriTool,@SiriField,@SiriGenerableEntityand@SiriSkill. They do nothing at runtime;dart run native_ai_bridge_generator:sirireads them and writes Swift App Intents andSKILL.mdfiles. They may change while Apple's Siri AI Developer Preview changes. - README: new "Siri AI vs this package" section. Siri AI tools must be Swift App Intents in the app target; it lists the iOS 27.3, device, language and distribution limits of the preview.
0.2.1 #
- Fix the homepage, repository and issue tracker links. They pointed at a repository that does not exist; the package lives in
native_ai_bridge_library. No code changes.
0.2.0 #
Features #
generateStructuredreturns JSON that is guaranteed to match a JSON-Schema-style map, using guided generation (DynamicGenerationSchema).generateStructuredacceptsimagesfor the iOS 27 vision-capable model.getCapabilitiesreports availability, vision support and whether the current locale is supported.- Errors keep their native code:
UNSUPPORTED_LANGUAGE,CONTEXT_WINDOW_EXCEEDED,GUARDRAIL_VIOLATION,RATE_LIMITED,VISION_UNSUPPORTED,INVALID_SCHEMA. AppleFoundationExceptionandNativeAiCapabilitiesare exported.
Fixes #
- FoundationModels is weak-linked, so apps with a deployment target below iOS 26 no longer fail to launch on older iOS versions.
- Availability is no longer cached while the model is downloading or Apple Intelligence is off.
getStructuredDatareturned a map where Dart expected a JSON string.temperatureandmaxTokensare passed to the model.- Streaming sends text chunks instead of snapshot objects.
0.1.0 #
BREAKING CHANGES #
- Package renamed from
apple_foundation_fluttertonative_ai_bridge - iOS plugin class renamed from
AppleFoundationFlutterPlugintoNativeAiBridgePlugin - Method channel names updated from
apple_foundation_fluttertonative_ai_bridge - All imports must be updated to use
package:native_ai_bridge
Features #
- Added
AppleIntelligenceSessionclass for better session management - Added proper error handling for resource availability
- Added documentation for handling RUN_ERROR and MODEL_NOT_READY errors
Technical #
- Updated iOS requirements to iOS 26.0+
- Updated Xcode requirements to Xcode 26.0 beta 2
- Updated package metadata with new repository URLs
- Fixed various bugs and improved stability
- Added note about future MacOS support
Migration Guide #
See README.md for migration instructions from apple_foundation_flutter
0.0.1 #
- Initial release
- Basic implementation of Apple Foundation Models framework integration
- Support for text generation, structured data, and streaming responses
- Session management capabilities
- Error handling and availability checks