setAppLocales
Sets the per-app languages of packageName, like choosing an app language in Settings.
The XCUITest counterpart passes -AppleLanguages at launch; on Android 13+ the system stores per-app locales instead. Relaunch the app afterward. An empty list restores the system locale.
Parameters
packageName
The app whose locales to set.
languageTags
BCP 47 tags in preference order, such as listOf("fa-IR").
Throws
for an invalid package name or language tag.
below Android 13.