Skip to content

Commit

Permalink
Added SPM support
Browse files Browse the repository at this point in the history
  • Loading branch information
Itaybre committed Jun 6, 2023
1 parent c75cd68 commit 1b905a7
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -13,3 +13,4 @@
*.diff

xcuserdata
.swiftpm
25 changes: 25 additions & 0 deletions Package.swift
@@ -0,0 +1,25 @@
// swift-tools-version: 5.8
import PackageDescription

let package = Package(
name: "Peertalk",
products: [
.library(name: "Peertalk", targets: ["Peertalk"]),
],
targets: [
.target(
name: "Peertalk",
path: "peertalk",
exclude: [
"Info.plist",
"PTPrivate.h"
],
publicHeadersPath: "public"
),
.testTarget(
name: "PeertalkTests",
dependencies: ["Peertalk"],
path: "peertalk-tests"
)
]
)
1 change: 0 additions & 1 deletion peertalk-tests/PTProtocolTests.h
@@ -1,7 +1,6 @@
#import <XCTest/XCTest.h>
#include <dispatch/dispatch.h>
#import "PTProtocol.h"
#import "PTPrivate.h"

@interface PTProtocolTests : XCTestCase {
dispatch_fd_t socket_[2];
Expand Down
21 changes: 14 additions & 7 deletions peertalk.xcodeproj/project.pbxproj
Expand Up @@ -291,14 +291,10 @@
6A88FA39150D613800FC3647 /* peertalk */ = {
isa = PBXGroup;
children = (
EE158A7C1CBD402600A3E3F0 /* Peertalk.h */,
AB1C5CA8257B96E200F41941 /* PTDefines.h */,
F49161CF2A2FAD69004A7415 /* public */,
5E2C5023171F46A6008A9752 /* PTPrivate.h */,
6ACFD2D4151D36220081ACF5 /* PTChannel.h */,
6ACFD2D5151D36220081ACF5 /* PTChannel.m */,
6A88FA5C150D61DE00FC3647 /* PTProtocol.h */,
6A88FA5D150D61DE00FC3647 /* PTProtocol.m */,
6A88FA5E150D61DE00FC3647 /* PTUSBHub.h */,
6A88FA5F150D61DE00FC3647 /* PTUSBHub.m */,
AB6C99A9257BB91300D5624E /* Info.plist */,
);
Expand Down Expand Up @@ -347,6 +343,18 @@
name = Frameworks;
sourceTree = "<group>";
};
F49161CF2A2FAD69004A7415 /* public */ = {
isa = PBXGroup;
children = (
EE158A7C1CBD402600A3E3F0 /* Peertalk.h */,
AB1C5CA8257B96E200F41941 /* PTDefines.h */,
6ACFD2D4151D36220081ACF5 /* PTChannel.h */,
6A88FA5C150D61DE00FC3647 /* PTProtocol.h */,
6A88FA5E150D61DE00FC3647 /* PTUSBHub.h */,
);
path = public;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand Down Expand Up @@ -511,10 +519,9 @@
};
buildConfigurationList = 6A88FA2A150D613800FC3647 /* Build configuration list for PBXProject "peertalk" */;
compatibilityVersion = "Xcode 12.0";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down
2 changes: 1 addition & 1 deletion peertalk/PTUSBHub.m
@@ -1,4 +1,4 @@
#import "PTUSBHub.h"
#import "public/PTUSBHub.h"
#import "PTPrivate.h"

#include <netinet/in.h>
Expand Down
6 changes: 3 additions & 3 deletions peertalk/PTChannel.h → peertalk/public/PTChannel.h
Expand Up @@ -7,9 +7,9 @@
#import <netinet/in.h>
#import <sys/socket.h>

#import <peertalk/PTProtocol.h>
#import <peertalk/PTUSBHub.h>
#import <peertalk/PTDefines.h>
#import "PTProtocol.h"
#import "PTUSBHub.h"
#import "PTDefines.h"

@class PTAddress;
@protocol PTChannelDelegate;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions peertalk/Peertalk.h → peertalk/public/Peertalk.h
Expand Up @@ -6,7 +6,7 @@ FOUNDATION_EXPORT double PeertalkVersionNumber;
//! Project version string for Peertalk.
FOUNDATION_EXPORT const unsigned char PeertalkVersionString[];

#import <peertalk/PTChannel.h>
#import <peertalk/PTDefines.h>
#import <peertalk/PTProtocol.h>
#import <peertalk/PTUSBHub.h>
#import "PTChannel.h"
#import "PTDefines.h"
#import "PTProtocol.h"
#import "PTUSBHub.h"

0 comments on commit 1b905a7

Please sign in to comment.