Skip to content

Commit f72ea24

Browse files
fix: clearKeychain command (#2363)
1 parent 9a60fc7 commit f72ea24

File tree

1 file changed

+1
-33
lines changed

1 file changed

+1
-33
lines changed

maestro-ios-driver/src/main/kotlin/util/LocalSimulatorUtils.kt

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -413,39 +413,7 @@ object LocalSimulatorUtils {
413413

414414
fun clearKeychain(deviceId: String) {
415415
runCommand(
416-
listOf(
417-
"xcrun",
418-
"simctl",
419-
"spawn",
420-
deviceId,
421-
"launchctl",
422-
"stop",
423-
"com.apple.securityd",
424-
)
425-
)
426-
427-
val keychainFolder = "$homedir/Library/Developer/CoreSimulator/Devices/$deviceId/data/Library/Keychains"
428-
if (File(keychainFolder).exists()) {
429-
runCommand(
430-
listOf(
431-
"rm", "-rf",
432-
keychainFolder
433-
)
434-
)
435-
} else {
436-
logger.info("Keychain folder $keychainFolder does not exist, skipping rm")
437-
}
438-
439-
runCommand(
440-
listOf(
441-
"xcrun",
442-
"simctl",
443-
"spawn",
444-
deviceId,
445-
"launchctl",
446-
"start",
447-
"com.apple.securityd",
448-
)
416+
listOf("xcrun", "simctl", "keychain", deviceId, "reset")
449417
)
450418
}
451419

0 commit comments

Comments
 (0)