Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move CommonCrypto and zlib dependencies mapping to custom module map #559

Merged
merged 4 commits into from
Oct 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions Package.resolved

This file was deleted.

5 changes: 1 addition & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ let package = Package(
products: [
turbulem marked this conversation as resolved.
Show resolved Hide resolved
.library(name: "Starscream", targets: ["Starscream"])
],
dependencies: [
.package(url: "https://github.com/daltoniam/zlib-spm.git", from: "1.1.0"),
.package(url: "https://github.com/daltoniam/common-crypto-spm", from: "1.1.0")
],
dependencies: [],
targets: [
.target(name: "Starscream")
]
Expand Down
2 changes: 1 addition & 1 deletion Sources/Starscream/Compression.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
//////////////////////////////////////////////////////////////////////////////////////////////////

import Foundation
import SSCZLib
import zlib

class Decompressor {
private var strm = z_stream()
Expand Down
2 changes: 1 addition & 1 deletion Sources/Starscream/WebSocket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import Foundation
import CoreFoundation
import SSCommonCrypto
import CommonCrypto

public let WebsocketDidConnectNotification = "WebsocketDidConnectNotification"
public let WebsocketDidDisconnectNotification = "WebsocketDidDisconnectNotification"
Expand Down
7 changes: 2 additions & 5 deletions Starscream.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ Pod::Spec.new do |s|
s.osx.deployment_target = '10.10'
s.tvos.deployment_target = '9.0'
s.watchos.deployment_target = '2.0'
s.source_files = 'Sources/*.swift'
s.libraries = 'z'
s.source_files = 'Sources/**/*.swift'
s.pod_target_xcconfig = {
'SWIFT_VERSION' => '4.1',
'SWIFT_INCLUDE_PATHS' => '$(PODS_ROOT)/Starscream/zlib'
'SWIFT_VERSION' => '4.1'
}
s.preserve_paths = 'zlib/*'
end
73 changes: 31 additions & 42 deletions Starscream.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,36 @@
335FA1FC1F5DF71D00F6D2EC /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D88EAF811ED4DFD3004FE2C3 /* libz.tbd */; };
33CCF08A1F5DDC030099B092 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D88EAF811ED4DFD3004FE2C3 /* libz.tbd */; };
33CCF08C1F5DDC030099B092 /* Starscream.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1360001C473BEF00AA3A01 /* Starscream.h */; settings = {ATTRIBUTES = (Public, ); }; };
33CCF08D1F5DDC030099B092 /* include.h in Headers */ = {isa = PBXBuildFile; fileRef = D85927D71ED76F25003460CB /* include.h */; };
742D12982157CF56006026D7 /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33CCF0921F5DDC030099B092 /* Starscream.framework */; };
DD52B623663980FECD3F6690 /* Compression.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD52B83305DE12CC7F8887D6 /* Compression.swift */; };
DD52B7C033385CD7CF246CC5 /* WebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD52B820CB852287AC065D9C /* WebSocket.swift */; };
DD52BC079AD583D2DA35D7E7 /* SSLClientCertificate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD52B329FF434097A6C8F66E /* SSLClientCertificate.swift */; };
DD52BED25D3DBBB3BC28471B /* SSLSecurity.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD52B3F585852EF29B21F0DB /* SSLSecurity.swift */; };
BBB5ABE5215E2217005B48B6 /* Compression.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE1215E2217005B48B6 /* Compression.swift */; };
BBB5ABE6215E2217005B48B6 /* SSLClientCertificate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE2215E2217005B48B6 /* SSLClientCertificate.swift */; };
BBB5ABE7215E2217005B48B6 /* SSLSecurity.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE3215E2217005B48B6 /* SSLSecurity.swift */; };
BBB5ABE8215E2217005B48B6 /* WebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE4215E2217005B48B6 /* WebSocket.swift */; };
BBB5ABE9215E221D005B48B6 /* Compression.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE1215E2217005B48B6 /* Compression.swift */; };
BBB5ABEA215E221D005B48B6 /* SSLClientCertificate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE2215E2217005B48B6 /* SSLClientCertificate.swift */; };
BBB5ABEB215E221D005B48B6 /* SSLSecurity.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE3215E2217005B48B6 /* SSLSecurity.swift */; };
BBB5ABEC215E221D005B48B6 /* WebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE4215E2217005B48B6 /* WebSocket.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
335FA2021F5DF71D00F6D2EC /* Starscream Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Starscream Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
33CCF0921F5DDC030099B092 /* Starscream.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Starscream.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5C1360001C473BEF00AA3A01 /* Starscream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Starscream.h; path = Sources/Starscream.h; sourceTree = SOURCE_ROOT; };
5C13600C1C473BFE00AA3A01 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Sources/Info.plist; sourceTree = SOURCE_ROOT; };
5CAAB5D01F7987D800F3C556 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = Platforms/WatchOS.platform/Developer/SDKs/WatchOS4.0.sdk/usr/lib/libz.tbd; sourceTree = DEVELOPER_DIR; };
6B3E7A0019D48C2F006071F7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
742419BB1DC6BDBA003ACE43 /* StarscreamTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = StarscreamTests.swift; path = StarscreamTests/StarscreamTests.swift; sourceTree = "<group>"; };
D85927D61ED761A0003460CB /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = "<group>"; };
D85927D71ED76F25003460CB /* include.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = include.h; sourceTree = "<group>"; };
BBB5ABE1215E2217005B48B6 /* Compression.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Compression.swift; path = Starscream/Compression.swift; sourceTree = "<group>"; };
BBB5ABE2215E2217005B48B6 /* SSLClientCertificate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SSLClientCertificate.swift; path = Starscream/SSLClientCertificate.swift; sourceTree = "<group>"; };
BBB5ABE3215E2217005B48B6 /* SSLSecurity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SSLSecurity.swift; path = Starscream/SSLSecurity.swift; sourceTree = "<group>"; };
BBB5ABE4215E2217005B48B6 /* WebSocket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WebSocket.swift; path = Starscream/WebSocket.swift; sourceTree = "<group>"; };
D88EAF811ED4DFD3004FE2C3 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
D88EAF831ED4E7D8004FE2C3 /* CompressionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CompressionTests.swift; sourceTree = "<group>"; };
D88EAF8D1ED4E92E004FE2C3 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib/libz.tbd; sourceTree = DEVELOPER_DIR; };
D88EAF901ED4E949004FE2C3 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS10.2.sdk/usr/lib/libz.tbd; sourceTree = DEVELOPER_DIR; };
DD52B329FF434097A6C8F66E /* SSLClientCertificate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SSLClientCertificate.swift; path = Starscream/SSLClientCertificate.swift; sourceTree = "<group>"; };
DD52B3F585852EF29B21F0DB /* SSLSecurity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SSLSecurity.swift; path = Starscream/SSLSecurity.swift; sourceTree = "<group>"; };
DD52B820CB852287AC065D9C /* WebSocket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WebSocket.swift; path = Starscream/WebSocket.swift; sourceTree = "<group>"; };
DD52B83305DE12CC7F8887D6 /* Compression.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Compression.swift; path = Starscream/Compression.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
335FA1FB1F5DF71D00F6D2EC /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
742D12982157CF56006026D7 /* Starscream.framework in Frameworks */,
335FA1FC1F5DF71D00F6D2EC /* libz.tbd in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -64,7 +60,6 @@
6B3E79DC19D48B7F006071F7 = {
isa = PBXGroup;
children = (
D85927D51ED761A0003460CB /* zlib */,
6B3E79E819D48B7F006071F7 /* Sources */,
6B3E79FF19D48C2F006071F7 /* Tests */,
6B3E79E719D48B7F006071F7 /* Products */,
Expand All @@ -84,12 +79,12 @@
6B3E79E819D48B7F006071F7 /* Sources */ = {
isa = PBXGroup;
children = (
BBB5ABE1215E2217005B48B6 /* Compression.swift */,
BBB5ABE2215E2217005B48B6 /* SSLClientCertificate.swift */,
BBB5ABE3215E2217005B48B6 /* SSLSecurity.swift */,
BBB5ABE4215E2217005B48B6 /* WebSocket.swift */,
5C1360001C473BEF00AA3A01 /* Starscream.h */,
6B3E79E919D48B7F006071F7 /* Supporting Files */,
DD52B820CB852287AC065D9C /* WebSocket.swift */,
DD52B329FF434097A6C8F66E /* SSLClientCertificate.swift */,
DD52B3F585852EF29B21F0DB /* SSLSecurity.swift */,
DD52B83305DE12CC7F8887D6 /* Compression.swift */,
);
path = Sources;
sourceTree = "<group>";
Expand All @@ -112,21 +107,9 @@
path = Tests;
sourceTree = "<group>";
};
D85927D51ED761A0003460CB /* zlib */ = {
isa = PBXGroup;
children = (
D85927D61ED761A0003460CB /* module.modulemap */,
D85927D71ED76F25003460CB /* include.h */,
);
path = zlib;
sourceTree = "<group>";
};
D88EAF801ED4DFD3004FE2C3 /* Frameworks */ = {
isa = PBXGroup;
children = (
5CAAB5D01F7987D800F3C556 /* libz.tbd */,
D88EAF901ED4E949004FE2C3 /* libz.tbd */,
D88EAF8D1ED4E92E004FE2C3 /* libz.tbd */,
D88EAF811ED4DFD3004FE2C3 /* libz.tbd */,
);
name = Frameworks;
Expand All @@ -140,7 +123,6 @@
buildActionMask = 2147483647;
files = (
33CCF08C1F5DDC030099B092 /* Starscream.h in Headers */,
33CCF08D1F5DDC030099B092 /* include.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -196,6 +178,9 @@
335FA1F41F5DF71D00F6D2EC = {
LastSwiftMigration = 0900;
};
33CCF0841F5DDC030099B092 = {
LastSwiftMigration = 0940;
};
};
};
buildConfigurationList = 6B3E79E019D48B7F006071F7 /* Build configuration list for PBXProject "Starscream" */;
Expand Down Expand Up @@ -238,19 +223,23 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BBB5ABEB215E221D005B48B6 /* SSLSecurity.swift in Sources */,
BBB5ABEC215E221D005B48B6 /* WebSocket.swift in Sources */,
BBB5ABE9215E221D005B48B6 /* Compression.swift in Sources */,
335FA1F91F5DF71D00F6D2EC /* CompressionTests.swift in Sources */,
335FA1FA1F5DF71D00F6D2EC /* StarscreamTests.swift in Sources */,
BBB5ABEA215E221D005B48B6 /* SSLClientCertificate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
33CCF0851F5DDC030099B092 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DD52B7C033385CD7CF246CC5 /* WebSocket.swift in Sources */,
DD52BC079AD583D2DA35D7E7 /* SSLClientCertificate.swift in Sources */,
DD52BED25D3DBBB3BC28471B /* SSLSecurity.swift in Sources */,
DD52B623663980FECD3F6690 /* Compression.swift in Sources */,
BBB5ABE5215E2217005B48B6 /* Compression.swift in Sources */,
BBB5ABE8215E2217005B48B6 /* WebSocket.swift in Sources */,
BBB5ABE7215E2217005B48B6 /* SSLSecurity.swift in Sources */,
BBB5ABE6215E2217005B48B6 /* SSLClientCertificate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -278,6 +267,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = "";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvos appletvsimulator macosx";
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
Expand All @@ -301,6 +291,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = "";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvos appletvsimulator macosx";
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
Expand All @@ -324,7 +315,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
OTHER_LDFLAGS = "";
OTHER_LDFLAGS = "-all_load";
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
Expand Down Expand Up @@ -357,7 +348,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
OTHER_LDFLAGS = "";
OTHER_LDFLAGS = "-all_load";
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
Expand Down Expand Up @@ -424,7 +415,6 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = "";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator watchsimulator watchos";
SWIFT_INCLUDE_PATHS = $SRCROOT/zlib;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2,3,4";
Expand Down Expand Up @@ -477,7 +467,6 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = "";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator watchsimulator watchos";
SWIFT_INCLUDE_PATHS = $SRCROOT/zlib;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2,3,4";
VALIDATE_PRODUCT = YES;
Expand Down
2 changes: 0 additions & 2 deletions zlib/include.h

This file was deleted.

9 changes: 0 additions & 9 deletions zlib/module.modulemap

This file was deleted.