-
Install Swift development toolchain: https://swift.org/getting-started/#installing-swift
-
Check install successful by running
swift --version
-
Check Package Manager install
swift build --version
-
Create Command-Line Project
-
Put project aside for now
-
In terminal, cd to project directory
-
Create
Source/
folder and create amain.swift
file -
main.swift
is a ruse to get the package manager to build, put onlyprint("Build Successful")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xcrun simctl erase all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension SequenceType { | |
func ip_splitFilter(@noescape predicate: Generator.Element throws -> Bool) rethrows -> (passed: [Generator.Element], failed: [Generator.Element]) { | |
var passed: [Generator.Element] = [] | |
var failed: [Generator.Element] = [] | |
try forEach { element in | |
if try predicate(element) { | |
passed.append(element) | |
} else { | |
failed.append(element) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Make a great app | |
- Create something unique | |
- Exciting features | |
- Focus on target market | |
- Engaging living room experience | |
- Intuitive use of siri remote | |
- Fantastic for first-time users | |
- Performance matters | |
- Designed for AppleTV | |
- Understand the process of Apple editors |
1: sign up and setup heroku. Create Heroku app etc.
** EVERYTHING PAST HERE ASSUMES CD IN REPOSITORY **
2: Set build packs: heroku buildpacks:set https://github.com/kylef/heroku-buildpack-swift.git
3: Start Heroku: heroku ps:scale web=1
4: Procfile: web: <#NameOfPackage#> --port=$PORT
GOTCHAS
Move directory to directory on root
scp -r ~/Dropbox/Programming/xCode/swift-chat-server [email protected]:~/
copy recursively from to
List processes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from swiftdocker/swift | |
ENV DEBIAN_FRONTEND=noninteractive | |
run apt-get update; apt-get install -y libssl-dev | |
run mkdir /deps | |
workdir /deps | |
env zewo_version=0.2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd $BUILD_DIR | |
echo "-----> Running Prebuild.2" | |
if [ -f "./prebuild" ]; | |
then | |
sh ./prebuild | |
else | |
echo "File does not exist." | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
This class is used to keep a subscription to an event active. | |
Set all references to `nil` to no longer receive events | |
*/ | |
public final class Subscription { | |
/** | |
Completiont to run on deinit. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env swift | |
#if os(OSX) | |
import Darwin | |
#else | |
import Glibc | |
#endif | |
import Foundation |