0
0

More than 3 years have passed since last update.

【iOS】アプリが閉じた状態でUniversal Linksでの起動をデバッグする

Last updated at Posted at 2020-02-14

アプリが閉じた状態でのUniversal Links経由の起動を繰り返しデバッグしたい時のメモ

手順

  1. EditSchemeWait for executable to be launched をチェック
    Screen Shot 2020-02-14 at 19.51.53.png
    これによって、Runした時にアプリが自動で起動しなくなります

  2. アプリをRun(Wait for executable to be launched)

  3. Terminalで以下のコマンドを実行

$ xcrun simctl terminate booted <bundle_identifier> && xcrun simctl openurl booted <url>

これによって常にアプリが閉じた状態で、Universal Links経由でアプリが起動するようになります。
繰り替えし確認したい場合は2と3を繰り返すことで可能となります。

解説

細かいコマンドの仕様はhelpやdocumentを参照してください。
- xcrun simctl terminate booted <bundle_identifier> は対象のアプリをタスクキルするのと同様です
- xcrun simctl openurl booted url はUniversal Links経由でアプリを起動します

0
0
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
0
0