LoginSignup
4
3

More than 5 years have passed since last update.

Simulator のスクリーンショット機能がクラッシュするのでコマンドで代替する

Posted at

iOSのSimulatorでスクリーンショットを撮影するとほぼクラッシュするようになってしまいました。これだと非常に困るわけで、コマンドを利用して代替できるようにしてみました。

$ xcrun simctl io booted screenshot ~/Desktop/Simulator-`date +%Y-%m-%d_%H.%M.%S`.png

これでデスクトップに画像ができあがります。

しかし毎回コマンドを叩くのも面倒なので、Automatorで自己実行型ワークフローにしてみます。

新規から「アプリケーション」を選んで…

シェルスクリプトを実行するアクションを記述して完成です。

Dockに置いておくと便利です。

以上。

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3