| Index: testing/iossim/iossim.mm
|
| diff --git a/testing/iossim/iossim.mm b/testing/iossim/iossim.mm
|
| index 7d5dbf872e93cbc9c7e1155fefdbef3cd9caef07..ac03dcd1b15baa29a76343c46b8c3e7597defada 100644
|
| --- a/testing/iossim/iossim.mm
|
| +++ b/testing/iossim/iossim.mm
|
| @@ -491,12 +491,11 @@ BOOL InitializeSimulatorUserHome(NSString* userHomePath, NSString* deviceName) {
|
|
|
| // Set the device to simulate. Note that the iOS Simulator must not be running
|
| // for this setting to take effect.
|
| - NSMutableDictionary* plistDict =
|
| - [NSMutableDictionary dictionaryWithObject:deviceName
|
| - forKey:@"SimulateDevice"];
|
| - NSString* plistPath = @"Library/Preferences/com.apple.iphonesimulator.plist";
|
| - [plistDict writeToFile:[userHomePath stringByAppendingPathComponent:plistPath]
|
| - atomically:YES];
|
| + CFStringRef iPhoneSimulatorAppID = CFSTR("com.apple.iphonesimulator");
|
| + CFPreferencesSetAppValue(CFSTR("SimulateDevice"),
|
| + deviceName,
|
| + iPhoneSimulatorAppID);
|
| + CFPreferencesAppSynchronize(iPhoneSimulatorAppID);
|
|
|
| // Update the environment to use the specified directory as the user home
|
| // directory.
|
|
|