-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change from using applescript to command line tools.
Makes the gem to almost stupidly simple now. Bump to version 1.2.0
- Loading branch information
1 parent
0b2d9e6
commit 906c837
Showing
7 changed files
with
8 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ nbproject | |
.sass-cache | ||
.idea | ||
.dat*.* | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,3 @@ | ||
#!/usr/bin/env ruby | ||
|
||
def osascript(script) | ||
system 'osascript', *script.split(/\n/).map { |line| ['-e', line] }.flatten | ||
end | ||
|
||
osascript <<-END | ||
-- assume most people are on xcode7 or greater | ||
-- so try that first | ||
set simulator_app_name to missing value | ||
try | ||
tell application "Simulator" to activate | ||
set simulator_app_name to "Simulator" | ||
on error number -1728 | ||
log "Trying legacy iOS Simulator application..." | ||
try | ||
tell application "iOS Simulator" to activate | ||
set simulator_app_name to "iOS Simulator" | ||
on error number -1728 | ||
log "No Simulator application installed" | ||
end try | ||
end try | ||
if simulator_app_name is not equal to missing value | ||
tell application "System Events" | ||
click menu item ¬ | ||
"Erase All Content and Settings…" of menu 1 of menu bar item ¬ | ||
"Hardware" of menu bar 1 of application process simulator_app_name | ||
delay 0.5 | ||
tell process simulator_app_name | ||
keystroke tab | ||
keystroke return | ||
end tell | ||
end tell | ||
end if | ||
END | ||
system 'killall "Simulator" 2> /dev/null && xcrun simctl erase all' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module ResetSim | ||
VERSION = "1.2.0" | ||
VERSION = "1.3.0" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.