-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jeremy Knope
committed
May 31, 2017
1 parent
39cecb2
commit 1ce712e
Showing
3 changed files
with
102 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import simctl | ||
import sys | ||
|
||
url = sys.argv[1] | ||
|
||
siminfo = simctl.SimControl() | ||
devices = siminfo.activeDevices() | ||
|
||
foundDevice = None | ||
for device in devices: | ||
if device.isBooted(): | ||
foundDevice = device | ||
break | ||
|
||
if foundDevice: | ||
if not siminfo.openURL(device, url): | ||
print("Failed to open URL: %s" % (url)) | ||
else: | ||
print("Failed to find booted device") |
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