We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5cbd69 commit e4671aaCopy full SHA for e4671aa
Sources/AnalyticsKit/UserAndDeviceInfo/Platform.swift
@@ -4,7 +4,13 @@ import Metal
4
/// Information about the current platform that the app is running on.
5
/// Is it a simulator, or device. Which device?
6
public enum Platform {
7
- public static var isSimulator: Bool { return TARGET_OS_SIMULATOR != 0 }
+ public static var isSimulator: Bool {
8
+#if targetEnvironment(simulator)
9
+ true
10
+#else
11
+ false
12
+#endif
13
+ }
14
15
/// Returns true if the code is running as part of a unit/integration test
16
public static var isRunningTests: Bool {
0 commit comments