An Xcode/CoreSimulator command line utility to control iOS Simulators on MacOS
simctl [--set <path>] [--profiles <path>] <subcommand> ...
simctl help [subcommand]
import compileall | |
import os | |
import sys | |
# Get path of this file's directory | |
directory = os.path.dirname(os.path.realpath(__file__)) | |
# Check that files are compileable | |
success = compileall.compile_dir(dir=directory, maxlevels=20, force=True) |
find "{directory}" -name "{filename}" -print0 | xargs -0 "{command}" | |
# Example find "./" -name "*.txt" -print0 | xargs -0 echo |
read SIMVERSION <<< $(xcrun simctl list | awk '/^iOS[[:space:]][0-9\.]+/ { print $2 }') | |
#echo $SIMVERSION | |
#Output: 10.3 |
import UIKit | |
//Abbreviated OpenAPI product response for example purposes | |
let jsonData = """ | |
{ | |
"paging": { | |
"total": 8, | |
"offset": 0, | |
"limit": 40, | |
"returned": 8 |