SDK 4.0 and Flutter

The Flutter plugin 4.0 on pub.dev, over the Android and Apple SDKs 4.0: the install line and what an app sets up.

Quran Lab's Flutter plugin, quranlab_tajweedformer on pub.dev, is one Dart API for Android and iOS over the Android SDK 4.0 and the Apple SDK 4.0. It brings both with it: do not add them to the app yourself. Its calls are the ones of the Flutter quick start.

Install

flutter pub add quranlab_tajweedformer

Flutter 3.41 or later. On iOS the app uses Flutter's Swift Package Manager integration (on by default since Flutter 3.44): the Apple SDK ships only as a Swift package. quranlab_tajweedformer_record is an optional microphone through the record plugin, for apps that capture audio themselves.

What an app sets up

  • The key. One apps key for the Android applicationId and the iOS bundle id. On the Android emulator and the iOS Simulator, use a development key: Quran Lab leases the Core's emulator and Simulator builds to development keys only.
  • Android. minSdk 26. On the key's page, under "Signing certificates (SHA-256)", add the app signing key certificate and the upload key certificate: until you do, installs are not hardware-verified for your app. At 4.0's launch every phone runs the Core's CPU engine.
  • iOS. Add the App Attest capability to the Runner target: an install is then hardware-verified, may use the Neural Engine, and uploads shared recordings. Exclude x86_64 from Simulator builds (EXCLUDED_ARCHS[sdk=iphonesimulator*] = x86_64): the Core is arm64 only. NSMicrophoneUsageDescription goes in ios/Runner/Info.plist.
  • The model. Making the client downloads nothing: the first client.model() or client.prefetch() downloads the model, encrypted, once, and that call needs a connection. Learners can then use the model offline for days at a time (the exact time is set by Quran Lab and may change). Offline use and the lease

What changes underneath is what changes for Android and Apple: the protected model, its lease, and anonymous analytics that are always on. What changes from 3.x has the whole list.