Skip to content

Commit

Permalink
support spm
Browse files Browse the repository at this point in the history
  • Loading branch information
CynetSecurity committed Feb 6, 2024
1 parent fa0ca2c commit 192cf89
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ DerivedData
extern/

*.pyc
.build
41 changes: 41 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// swift-tools-version:5.3
import PackageDescription

let package = Package(
name: "SocketRocket",
platforms: [
.iOS(.v11),
.macOS(.v10_13),
.tvOS(.v11)
],
products: [
.library(
name: "SocketRocket",
targets: ["SocketRocket"]),
],
targets: [
.target(
name: "SocketRocket",
path: "SocketRocket",
exclude: ["Resources"], // Исключите ненужные файлы или директории
sources: [".", "Internal"], // Указание исходных файлов
publicHeadersPath: "include", // Все публичные заголовки должны быть перемещены в 'include'
cSettings: [
.headerSearchPath("."),
.headerSearchPath("Internal"),
.headerSearchPath("Internal/Delegate"),
.headerSearchPath("Internal/IOConsumer"),
.headerSearchPath("Internal/Proxy"),
.headerSearchPath("Internal/RunLoop"),
.headerSearchPath("Internal/Security"),
.headerSearchPath("Internal/Utilities")
],
linkerSettings: [
.linkedFramework("CFNetwork", .when(platforms: [.iOS, .tvOS])),
.linkedFramework("Security"),
.linkedFramework("CoreServices", .when(platforms: [.macOS])),
.linkedLibrary("icucore")
]
)
]
)
3 changes: 2 additions & 1 deletion SocketRocket/Internal/Delegate/SRDelegateController.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

#import <Foundation/Foundation.h>

#import <SocketRocket/SRWebSocket.h>
// #import <SocketRocket/SRWebSocket.h>
#import "SRWebSocket.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
4 changes: 2 additions & 2 deletions SocketRocket/Internal/NSRunLoop+SRWebSocketPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// of patent rights can be found in the PATENTS file in the same directory.
//

#import <SocketRocket/NSRunLoop+SRWebSocket.h>

// #import <SocketRocket/NSRunLoop+SRWebSocket.h>
#import "NSRunLoop+SRWebSocket.h"
// Empty function that force links the object file for the category.
extern void import_NSRunLoop_SRWebSocket(void);
4 changes: 2 additions & 2 deletions SocketRocket/Internal/NSURLRequest+SRWebSocketPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// of patent rights can be found in the PATENTS file in the same directory.
//

#import <SocketRocket/NSURLRequest+SRWebSocket.h>

// #import <SocketRocket/NSURLRequest+SRWebSocket.h>
#import "NSURLRequest+SRWebSocket.h"
// Empty function that force links the object file for the category.
extern void import_NSURLRequest_SRWebSocket(void);
3 changes: 2 additions & 1 deletion SocketRocket/Internal/Security/SRPinningSecurityPolicy.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

#import <Foundation/Foundation.h>

#import <SocketRocket/SRSecurityPolicy.h>
// #import <SocketRocket/SRSecurityPolicy.h>
#import "SRSecurityPolicy.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
3 changes: 2 additions & 1 deletion TestChat/TCViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

#import "TCViewController.h"

#import <SocketRocket/SocketRocket.h>
// #import <SocketRocket/SocketRocket.h>
#import "SocketRocket.h"

#import "TCChatCell.h"

Expand Down
3 changes: 2 additions & 1 deletion Tests/Operations/SRTWebSocketOperation.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
// of patent rights can be found in the PATENTS file in the same directory.
//

#import <SocketRocket/SRWebSocket.h>
// #import <SocketRocket/SRWebSocket.h>
#import "SRWebSocket.h"

@interface SRTWebSocketOperation : NSOperation <SRWebSocketDelegate>

Expand Down
3 changes: 2 additions & 1 deletion Tests/SRAutobahnTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
@import XCTest;
@import ObjectiveC;

#import <SocketRocket/SRWebSocket.h>
// #import <SocketRocket/SRWebSocket.h>
#import "SRWebSocket.h"

#import "SRTWebSocketOperation.h"
#import "SRAutobahnOperation.h"
Expand Down

0 comments on commit 192cf89

Please sign in to comment.