Moving from SDK 3.x to 4.0
What changes when an app moves from SDK 3.x to 4.0, when to move, and what to delete from your code.
SDK 4.0 gets a learner reciting sooner, keeps working on a poor connection and shows you every failure, behind the same calls: TajweedClient, client.model(), model.listen() or model.session(), and chunk.decoded. Your key, your app's page, its model version and its response time stay as they are. For most apps the move is the new version and a few options to delete, and your app's page has a prompt for your coding assistant that does it.
What you get
- A faster first launch. Model files download four at a time, the largest first, and are verified while they arrive. In Quran Lab's tests that cut a first open in the browser from 7.0 to 4.2 seconds, and a first install on Windows from 5.8 to 3.3.
- Downloads that finish. On any network, with nothing waiting for Wi-Fi. A download that was cut goes on from the last byte, and the SDK keeps working when one of Quran Lab's servers cannot be reached.
- A quicker start, every time. A model already on the device opens in 692 ms on an entry-level Android phone, down from 970, and the first result arrives about half a second earlier than on SDK 3. The output is the same bit for bit.
- Every failure, visible. Each error carries its cause, and your app's Problems tab shows what your learners ran into.
- New model versions. From V4.1 on, new versions of the model reach SDK 4.0 only.
- A protected model. Encrypted from Quran Lab's server to the device, and opened only inside the SDK.
When to move
- SDK 3.x stops receiving the V4 model on 15 January 2027, 00:00 UTC. Move your app to SDK 4.0 before then.
- New model versions are for SDK 4.0 only. From V4.1 on, a new model version ships only encrypted, for SDK 4.0: an app on 3.x never gets it.
- New keys work with SDK 4.0 and later only. A key you make now is refused by SDK 3.x with
sdk_too_old. A key your app already uses keeps working with 3.x until 15 January 2027, and so does a key that replaces it through Rotate.
What changes
| 3.x | 4.0 | |
|---|---|---|
| The model on the device | Plain files that the SDK verified | Encrypted for this install. Only the Quran Lab Core, a closed library inside the SDK, opens it |
The first client.model() |
Downloaded and opened the model | Also sets the install up with Quran Lab, so it needs a connection that once |
| Without a connection | Ran once downloaded | The same, and the SDK keeps itself up to date in the background. Offline |
| Downloads | Some waited for Wi-Fi | On whatever network the device has, with no option |
| Anonymous analytics | An analytics option in the app's code |
Always on, with no option: daily counts and durations only, never audio, text, names or device identifiers |
| Errors | A code and a message | The same codes, each with one meaning, and the cause of each error. Errors and problems |
| Error reports | Some failures | Every failure a learner hits, with no identifier, on your app's Problems tab |
| Recited ayahs | Reported by the app with session.reportRecited |
Counted by the SDK itself. session.reportRecited stays, for a take the SDK could not place and for your app's own judgement |
| Asking to share | After "Not now", the sheet again at least 7 sessions later | Later and less often. Recording sharing |
What to delete
Code that sets one of these does not build against the current SDK. On the web, a page that still passes analytics or audience is refused: create() fails with invalid_argument, and the fix is to delete the option.
analytics, wherever your code sets it:TajweedClientOptionson Android and Apple,create()on the web,TfClientOptions.analyticsin C.audience, in the same places: every app shows the same sharing sheet, under the same rules, and there is no other version of the sheet.- The Wi-Fi-only options.
unmeteredOnlyofTajweedClientOptionsand ofprefetch()on Android, Apple, the web and Flutter, andTfPrefetchOptions.unmetered_onlyin C. Nothing takes their place.
What stays as it was
- Sharing is the learner's choice. The SDK asks every learner itself, and each learner chooses: "Not now", the settings switch and "Delete what I shared" are theirs at any time. There is no option for it in your code or in the portal. A learner who said yes in 3.x is never asked again.
- The SDK hears and reports what it heard. Your app builds its own feedback on the output. Build your own feedback
- The notice is optional. Quran Lab recommends a line such as "Automatic tajweed feedback can be wrong. It does not replace a qualified teacher." where your app shows feedback. It is never required, and it is not a condition of the licence.
- A refused key or app. The SDK stops running the model and removes it from the device, as in 3.x.
By platform
Each quick start has the install line and what the platform needs. What is new for an app that comes from 3.x:
- Web. The page loads one script from Quran Lab, and the engine and the model run in Quran Lab's frame. The npm package loads the same script, so the import stays. If your site sends a Content-Security-Policy, add the lines of the web quick start. Node runs the same API with a desktop key.
- Android. Change the version, and add your signing certificates on the key's page (Android quick start): strongly recommended for an app you already have, and soon required. Every phone runs the CPU engine: there is no NPU acceleration on Android in 4.0. A phone with an unlocked bootloader cannot open the model, by design.
- iOS and macOS. Change the version, and add the App Attest capability: strongly recommended for an app you already have, and soon required. Making the Client downloads nothing: the model downloads at the first
client.model()orclient.prefetch(), and once more after the upgrade. The Simulator needs a development key. The package's privacy manifests now also declare crash data and the boot clock: check your App Store privacy answers against them. Apple quick start - Windows and Linux. Download the Core's binary for your system, point CMake at its folder, and ship it beside your program. Rebuild against the new header. Windows and Linux quick start
- Flutter. Update the plugin:
flutter pub add quranlab_tajweedformer. It brings the Android and Apple SDKs with it, and what changes for each is what is above. Flutter quick start