Compare commits

...

42 Commits

Author SHA1 Message Date
运筹
4a3af2cbba
Merge pull request #179 from odariusgeorge/patch-1
update swift version
2020-01-27 22:05:37 +08:00
运筹
24ee358a41
Merge branch 'master' into patch-1 2020-01-27 22:05:21 +08:00
运筹
8b09fa2e87
Merge pull request #186 from eschos24/swift_5
Update to Swift 5
2020-01-06 23:24:14 +08:00
Eric Schofield
55d85b7119 Fixed a spelling error in SwiftSocket.podspec 2019-11-29 19:06:27 -07:00
Eric Schofield
97d64be723 Use 'let' instead of 'var' to satisfy a warning 2019-11-29 19:05:36 -07:00
Eric Schofield
24cc9bf118 Updated to Swift 5 in podspec 2019-11-29 19:04:50 -07:00
odariusgeorge
fadd0e198d
update swift version
Xcode 10.2 - carthage - unsupported swift version (3.0 not supported anymore)
2019-08-20 15:21:42 +03:00
运筹
2e6ba27140
Merge pull request #169 from Thomas06000/master
Migrate to Swift 5
2019-07-24 21:18:32 +08:00
运筹
cb0af50dbb
Merge pull request #150 from keab42/bugfix/fix-sigpipe-13-error
Disabling SIGPIPE errors on UDP Client.
2019-07-24 21:15:26 +08:00
Thomas06000
e6c6c4d760
remove useless space 2019-04-24 11:50:57 +02:00
Thomas Auger
c1a7ac522a migrate to swift 5, update AppDelegate 2019-04-15 15:08:01 +02:00
Thomas Auger
8f7d7cb144 migrate to swift 5 2019-04-15 15:04:23 +02:00
Thomas Auger
e8bf27c467 migrate localization 2019-04-15 15:00:47 +02:00
May Keable
ee34b7a68d Disabling SIGPIPE errors on UDP Client. 2018-08-07 15:07:47 +01:00
运筹
7cd6d8e846
Merge pull request #137 from willson556/master
Add bytesAvailable() method.
2018-06-25 10:13:29 +08:00
运筹
ab16278795 Merge pull request #117 from varunpm1/master
Set Swift 3 Obj reference warning state to default to remove compiler…
2017-10-02 08:02:27 -05:00
Varun P M
31f6a91532 Set Swift 3 Obj reference warning state to default to remove compiler warning 2017-09-25 19:07:37 +05:30
运筹
f5dd443dba Merge pull request #114 from varunpm1/master
Updated project settings to Swift 4
2017-09-23 00:13:23 +08:00
运筹
fd274a888d Merge pull request #115 from jhihguan/fix-printf
remove print read data
2017-09-23 00:12:19 +08:00
Wane Wang
ecfe786014 remove print read data 2017-09-20 01:58:31 -05:00
Varun P M
0c5e36bee8 Updated project settings to Swift 4 2017-09-19 12:24:36 +05:30
Dan Shevlyuk
5682b6dd19 Release 2.0.2 2017-07-28 18:20:08 +03:00
运筹
73c625d1b6 Merge pull request #95 from tomthecarrot/master
Add C code include for Swift 4
2017-07-21 23:10:44 -05:00
运筹
c421fa4208 Merge pull request #96 from ivlevAstef/master
fix ytcpsocket_pull return value. Now it returns how much was transferred
2017-07-21 23:10:06 -05:00
Thomas Suarez
02eb90b188 Add C code include for Swift 4 2017-07-16 23:16:37 -07:00
Ivlev Alexander
cceb04abde fix ytcpsocket_pull return value. Now it returns how much was transferred. 2017-07-17 11:09:03 +07:00
运筹
3131c58dfd Merge pull request #81 from Larrycal/master
Use loop to make sure recevie all data
2017-06-05 13:56:09 +08:00
柳钰柯
e0a55fea0e set no delay 2017-05-08 15:59:10 +08:00
柳钰柯
bbd4f2ddfe Use loop to make sure receive all data by using read() 2017-05-08 15:53:17 +08:00
柳钰柯
fa1d5a6a2f use recv() to receive data instead of read() 2017-05-08 15:18:21 +08:00
运筹
46a9ea6746 Merge pull request #77 from drdator/master
Fix UDP server binding
2017-04-11 13:20:19 +08:00
Einar Andersson
8eadfcd0f0 Fix UDP server binding 2017-04-10 21:08:51 +02:00
Dan
bcc2f3037e Merge pull request #75 from schnippi/fix-appleTvTarget
Fix Apple Tv target Device family
2017-04-05 09:28:58 +03:00
Stefan M. Schneider
e488b284d3 Fix Apple Tv target Device family
TARGET_DEVICE_FAMILY for appleTV is 3 and not 1,2 (iPhone, iPad) This
change is needed to have the build of appleTV target against appleTV
simulator succeed. Without this change build of apple tv target fails
for Carthage appleTV simulator build
2017-04-04 21:41:46 +02:00
运筹
d706258d94 Merge pull request #72 from SolitaryCipher/master
Add optional timeout on TCPServer accept()
2017-03-23 14:46:40 +08:00
Nick
23a4b42d4c Add optional timeout on TCPServer accept() 2017-03-14 14:03:23 -04:00
运筹
8032a0fc99 Merge pull request #59 from HubertZhang/master
Add recv for UDP Client
2017-02-08 10:39:26 +08:00
Dan
a1eb0a5ac0 Merge pull request #64 from alxstu/patch-1
changed wrong variable names
2017-01-28 13:54:29 +03:00
alxstu
31aa522e9b changed wrong variable names
"c" has to be "client"
2017-01-28 00:35:54 +01:00
Hubertzhang
c3e897d571 improve code quality in UDPClient.recv 2017-01-17 17:54:53 +08:00
Hubert Zhang
7295b73f62 Add recv for UDP Client
Allow UDP Client receive response
2017-01-14 16:02:05 +08:00
Thomas Willson
8f5cd72575 Add method to get bytes available for reading. 2016-12-19 14:15:09 +00:00
12 changed files with 149 additions and 39 deletions

