Condition Swift Simulatore

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