Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Fly to Yosemite with Swift

Yan Li
June 30, 2014
46

Fly to Yosemite with Swift

- Subjective-Swift
- What's new in Yosemite
- The iOS Men an the Yosemite

Yan Li

June 30, 2014
Tweet

Transcript

  1. var codeCompletion = Xcode(version: 6).beta4.codeCompletion codeCompletion == ! // true

    libclang => SourceKit (XPC Service) - Syntax Highlighting - Interface Generation - AST Parsing Uncovering SourceKit www.jpsim.com/uncovering-sourcekit/
  2. Xcode 6 Beta 3: All APIs deprecated in iOS 7

    or earlier and OS X 10.9 or earlier are now unavailable to use in Swift. Xcode 6 Beta 4: Setting an earlier deployment target results in a build failure. Mavericks Yosemite iOS 8 iOS 7
  3. ;; Lisp (foo (bar (baz (qux (+ 1 1))))) //

    After you visit fuckingblocksyntax.com ... // Objective-C with Block [obj foo:^{[obj bar:^{[obj baz:^{[obj qux:^int(void){return 1 + 1;}];}];}];}]; // After you read that 600 page iBook ... // Swift with Trailing Closures obj.foo{obj.bar{obj.baz{obj.qux { () -> Int inreturn 1 + 1}}}} // After you visit fuckingclosuresyntax.com ... // Swift obj.foo({obj.bar({obj.baz({obj.qux({ () -> Int inreturn 1 + 1})})})}) A trailing closure is a closure expression that is written outside of (and after) the parentheses of the function. If a closure expression is provided as the function’s only argument and you provide that expression as a trailing closure, you do not need to write a pair of parentheses () after the function’s name when you call the function.
  4. The last page of a stolen Russian Missile Interceptor Program

    (written in Lisp): Пролетарии всех стран, соединяйтесь! )))))))))))))))))))))))))))))))))))))))))) )))))))))))))))))))))))))))))))))))))))))) )))))))))))))))))))))))))))))))))))))))))) )))))))))))))))))))))))))))))))))))))))))) )))))))))))))))))))))))))))))))))))))))))) )))))))))))))))))))))))))))))))))))))))))) )))))))))))))))))))))))))))))))))))))))))) ))))
  5. Designed by Apple in California  }];}];}];}];}];}];}];}];}];}];}];}];}];}]; }];}];}];}];}];}];}];}];}];}];}];}];}];}]; }];}];}];}];}];}];}];}];}];}];}];}];}];}]; }];}];}];}];}];}];}];}];}];}];}];}];}];}];

    }];}];}];}];}];}];}];}];}];}];}];}];}];}]; }];}];}];}];}];}];}];}];}];}];}];}];}];}]; }];}];}];}];}];}];}];}];}];}];}];}];}];}]; }];}]; The last page of a stolen Apple Super Secret Program (written in Objective-C with Blocks):
  6. Objective-C...we have a problem - C function callback, e.g. CoreAudio,

    FSEventStream, CFNetwork - #pragma mark - Solved in Beta 4: Landmarks - //MARK:, //TODO: and //FIXME - public/private - Solved in Beta 4: private/internal/public - public: can be accessed from anywhere that imports the current target - internal: can be accessed from anywhere in the target - private: can be accessed from within current source file - @objc: if you want to use performSelector: to private method - Static Library
  7. Beta 3: - String[] => [String] - Dictionary<Key, Value> =>

    [Key:Value] - 1..10 => 1..<10 Beta 4: - @IBOutlet must be optional type - By default, most entities in a source file have internal access. # Almost every project written in Beta 1 has build error. # Swift is a moving target
  8. - Similar to Swift - Swift: An Objective-C without message

    - Rubymotion: A Ruby implementation in Objective-C runtime - One lang to rule them all - iOS/OS X - Android (coming in RubyMotion 3.0)
  9. - Introduction to Swift - Intermediate Swift - Advanced Swift

    - Integrating Swift with Objective-C - Swift Interoperability In Depth - Swift Playgrounds - Introduction to LLDB and the Swift REPL - Advanced Swift Debugging in LLDB WWDC14 Related Sessions
  10. It was used by the Miwok tribes when they were

    referring to tribes led by Chief Tenaya. Yosemite: those who kill - Yohhe'meti (Southern Miwok) - Yos.s.e'meti (Central Miwok) - Yos: "to kill" - the modifier e: "one who" - the plural suffix -meti Origin of the word "Yosemite"
  11. Xcode Playground - "Playgrounds were heavily influenced by Bret Victor's

    ideas, by Light Table and by many other interactive systems." by Chris Lattner - Bred Victor: Inventing on Principle - Light Table - seeing_is_believing for Ruby
  12. Features - App Extensions - Share - Action - Today

    - Finder Sync - Continuity - Handoff - Make/Receive phone calls from Mac using iPhone - Instant Hopspot - iCound Drive and CloudKit
  13. New in APIs - AppKit.framework - NSControl: New Look and

    Feel - NSStoryboard - NSViewController - NSVisualEffectView - NSGestureRecognizer - Foundation.framwork - NSString Encoding Detection - Formatters - NSDateIntervalFormatter - NSDateComponentsFormatter - NSMassFormatter - NSLengthFormatter - NSEnergyFormatter
  14. - MultipeerConnectivity.framework - Poorman's Bonjour with Bluetooth - iOS 7/8,

    OS X 10.10 - iOS device models with lightening connector - OS X device models shipped in 2012 or later - AVFoundation.framework - Poorman's CoreAudio - AVAudioPCMBuffer - AVAudioUnitEQ New in APIs
  15. WWDC14 Related Sessions - What's New in Cocoa - Adapting

    Your App to the New UI of OS X Yosemite - Adopting Advanced Features of the New UI of OS X Yosemite - Storyboards and Controllers on OS X - Adopting Handoff on iOS and OS X - Cross Platform Nearby Networking - Creating Extensions for iOS and OS X, Part 1/Part 2
  16. - NSViewController - View Life Cycle Methods - Storyboard -

    NSGestureRecognizer - Cell-based views are deprecated - NSView with CALayer Things you are used to on iOS
  17. - XPC - Out of Sandbox - Continuity = OS

    X + iOS - The full powser of Mac Things you can't do on iOS