View File

@ -78,10 +78,10 @@ switch client.connect(timeout: 1) {
## Server socket example (echo server)
``` swift
func echoService(client: TCPClient) {
print("Newclient from:\(c.address)[\(c.port)]")
var d = c.read(1024*10)
c.send(data: d!)
c.close()
print("Newclient from:\(client.address)[\(client.port)]")
var d = client.read(1024*10)
client.send(data: d!)
client.close()
}
func testServer() {

View File

@ -32,14 +32,14 @@ import Foundation
@_silgen_name("ytcpsocket_connect") private func c_ytcpsocket_connect(_ host:UnsafePointer<Byte>,port:Int32,timeout:Int32) -> Int32
@_silgen_name("ytcpsocket_close") private func c_ytcpsocket_close(_ fd:Int32) -> Int32
@_silgen_name("ytcpsocket_bytes_available") private func c_ytcpsocket_bytes_available(_ fd:Int32) -> Int32
@_silgen_name("ytcpsocket_send") private func c_ytcpsocket_send(_ fd:Int32,buff:UnsafePointer<Byte>,len:Int32) -> Int32
@_silgen_name("ytcpsocket_pull") private func c_ytcpsocket_pull(_ fd:Int32,buff:UnsafePointer<Byte>,len:Int32,timeout:Int32) -> Int32
@_silgen_name("ytcpsocket_listen") private func c_ytcpsocket_listen(_ address:UnsafePointer<Int8>,port:Int32)->Int32
@_silgen_name("ytcpsocket_accept") private func c_ytcpsocket_accept(_ onsocketfd:Int32,ip:UnsafePointer<Int8>,port:UnsafePointer<Int32>) -> Int32
@_silgen_name("ytcpsocket_accept") private func c_ytcpsocket_accept(_ onsocketfd:Int32,ip:UnsafePointer<Int8>,port:UnsafePointer<Int32>,timeout:Int32) -> Int32
@_silgen_name("ytcpsocket_port") private func c_ytcpsocket_port(_ fd:Int32) -> Int32
open class TCPClient: Socket {
/*
* connect to server
* return success or fail with message
@ -62,7 +62,7 @@ open class TCPClient: Socket {
}
}
}
/*
* close socket
* return success or fail with message
@ -136,6 +136,21 @@ open class TCPClient: Socket {
return data
}
/*
* gets byte available for reading
*/
open func bytesAvailable() -> Int32? {
guard let fd:Int32 = self.fd else { return nil }
let bytesAvailable = c_ytcpsocket_bytes_available(fd);
if (bytesAvailable < 0) {
return nil
}
return bytesAvailable
}
}
open class TCPServer: Socket {
@ -161,12 +176,12 @@ open class TCPServer: Socket {
}
}
open func accept() -> TCPClient? {
open func accept(timeout :Int32 = 0) -> TCPClient? {
guard let serferfd = self.fd else { return nil }
var buff: [Int8] = [Int8](repeating: 0x0,count: 16)
var port: Int32 = 0
let clientfd: Int32 = c_ytcpsocket_accept(serferfd, ip: &buff, port: &port)
let clientfd: Int32 = c_ytcpsocket_accept(serferfd, ip: &buff, port: &port, timeout: timeout)
guard clientfd >= 0 else { return nil }
guard let address = String(cString: buff, encoding: String.Encoding.utf8) else { return nil }

View File

@ -111,6 +111,26 @@ open class UDPClient: Socket {
}
}
//TODO add multycast and boardcast
open func recv(_ expectlen: Int) -> ([Byte]?, String, Int) {
guard let fd = self.fd else {
return (nil, "no ip", 0)
}
let buff: [Byte] = [Byte](repeating: 0x0, count: expectlen)
var remoteipbuff: [Int8] = [Int8](repeating: 0x0, count: 16)
var remoteport: Int32 = 0
let readLen: Int32 = c_yudpsocket_recive(fd, buff: buff, len: Int32(expectlen), ip: &remoteipbuff, port: &remoteport)
let port: Int = Int(remoteport)
let address = String(cString: remoteipbuff, encoding: String.Encoding.utf8) ?? ""
if readLen <= 0 {
return (nil, address, port)
}
let data: [Byte] = Array(buff[0..<Int(readLen)])
return (data, address, port)
}
open func close() {
guard let fd = self.fd else { return }
@ -134,7 +154,7 @@ open class UDPServer: Socket {
//TODO add multycast and boardcast
open func recv(_ expectlen: Int) -> ([Byte]?, String, Int) {
if let fd = self.fd {
var buff: [Byte] = [Byte](repeating: 0x0,count: expectlen)
let buff: [Byte] = [Byte](repeating: 0x0,count: expectlen)
var remoteipbuff: [Int8] = [Int8](repeating: 0x0,count: 16)
var remoteport: Int32 = 0
let readLen: Int32 = c_yudpsocket_recive(fd, buff: buff, len: Int32(expectlen), ip: &remoteipbuff, port: &remoteport)

View File

@ -37,12 +37,14 @@
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <dirent.h>
#include <netdb.h>
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/select.h>
#include <sys/ioctl.h>
void ytcpsocket_set_block(int socket, int on) {
int flags;
@ -93,7 +95,6 @@ int ytcpsocket_connect(const char *host, int port, int timeout) {
return -4;//connect fail
}
ytcpsocket_set_block(sockfd, 1);
int set = 1;
setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&set, sizeof(int));
return sockfd;
@ -105,6 +106,8 @@ int ytcpsocket_close(int socketfd){
}
int ytcpsocket_pull(int socketfd, char *data, int len, int timeout_sec) {
int readlen = 0;
int datalen = 0;
if (timeout_sec > 0) {
fd_set fdset;
struct timeval timeout;
@ -117,8 +120,26 @@ int ytcpsocket_pull(int socketfd, char *data, int len, int timeout_sec) {
return ret; // select-call failed or timeout occurred (before anything was sent)
}
}
int readlen = (int)read(socketfd, data, len);
return readlen;
// use loop to make sure receive all data
do {
readlen = (int)read(socketfd, data + datalen, len - datalen);
if (readlen > 0) {
datalen += readlen;
}
} while (readlen > 0);
return datalen;
}
int ytcpsocket_bytes_available(int socketfd) {
int count;
int callResult = ioctl(socketfd, FIONREAD, &count);
if (callResult < 0) {
return callResult;
}
return count;
}
int ytcpsocket_send(int socketfd, const char *data, int len){
@ -159,15 +180,31 @@ int ytcpsocket_listen(const char *address, int port) {
}
//return client socket fd
int ytcpsocket_accept(int onsocketfd, char *remoteip, int *remoteport) {
int ytcpsocket_accept(int onsocketfd, char *remoteip, int *remoteport, int timeouts) {
socklen_t clilen;
struct sockaddr_in cli_addr;
clilen = sizeof(cli_addr);
fd_set fdset;
FD_ZERO(&fdset);
FD_SET(onsocketfd, &fdset);
struct timeval *timeptr = NULL;
struct timeval timeout;
if (timeouts > 0) {
timeout.tv_sec = timeouts;
timeout.tv_usec = 0;
timeptr = &timeout;
}
int status = select(FD_SETSIZE, &fdset, NULL, NULL, timeptr);
if (status != 1) {
return -1;
}
int newsockfd = accept(onsocketfd, (struct sockaddr *) &cli_addr, &clilen);
char *clientip=inet_ntoa(cli_addr.sin_addr);
memcpy(remoteip, clientip, strlen(clientip));
*remoteport = cli_addr.sin_port;
if (newsockfd > 0) {
int set = 1;
setsockopt(newsockfd, SOL_SOCKET, SO_NOSIGPIPE, (void*) &set, sizeof(int));
return newsockfd;
} else {
return -1;

View File

@ -48,6 +48,7 @@ int yudpsocket_server(const char *address, int port) {
//bind
struct sockaddr_in serv_addr;
memset( &serv_addr, '\0', sizeof(serv_addr));
serv_addr.sin_len = sizeof(struct sockaddr_in);
serv_addr.sin_family = AF_INET;
if (address == NULL || strlen(address) == 0 || strcmp(address, "255.255.255.255") == 0) {
@ -58,7 +59,6 @@ int yudpsocket_server(const char *address, int port) {
r = setsockopt(socketfd, SOL_SOCKET, SO_REUSEADDR, &reuseon, sizeof(reuseon));
serv_addr.sin_addr.s_addr = inet_addr(address);
serv_addr.sin_port = htons(port);
memset( &serv_addr, '\0', sizeof(serv_addr));
}
if (r == -1) {
@ -95,6 +95,10 @@ int yudpsocket_client() {
int socketfd = socket(AF_INET, SOCK_DGRAM, 0);
int reuseon = 1;
setsockopt(socketfd, SOL_SOCKET, SO_REUSEADDR, &reuseon, sizeof(reuseon));
//disable SIGPIPE as we'll handle send errors ourselves
int noSigPipe = 1;
setsockopt(socketfd, SOL_SOCKET, SO_NOSIGPIPE, &noSigPipe, sizeof(noSigPipe));
return socketfd;
}

View File

@ -1,11 +1,11 @@
Pod::Spec.new do |s|
s.name = 'SwiftSocket'
s.version = '2.0.1'
s.version = '2.0.2'
s.summary = 'A cool framework to work with TCP and UDP sockets'
s.description = <<-DESC
SwiftSocket profieds an easy way to create TCP or UDP clients and servers 💁
SwiftSocket provides an easy way to create TCP or UDP clients and servers 💁
DESC
s.homepage = 'https://github.com/swiftsocket/SwiftSocket'
@ -23,6 +23,6 @@ Pod::Spec.new do |s|
:tag => s.version
}
s.source_files = 'Sources/**/*.{swift,c}'
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '3' }
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '5' }
end

View File

@ -273,11 +273,12 @@
attributes = {
LastSwiftMigration = 0710;
LastSwiftUpdateCheck = 0810;
LastUpgradeCheck = 0710;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = swift;
TargetAttributes = {
37454EC91E06158200800AE5 = {
CreatedOnToolsVersion = 8.2;
LastSwiftMigration = 1020;
ProvisioningStyle = Manual;
};
375C482C1DDC4C56008C701D = {
@ -286,18 +287,19 @@
};
377DAA681DCDE40200009697 = {
CreatedOnToolsVersion = 8.1;
LastSwiftMigration = 0810;
LastSwiftMigration = 1020;
ProvisioningStyle = Manual;
};
377DAA751DCDE45D00009697 = {
CreatedOnToolsVersion = 8.1;
LastSwiftMigration = 1020;
ProvisioningStyle = Manual;
};
};
};
buildConfigurationList = 5518C82A19A3290F0049DC22 /* Build configuration list for PBXProject "SwiftSocket" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
@ -445,8 +447,8 @@
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
@ -477,8 +479,8 @@
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
@ -502,7 +504,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
@ -525,7 +527,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
@ -559,7 +561,7 @@
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
@ -593,7 +595,7 @@
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
@ -621,7 +623,7 @@
PRODUCT_NAME = SwiftSocket;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TVOS_DEPLOYMENT_TARGET = 9.0;
};
@ -647,7 +649,7 @@
PRODUCT_NAME = SwiftSocket;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TVOS_DEPLOYMENT_TARGET = 9.0;
VALIDATE_PRODUCT = YES;
@ -658,17 +660,28 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
@ -676,6 +689,7 @@
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@ -695,7 +709,7 @@
PRODUCT_NAME = "";
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
@ -703,23 +717,35 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
@ -731,7 +757,8 @@
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_NAME = "";
SDKROOT = macosx;
SWIFT_VERSION = 3.0;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 5.0;
};
name = Release;
};

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -12,9 +12,8 @@ import UIKit
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
return true
}