Skip to content

Commit

Permalink
Add iOS example
Browse files Browse the repository at this point in the history
  • Loading branch information
danshevluk committed Nov 16, 2016
1 parent bb73e9a commit 752c9d8
Show file tree
Hide file tree
Showing 7 changed files with 429 additions and 1 deletion.
152 changes: 151 additions & 1 deletion SwiftSocket.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
3723139A1DCF84EC0042DA87 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 372313981DCF84EC0042DA87 /* Result.swift */; };
3723139B1DCF84EC0042DA87 /* Socket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 372313991DCF84EC0042DA87 /* Socket.swift */; };
3723139C1DCF85270042DA87 /* SwiftSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 3723138D1DCF84CA0042DA87 /* SwiftSocket.h */; settings = {ATTRIBUTES = (Public, ); }; };
375C48301DDC4C56008C701D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 375C482F1DDC4C56008C701D /* AppDelegate.swift */; };
375C48321DDC4C56008C701D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 375C48311DDC4C56008C701D /* ViewController.swift */; };
375C48351DDC4C56008C701D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 375C48331DDC4C56008C701D /* Main.storyboard */; };
375C48371DDC4C56008C701D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 375C48361DDC4C56008C701D /* Assets.xcassets */; };
375C483A1DDC4C56008C701D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 375C48381DDC4C56008C701D /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -27,11 +32,25 @@
372313951DCF84E30042DA87 /* ytcpsocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ytcpsocket.c; path = Sources/ytcpsocket.c; sourceTree = SOURCE_ROOT; };
372313981DCF84EC0042DA87 /* Result.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Sources/Result.swift; sourceTree = SOURCE_ROOT; };
372313991DCF84EC0042DA87 /* Socket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Socket.swift; path = Sources/Socket.swift; sourceTree = SOURCE_ROOT; };
375C482D1DDC4C56008C701D /* iOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
375C482F1DDC4C56008C701D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
375C48311DDC4C56008C701D /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
375C48341DDC4C56008C701D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
375C48361DDC4C56008C701D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
375C48391DDC4C56008C701D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
375C483B1DDC4C56008C701D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
377DAA691DCDE40200009697 /* SwiftSocket.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftSocket.framework; sourceTree = BUILT_PRODUCTS_DIR; };
377DAA761DCDE45D00009697 /* SwiftSocket.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftSocket.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
375C482A1DDC4C56008C701D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
377DAA651DCDE40200009697 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -67,6 +86,19 @@
name = UDPSocket;
sourceTree = "<group>";
};
375C482E1DDC4C56008C701D /* iOS Example */ = {
isa = PBXGroup;
children = (
375C482F1DDC4C56008C701D /* AppDelegate.swift */,
375C48311DDC4C56008C701D /* ViewController.swift */,
375C48331DDC4C56008C701D /* Main.storyboard */,
375C48361DDC4C56008C701D /* Assets.xcassets */,
375C48381DDC4C56008C701D /* LaunchScreen.storyboard */,
375C483B1DDC4C56008C701D /* Info.plist */,
);
path = "iOS Example";
sourceTree = "<group>";
};
377DAA6A1DCDE40200009697 /* Supporting Files */ = {
isa = PBXGroup;
children = (
Expand All @@ -81,6 +113,7 @@
isa = PBXGroup;
children = (
5518C83119A329100049DC22 /* Source */,
375C482E1DDC4C56008C701D /* iOS Example */,
5518C83019A329100049DC22 /* Products */,
);
sourceTree = "<group>";
Expand All @@ -90,6 +123,7 @@
children = (
377DAA691DCDE40200009697 /* SwiftSocket.framework */,
377DAA761DCDE45D00009697 /* SwiftSocket.framework */,
375C482D1DDC4C56008C701D /* iOS Example.app */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -129,6 +163,23 @@
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
375C482C1DDC4C56008C701D /* iOS Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = 375C483E1DDC4C56008C701D /* Build configuration list for PBXNativeTarget "iOS Example" */;
buildPhases = (
375C48291DDC4C56008C701D /* Sources */,
375C482A1DDC4C56008C701D /* Frameworks */,
375C482B1DDC4C56008C701D /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "iOS Example";
productName = "iOS Example";
productReference = 375C482D1DDC4C56008C701D /* iOS Example.app */;
productType = "com.apple.product-type.application";
};
377DAA681DCDE40200009697 /* SwiftSocket iOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 377DAA6E1DCDE40200009697 /* Build configuration list for PBXNativeTarget "SwiftSocket iOS" */;
Expand Down Expand Up @@ -172,10 +223,14 @@
isa = PBXProject;
attributes = {
LastSwiftMigration = 0710;
LastSwiftUpdateCheck = 0710;
LastSwiftUpdateCheck = 0810;
LastUpgradeCheck = 0710;
ORGANIZATIONNAME = swift;
TargetAttributes = {
375C482C1DDC4C56008C701D = {
CreatedOnToolsVersion = 8.1;
ProvisioningStyle = Automatic;
};
377DAA681DCDE40200009697 = {
CreatedOnToolsVersion = 8.1;
LastSwiftMigration = 0810;
Expand All @@ -193,6 +248,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 5518C82619A3290F0049DC22;
productRefGroup = 5518C83019A329100049DC22 /* Products */;
Expand All @@ -201,11 +257,22 @@
targets = (
377DAA681DCDE40200009697 /* SwiftSocket iOS */,
377DAA751DCDE45D00009697 /* SwiftSocket macOS */,
375C482C1DDC4C56008C701D /* iOS Example */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
375C482B1DDC4C56008C701D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
375C483A1DDC4C56008C701D /* LaunchScreen.storyboard in Resources */,
375C48371DDC4C56008C701D /* Assets.xcassets in Resources */,
375C48351DDC4C56008C701D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
377DAA671DCDE40200009697 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -224,6 +291,15 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
375C48291DDC4C56008C701D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
375C48321DDC4C56008C701D /* ViewController.swift in Sources */,
375C48301DDC4C56008C701D /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
377DAA641DCDE40200009697 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -246,7 +322,73 @@
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
375C48331DDC4C56008C701D /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
375C48341DDC4C56008C701D /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
375C48381DDC4C56008C701D /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
375C48391DDC4C56008C701D /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
375C483C1DDC4C56008C701D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "iOS Example/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.danshevluk.iOS-Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
375C483D1DDC4C56008C701D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "iOS Example/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.danshevluk.iOS-Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
377DAA6F1DCDE40200009697 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -465,6 +607,14 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
375C483E1DDC4C56008C701D /* Build configuration list for PBXNativeTarget "iOS Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
375C483C1DDC4C56008C701D /* Debug */,
375C483D1DDC4C56008C701D /* Release */,
);
defaultConfigurationIsVisible = 0;
};
377DAA6E1DCDE40200009697 /* Build configuration list for PBXNativeTarget "SwiftSocket iOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
Expand Down
22 changes: 22 additions & 0 deletions iOS Example/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// AppDelegate.swift
// iOS Example
//
// Created by Dan Shevlyuk on 11/16/16.
// Copyright © 2016 swift. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
return true
}

}

68 changes: 68 additions & 0 deletions iOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
27 changes: 27 additions & 0 deletions iOS Example/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
Loading

0 comments on commit 752c9d8

Please sign in to comment.