Add the following to your ~/.bashrc:
alias g='git'
| # The trick is to link the DeviceSupport folder from the beta to the stable version. | |
| # sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
| # Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
| sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
| # Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
| # (A similar approach works for older versions too, just change the version number after DeviceSupport) |
When Swift was first announced, I was gratified to see that one of the (few) philosophies that it shared with Objective-C was that exceptions should not be used for control flow, only for highlighting fatal programming errors at development time.
So it came as a surprise to me when Swift 2 brought (What appeared to be) traditional exception handling to the language.
Similarly surprised were the functional Swift programmers, who had put their faith in the Haskell-style approach to error handling, where every function returns an enum (or monad, if you like) containing either a valid result or an error. This seemed like a natural fit for Swift, so why did Apple instead opt for a solution originally designed for clumsy imperative languages?
I'm going to cover three things in this post:
PS: If you liked this talk or like this concept, let's chat about iOS development at Stitch Fix! #shamelessplug
Speaker: David Abrahams. (Tech lead for Swift standard library)
"Crusty" is an old-school programmer who doesn't trust IDE's, debuggers, programming fads. He's cynical, grumpy.
OOP has been around since the 1970's. It's not actually new.
Classes are Awesome
| // meet Stringy - a simple string type with a fluent interface | |
| struct Stringy { | |
| let content: String | |
| init(_ content: String) { | |
| self.content = content | |
| } | |
| func append(appendage: Stringy) -> Stringy { |
| # This is not a ready-to-run script. It just shows the relevant command-line calls. | |
| XC_WORKSPACE=path/to/MyApp.xcworkspace | |
| XC_SCHEME=MyApp | |
| XC_CONFIG=Release | |
| ARCHIVE_PATH=dest/path/to/MyApp.xcarchive | |
| EXPORT_PATH=dest/path/to/MyApp.ipa | |
| DIST_PROFILE=NameOfDistributionProfile | |
| # Build and archive. This can be done by regular developers, using their developer key/profile. |
|
Variable |
Type |
| // Created by Ullrich Sch盲fer on 16/08/14. | |
| // Bitmasks are a bit tricky in swift | |
| // See http://natecook.com/blog/2014/07/swift-options-bitmask-generator/ | |
| //enum LogFlag: Int32 { | |
| // case Error = 0b1 | |
| // case Warn = 0b10 | |
| // case Info = 0b100 |
| // Playground - noun: a place where people can play | |
| import UIKit | |
| class ViewController: UIViewController ,UITableViewDelegate, UITableViewDataSource | |
| { | |
| var tableView: UITableView! | |
| var items: NSMutableArray! | |
| override func viewDidLoad() { | |
| super.viewDidLoad() |
Otworzy艂o si臋 ostatnio tyle nowych cowork贸w, 偶e nie nad膮偶am tego odwiedza膰 :) B臋d臋 si臋 stara艂 stopniowo aktualizowa膰 list臋, w mi臋dzyczasie polecam przegl膮dn膮膰 komentarze pod postem. (Nie chc臋 szczerze m贸wi膮c przenosi膰 tego do jakiego艣 bardziej zorganizowanego repozytorium, bo chc臋, 偶eby to pozosta艂o takim moim osobistym nieobiektywnym review tych cowork贸w - ci臋偶ko by艂oby uzgadnia膰, czy w danym miejscu jest g艂o艣no, albo czy jest fajna atmosfera... W razie w膮tpliwo艣ci, post jest dost臋pny na licencji WTFPL :)
Przydatne linki: