Swiftで実機かシュミレータ判定をする方法

#if targetEnvironment(simulator)
  // your simulator code
#else
  // your real device code
#endif

 

ABOUTこの記事をかいた人

個人アプリ開発者。Python、Swift、Unityのことを発信します。月間2.5万PVブログ運営。 Twitter:@yamagablog