Apple quick start
The Swift package for iOS and macOS: the install line, where the key goes, and the quick start.
The Swift package runs on iOS and macOS, on Apple silicon. It uses the Neural Engine where the device has tested it against the exact CPU engine, and the CPU engine otherwise. The source is at github.com/Quran-Lab/tajweedformer-apple.
Install
// Package.swift, or in Xcode: File > Add Package Dependencies
.package(url: "https://github.com/Quran-Lab/tajweedformer-apple", from: "2.0.2")
// product TajweedFormer
import TajweedFormer
The key
An iOS app uses an apps key and its macOS build a desktop key: two keys. The app is identified by its bundle id. Keep the key out of your repository:
// Secrets.xcconfig (git-ignored), the target's base configuration
QURANLAB_KEY = qlk_v1_...
// Info.plist: QuranLabKey = $(QURANLAB_KEY)
let key = Bundle.main.object(forInfoDictionaryKey: "QuranLabKey") as? String
Add the App Attest capability if your app will offer recording sharing.
What it needs
- iOS or macOS on Apple silicon.
- A microphone usage description (
NSMicrophoneUsageDescription) in the app'sInfo.plist, and the learner's permission, to hear the recitation. - Two keys when you ship both: an apps key for iOS and a desktop key for macOS.
- A connection once. The model (56.5 MB) downloads before the first session and every file is verified; after that it runs offline.
Quick start
The quick start for this version is in the package's README: github.com/Quran-Lab/tajweedformer-apple.