Skip to main content

Packages on pub.dev

The RunAnywhere Flutter SDK consists of three packages:
PackageDescriptionpub.dev
runanywhereCore SDK with APIs and infrastructurepub package
runanywhere_llamacppLLM text generation (GGUF models)pub package
runanywhere_onnxSTT, TTS, VAD (ONNX models)pub package

Add Dependencies

Add the packages you need to your pubspec.yaml:
Add these dependencies to pubspec.yaml:
dependencies:
  runanywhere: ^0.16.0
  runanywhere_llamacpp: ^0.16.0
Then run:
flutter pub get

iOS Setup (Required)

After adding the packages, update your iOS configuration:

1. Update Podfile

Open ios/Podfile and update:
ios/Podfile
# Set minimum iOS version to 14.0
platform :ios, '14.0'

target 'Runner' do
  # REQUIRED: Add static linkage
  use_frameworks! :linkage => :static

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
      # Required for microphone and speech recognition permissions
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
        '$(inherited)',
        'PERMISSION_MICROPHONE=1',
        'PERMISSION_SPEECH_RECOGNIZER=1',
      ]
    end
  end
end
Without use_frameworks! :linkage => :static, you will encounter “symbol not found” errors at runtime.

2. Add Microphone Permission

Add to ios/Runner/Info.plist (for STT/Voice features):
ios/Runner/Info.plist
<key>NSMicrophoneUsageDescription</key>
<string>This app needs microphone access for speech recognition and voice commands.</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>This app uses on-device speech recognition to transcribe your voice.</string>

3. Install Pods

cd ios && pod install && cd ..

Android Setup

Add required permissions to android/app/src/main/AndroidManifest.xml:
android/app/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
Also set android:usesCleartextTraffic="true" on the <application> tag if your app downloads models over HTTP or uses HTTP APIs (e.g., weather).

Android Build Configuration

The recommended Gradle configuration for optimal performance:
android/gradle.properties
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m
The higher JVM memory allocation (-Xmx8G) may be needed for native SDK compilation. Android requires Java 17 compatibility.

Verify Installation

Run your app to verify everything is set up correctly:
flutter run

Starter Example

Want to see a complete working example? Check out our official Flutter starter app:

Flutter Starter Example

Clone and run a complete example app with LLM, STT, TTS, and Voice Agent
git clone https://github.com/RunanywhereAI/flutter-starter-example.git
cd flutter-starter-example
flutter pub get
flutter run

Next Steps

Quick Start

Build your first AI feature →