JetBrains の App Code IDE を見たところ、iOS シミュレーターを起動してアプリケーションを実行できるようです。
プロジェクトの展開を自動化しなければならなかったとき、私は Applescript と GUI 自動化に頼らなければなりませんでした。
「simlauncher」と呼ばれるクローズド ツールを使用しているようです。その背後にある魔法は何なのだろうか。
アップデート:
- アクティビティ モニターを見ると、シミュレーターが起動する前に、simlauncher から osascript が起動されていることがわかります。それはまたApplescriptでしょうか?iOS Simulator.app はスクリプト化できないと思いました。
- iOS シミュレーターは launchd によって起動されるようです。そのため、simlauncher はそれ自体を起動するわけではありません。また、simlauncher は、実際のアプリケーションがシミュレーターで実行されるまでのみ残ります。彼らはおそらくそれをポーリングしていますか?
- デバイス ビルドでは、おそらく Apple Mobile Device Service のバージョンである AMDeviceService を使用しています。これは刑務所の壊れた SDK からのテクニックですか?
「ps」の出力からのシミュレーターに関するもう少しの情報:
plumenator 26404 12.9 1.3 290172 52772 ?? SX 8:56PM 0:03.62 /Users/plumenator/Library/Application Support/iPhone Simulator/4.3.2/Applications/817A280D-1F74-4755-B848-B04EC8A24ADA/xxx.app/xxx
plumenator 26395 2.3 0.3 444208 13560 ?? S 8:56PM 0:00.72 /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone Simulator -SessionOnLaunch NO
plumenator 26402 1.4 0.8 318320 33052 ?? Us 8:56PM 0:00.86 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/CoreServices/SpringBoard.app/SpringBoard -SBDisableAutoDim YES -SBAutoLockTime -1 -SBAutoDimTime -1 -SBDontLockAfterCrash YES -SBDidShowReorderText YES -SBFakeBars YES -SBDontAnimateAppleDown YES -SBEnableDoubleHeightToggling YES
plumenator 26406 0.0 0.4 2466496 15792 ?? Ss 8:56PM 0:00.16 /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin --arch i386 --interp=mi1 -q
plumenator 26401 0.0 0.1 106584 5688 ?? S 8:56PM 0:00.30 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/libexec/lsd
plumenator 26400 0.0 0.1 105228 4204 ?? S 8:56PM 0:00.13 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/libexec/installd -t 30
plumenator 26399 0.0 0.3 223488 11464 ?? Ss 8:56PM 0:00.15 /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/SimulatorBridge 26395
これで、pid に従ってコマンドを並べ替えて実行するだけの問題になると思います。:-)
しかし、問題があります。これらのバイナリはすべて、シミュレータ プラットフォームのルートにある dylib を参照しています。それらを直接実行すると、「/」内のものを探します。
コマンドを実行する前に dylib のパスを設定する方法はありますか? これは有望に見えます: http://sacredsoftware.net/svn/misc/StemLibProjects/eaglshell/tags/2.1.0/Makefile
https://github.com/BlueFrogGaming/icukeにも良い情報があります。