Last active
January 2, 2019 05:43
-
-
Save tsangint/d37db61a6814282353b859966b5c265d to your computer and use it in GitHub Desktop.
Revisions
-
tsangint revised this gist
Jan 2, 2019 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ #!/usr/bin/python # usage: ./ios-simulator.sh "iPhone XR" import os import re import sys -
tsangint created this gist
Jan 2, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ #!/usr/bin/python import os import re import sys name=sys.argv[1] print "Finding "+name process=os.popen("xcrun simctl list devices","r") processOutput=process.read() matched=re.search(name+'\s\(([A-z0-9\-]+)', processOutput) # print processOutput; process.close() if matched : print "UDID is "+matched.group(1) os.system("open -a Simulator --args -CurrentDeviceUDID "+matched.group(1)) print "Simulator lanched"