Skip to content

Commit 6c73fc8

Browse files
committed
Added EnvironmentCheck to prevent compilation for a simulator
1 parent e336a62 commit 6c73fc8

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

Source/EnvironmentCheck.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//
2+
// EnvironmentCheck.swift
3+
// XcodeBenchmark
4+
//
5+
// Created on 11/16/20.
6+
//
7+
8+
#if targetEnvironment(simulator)
9+
10+
#error("Please select Any iOS Device as a target device")
11+
12+
#endif

XcodeBenchmark.xcodeproj/project.pbxproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
1FBFEBAD2562E83E008FCA7D /* EnvironmentCheck.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FBFEBAC2562E83E008FCA7D /* EnvironmentCheck.swift */; };
1011
A958866D2F4237612DA49619 /* Pods_XcodeBenchmark.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC0BAB213E11E7D940C5A0E3 /* Pods_XcodeBenchmark.framework */; };
1112
B54D7A4224EC43C300934506 /* Moya.swift in Sources */ = {isa = PBXBuildFile; fileRef = B54D7A4124EC43C300934506 /* Moya.swift */; };
1213
B54D7A4424EC440E00934506 /* RxBluetoothKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = B54D7A4324EC440E00934506 /* RxBluetoothKit.swift */; };
@@ -29,6 +30,7 @@
2930
/* End PBXBuildFile section */
3031

3132
/* Begin PBXFileReference section */
33+
1FBFEBAC2562E83E008FCA7D /* EnvironmentCheck.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnvironmentCheck.swift; sourceTree = "<group>"; };
3234
5EAE61E6B695B3E7F03EA62B /* Pods-XcodeBenchmark.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XcodeBenchmark.debug.xcconfig"; path = "Target Support Files/Pods-XcodeBenchmark/Pods-XcodeBenchmark.debug.xcconfig"; sourceTree = "<group>"; };
3335
B54D7A4124EC43C300934506 /* Moya.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Moya.swift; sourceTree = "<group>"; };
3436
B54D7A4324EC440E00934506 /* RxBluetoothKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RxBluetoothKit.swift; sourceTree = "<group>"; };
@@ -104,7 +106,7 @@
104106
B5C5A7F624EC2989002C0C62 /* Source */ = {
105107
isa = PBXGroup;
106108
children = (
107-
B5C5A7F824EC2989002C0C62 /* Info.plist */,
109+
1FBFEBAC2562E83E008FCA7D /* EnvironmentCheck.swift */,
108110
B5C5A7FF24EC2B2A002C0C62 /* Firebase.swift */,
109111
B54D7A4724EC449E00934506 /* SDWebImage.swift */,
110112
B54D7A4524EC446A00934506 /* AFNetworking.swift */,
@@ -123,6 +125,7 @@
123125
B54D7A6124EC48F400934506 /* Facebook.swift */,
124126
B54D7A6324EC495C00934506 /* Google.swift */,
125127
B54D7A5F24EC486D00934506 /* Other.swift */,
128+
B5C5A7F824EC2989002C0C62 /* Info.plist */,
126129
);
127130
path = Source;
128131
sourceTree = "<group>";
@@ -263,6 +266,7 @@
263266
B54D7A6424EC495C00934506 /* Google.swift in Sources */,
264267
B54D7A5224EC472500934506 /* MagicalRecord.swift in Sources */,
265268
B54D7A5A24EC47F900934506 /* TRON.swift in Sources */,
269+
1FBFEBAD2562E83E008FCA7D /* EnvironmentCheck.swift in Sources */,
266270
B54D7A4E24EC45CC00934506 /* SwiftyJSON.swift in Sources */,
267271
B54D7A5C24EC481D00934506 /* DTCollectionViewManager.swift in Sources */,
268272
B54D7A4224EC43C300934506 /* Moya.swift in Sources */,

0 commit comments

Comments
 (0)