Skip to content
Open
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
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "SwiftSocket",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "SwiftSocket",
targets: ["SwiftSocket"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "SwiftSocket",
dependencies: ["SwiftSocketC"]),
.target(
name: "SwiftSocketC",
dependencies: []),
.testTarget(
name: "SwiftSocketTests",
dependencies: ["SwiftSocket"]),
]
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions Sources/SwiftSocketC/include/SwiftSocketC.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import Foundation;
File renamed without changes.
2 changes: 1 addition & 1 deletion Sources/yudpsocket.c → Sources/SwiftSocketC/yudpsocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int yudpsocket_close(int socket_fd) {
}

//return socket fd
int yudpsocket_client() {
int yudpsocket_client(void) {
//create socket
int socketfd = socket(AF_INET, SOCK_DGRAM, 0);
int reuseon = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.2.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Info.plist → Supporting Files/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.1</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
1 change: 1 addition & 0 deletions Sources/SwiftSocket.h → Supporting Files/SwiftSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ FOUNDATION_EXPORT double SwiftSocketVersionNumber;
FOUNDATION_EXPORT const unsigned char SwiftSocketVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <SwiftSocket_iOS/PublicHeader.h>
#import <SwiftSocketC.h>
9 changes: 5 additions & 4 deletions SwiftSocket.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# coding: utf-8
Pod::Spec.new do |s|

s.name = 'SwiftSocket'
s.version = '2.0.2'
s.version = '2.3.1'
s.summary = 'A cool framework to work with TCP and UDP sockets'

s.description = <<-DESC
Expand All @@ -15,14 +16,14 @@ Pod::Spec.new do |s|
s.author = { 'Dan Shevlyuk' => '[email protected]' }
s.social_media_url = 'http://twitter.com/danshevluk'

s.ios.deployment_target = '8.0'
s.ios.deployment_target = '13.0'
s.osx.deployment_target = '10.10'
s.tvos.deployment_target = '9.0'
s.source = {
:git => 'https://github.com/swiftsocket/SwiftSocket.git',
:git => 'git@github.com:charles-awayup/SwiftSocket.git',
:tag => s.version
}
s.source_files = 'Sources/**/*.{swift,c}'
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '5' }

s.swift_versions = "4.3.2"
end
246 changes: 139 additions & 107 deletions SwiftSocket.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1240"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -29,8 +29,6 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -51,8 +49,6 @@
ReferencedContainer = "container:SwiftSocket.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1240"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -29,8 +29,6 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -51,8 +49,6 @@
ReferencedContainer = "container:SwiftSocket.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1240"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -29,8 +29,6 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -51,8 +49,6 @@
ReferencedContainer = "container:SwiftSocket.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
7 changes: 7 additions & 0 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import XCTest

import SwiftSocketTests

var tests = [XCTestCaseEntry]()
tests += SwiftSocketTests.allTests()
XCTMain(tests)
15 changes: 15 additions & 0 deletions Tests/SwiftSocketTests/SwiftSocketTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import XCTest
@testable import SwiftSocket

final class SwiftSocketTests: XCTestCase {
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct
// results.
XCTAssertEqual(SwiftSocket().text, "Hello, World!")
}

static var allTests = [
("testExample", testExample),
]
}
9 changes: 9 additions & 0 deletions Tests/SwiftSocketTests/XCTestManifests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import XCTest

#if !canImport(ObjectiveC)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(SwiftSocketTests.allTests),
]
}
#endif
2 changes: 1 addition & 1 deletion iOS Example/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
Expand Down