Skip to content

Commit

Permalink
fix: appropriately translate some system prompts on iOS 16.1 simulator (
Browse files Browse the repository at this point in the history
  • Loading branch information
mwakizaka authored Nov 1, 2023
1 parent a914a54 commit f551113
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/simulator-xcode-9.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ const startupLock = new AsyncLock();
const preferencesPlistGuard = new AsyncLock();
const ENROLLMENT_NOTIFICATION_RECEIVER = 'com.apple.BiometricKit.enrollmentChanged';
const DOMAIN_KEYBOARD_PREFERENCES = 'com.apple.keyboard.preferences';
// com.apple.SpringBoard: translates com.apple.SpringBoard and system prompts for push notification
// com.apple.locationd: translates system prompts for location
// com.apple.tccd: translates system prompts for camera, microphone, contact, photos and app tracking transparency
const SERVICES_FOR_TRANSLATION = ['com.apple.SpringBoard', 'com.apple.locationd', 'com.apple.tccd'];

/**
* Creates device and common Simulator preferences, which could
Expand Down Expand Up @@ -579,13 +583,9 @@ class SimulatorXcode9 extends SimulatorXcode8 {
}

if (globalPrefs.AppleLanguages) {
// In order to translate com.apple.SpringBoard, system prompts
// for push notification and system prompts for location
await B.all(['com.apple.SpringBoard', 'com.apple.locationd']
.map((arg) => this.simctl.spawnProcess([
'launchctl', 'stop', arg
]))
);
await B.all(SERVICES_FOR_TRANSLATION.map((arg) => this.simctl.spawnProcess([
'launchctl', 'stop', arg
])));
}

return true;
Expand Down

0 comments on commit f551113

Please sign in to comment.