Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: appropriately translate some system prompts on iOS 16.1 simulator #400

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading