LoginSignup
4
4

More than 5 years have passed since last update.

Xcode Playgroundで出た実行エラーの解消

Last updated at Posted at 2016-02-07

はじめに

Playgroundを使おうとしたところ以下のエラーが出ました。このままではPlaygroundでコードを入力しても何も実行されず、エラーのダイアログだけが表示されてしまう状態です。

環境

Xcode 7.2.1

エラー内容

Error running playground.
Unable to find execution service for selected run destination.

スクリーンショット 2016-02-08 0.58.51.png

原因

Playgroundの実行で使用するSimulatorがXcodeに設定されていないため、Playgroundが実行できないというエラーのようです。

以前、beta版などをインストールしたところSimulatorの表示がおかしくなったため、一度全て削除した後で以下のように手動で追加した状態でした。

Simulatorの設定内容はXcodeのメニューバー→Window→Devicesから表示します。

スクリーンショット 2016-02-08 1.06.37.png

対処方法

検索したところ、以下のサイトでiPad ProのSimulatorを追加するとありましたので試してみました。
Playground gives an error: “Unable to find execution service for selected run destination”

この記事を参考にPlaygroundで使用されるSimulatorを手動で追加します。

1. デバイスの追加

以下のようにデバイスを設定します。

スクリーンショット 2016-02-08 1.07.17.png

2. 追加後

以下のようになります。

スクリーンショット 2016-02-08 1.08.30.png

3. Xcode再起動

最後にXcodeを再起動してPlaygroundを開いて動作を確認します。先ほどまでエラーが出ていましたが、無事動くようになりました。

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