Skip to content
This repository has been archived by the owner on Jan 28, 2019. It is now read-only.

Commit

Permalink
OS flags
Browse files Browse the repository at this point in the history
  • Loading branch information
pvzig committed Feb 8, 2018
1 parent 4dc4ad0 commit 23376d5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions SKRTMAPI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
2604C59C202BFD83009CDBAF /* StarscreamRTM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2604C59B202BFD83009CDBAF /* StarscreamRTM.swift */; };
2604C59D202BFD83009CDBAF /* StarscreamRTM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2604C59B202BFD83009CDBAF /* StarscreamRTM.swift */; };
2604C59E202BFD83009CDBAF /* StarscreamRTM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2604C59B202BFD83009CDBAF /* StarscreamRTM.swift */; };
26D1C4CD1EE4653600C95954 /* SKCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26D1C4CA1EE4653600C95954 /* SKCore.framework */; };
26D1C4CE1EE4653600C95954 /* SKWebAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26D1C4CB1EE4653600C95954 /* SKWebAPI.framework */; };
26D1C4CF1EE4653600C95954 /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26D1C4CC1EE4653600C95954 /* Starscream.framework */; };
Expand All @@ -25,6 +28,7 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
2604C59B202BFD83009CDBAF /* StarscreamRTM.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StarscreamRTM.swift; sourceTree = "<group>"; };
2684F17D1E95AA6900536DCC /* SKRTMAPI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SKRTMAPI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2684F1E41E95ABD400536DCC /* SKRTMAPI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SKRTMAPI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2684F2081E95ABD600536DCC /* SKRTMAPI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SKRTMAPI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -150,6 +154,7 @@
26DC0EAF1E95BED900991BDF /* Conformers */ = {
isa = PBXGroup;
children = (
2604C59B202BFD83009CDBAF /* StarscreamRTM.swift */,
26DC0EB11E95BED900991BDF /* VaporEngineRTM.swift */,
D2C085F12024BF9600FEC5AB /* WebSocketFactory.swift */,
);
Expand Down Expand Up @@ -355,6 +360,7 @@
buildActionMask = 2147483647;
files = (
26DC0EB61E95BED900991BDF /* VaporEngineRTM.swift in Sources */,
2604C59C202BFD83009CDBAF /* StarscreamRTM.swift in Sources */,
26DC0EB91E95BED900991BDF /* SKRTMAPI.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -364,6 +370,7 @@
buildActionMask = 2147483647;
files = (
26DC0EB71E95BED900991BDF /* VaporEngineRTM.swift in Sources */,
2604C59D202BFD83009CDBAF /* StarscreamRTM.swift in Sources */,
26DC0EBA1E95BED900991BDF /* SKRTMAPI.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -373,6 +380,7 @@
buildActionMask = 2147483647;
files = (
26DC0EB81E95BED900991BDF /* VaporEngineRTM.swift in Sources */,
2604C59E202BFD83009CDBAF /* StarscreamRTM.swift in Sources */,
26DC0EBB1E95BED900991BDF /* SKRTMAPI.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
2 changes: 2 additions & 0 deletions Sources/SKRTMAPI/Conformers/VaporEngineRTM.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#if os(Linux)
import Dispatch
import Foundation
import SKCore
Expand Down Expand Up @@ -75,3 +76,4 @@ public class VaporEngineRTM: RTMWebSocket {
self.webSocket = webSocket
}
}
#endif
2 changes: 2 additions & 0 deletions Sources/SKRTMAPI/Conformers/WebSocketFactory.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if os(Linux)
import WebSockets
import HTTP
import Sockets
Expand Down Expand Up @@ -63,3 +64,4 @@ public final class WebSocketFactory {
)
}
}
#endif
6 changes: 5 additions & 1 deletion Sources/SKRTMAPI/SKRTMAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ public final class SKRTMAPI: RTMDelegate {
if let rtm = rtm {
self.rtm = rtm
} else {
self.rtm = VaporEngineRTM()
#if os(Linux)
self.rtm = VaporEngineRTM()
#else
self.rtm = StarscreamRTM()
#endif
}
self.rtm.delegate = self
}
Expand Down

0 comments on commit 23376d5

Please sign in to comment.