2
2

More than 1 year has passed since last update.

お題は不問!Qiita Engineer Festa 2023で記事投稿!

【Swift】シュミレーターを判定する

Posted at

はじめに

カメラを使うアプリを作成してる時に、シュミレータービルド時だけカメラの初期をスキップしたいことがありました。

やりかた

#if targetEnvironment(simulator)
  // シュミレーター
#else
  // 実機
#endif

おわり

知りませんでした

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