Optimizing Swift Performance Session 409

Size: px
Start display at page:

Download "Optimizing Swift Performance Session 409"

Transcription

1 Developer Tools #WWDC15 Optimizing Swift Performance Session 409 Nadav Rotem Manager, Swift Performance Team Michael Gottesman Engineer, Swift Performance Team Joe Grzywacz Engineer, Performance Tools 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

2 Agenda Swift 2.0 performance update Understanding Swift performance Using Instruments to analyze the performance of Swift programs

3 Swift is a Flexible, Safe Programming Language with ARC

4 Swift is a Flexible, Safe Programming Language with ARC Flexible function signature specializations global variable optimizations lock-less metadata caches generics specializations class hierarchy analysis closure optimizations SSA optimizations call graph analysis loop optimizations devirtualization function inliner Safe overflow checks removal bounds checks elimination obj-c bridge optimizations checked casting optimizations ARC ARC optimizer copy forwarding heap to stack code motion alias analysis reference counting analysis copy-on-write optimizations

5 Swift is a Flexible, Safe Programming Language with ARC Flexible function signature specializations global variable optimizations lock-less metadata caches generics specializations class hierarchy analysis closure optimizations SSA optimizations call graph analysis loop optimizations devirtualization function inliner Safe overflow checks removal bounds checks elimination obj-c bridge optimizations checked casting optimizations ARC ARC optimizer copy forwarding heap to stack code motion alias analysis reference counting analysis copy-on-write optimizations

6 Array Bounds Checks Optimizations Swift ensures that array access happen in bounds Swift can lift checks out of loops for i in 0..<n { A[i] ^= 13 O(n) checks become O(1)

7 Array Bounds Checks Optimizations Swift ensures that array access happen in bounds Swift can lift checks out of loops O(n) checks become O(1) for i in 0..<n { precondition (i < length) A[i] ^= 13

8 Array Bounds Checks Optimizations Swift ensures that array access happen in bounds precondition (n length) for i in 0..<n { Swift can lift checks out of loops O(n) checks become O(1) A[i] ^= 13

9 Swift is a Flexible, Safe Programming Language with ARC Flexible Safe ARC function signature specializations overflow checks removal ARC optimizer global variable optimizations bounds checks elimination copy forwarding lock-less metadata caches obj-c bridge optimizations heap to stack generics specializations checked casting optimizations code motion class hierarchy analysis closure optimizations SSA optimizations alias analysis reference counting analysis copy-on-write optimizations call graph analysis loop optimizations devirtualization function inliner

10 Performance Improvements Since 1.0 Optimized programs (higher is better) Richards 7.50 GenericStack 5.34 $.function 4.65 LinkedList 2.53 NSStringConvert x 2x 3x 4x 5x 6x 7x 8x

11 Performance Improvements Since 1.0 Unoptimized programs (higher is better) Richards 5.80 GenericStack 7.80 $.function 4.70 LinkedList 9.10 NSStringConvert x 2x 3x 4x 5x 6x 7x 8x

12 Swift vs. Objective-C Program speed (higher is better) 2.67 Swift Objective-C DeltaBlue Richards 1 1x 2x 3x 4x 5x 6x 7x 8x

13 Swift Compilation Xcode compiles files independently, in parallel Re-compile only files that need to be updated File1.swift File2.swift Optimizer is limited to scope of one file Compiler Compiler File1.o File2.o

14 Whole Module Optimizations Compilation is not limited to the scope of one file File1.swift File2.swift Analyzing the whole module allows better optimizations Whole Module Optimization greatly Compiler improved in Swift 2.0 Better optimizations Parallel code generation File.o

15 Performance Improvements Due to WMO Swift 2 vs Swift 2 + WMO (higher is better) FFT 4.70 NBody x 3x 4x 5x 6x 7x 8x

16 New Optimization Level Configurations

17 New Optimization Level Configurations

18 Writing High Performance Swift Code Michael Gottesman Engineer, Swift Performance Team

19 Overview Reference Counting Generics Dynamic Dispatch

20 Overview Reference Counting Generics Dynamic Dispatch

21 How Reference Counting Works

22 How Reference Counting Works class C {... func foo(c: C?) {... var x: C? = C() var y: C? = x foo(y) y = nil x = nil

23 How Reference Counting Works class C {... func foo(c: C?) {... var x: C? = C() var y: C? = x foo(y) X Class C 21 Boolean Float Double y = nil x = nil

24 How Reference Counting Works class C {... func foo(c: C?) {... var x: C? = C() var y: C? = x foo(y) X Y Class C 32 Boolean Float Double y = nil x = nil

25 How Reference Counting Works class C {... func foo(c: C?) {... var x: C? = C() var y: C? = x foo(y) X Y c Class C 3 Boolean Float Double y = nil x = nil

26 How Reference Counting Works class C {... func foo(c: C?) {... var x: C? = C() var y: C? = x foo(y) X Y Class C 32 Boolean Float Double y = nil x = nil

27 How Reference Counting Works class C {... func foo(c: C?) {... var x: C? = C() var y: C? = x foo(y) X Class C 21 Boolean Float Double y = nil x = nil

28 How Reference Counting Works class C {... func foo(c: C?) {... var x: C? = C() var y: C? = x foo(y) Class C 10 Boolean Float Double y = nil x = nil

29 How Reference Counting Works class C {... func foo(c: C?) {... var x: C? = C() var y: C? = x foo(y) y = nil x = nil

30 Classes That Do Not Contain References class Point { var x, y: Float

31 Classes That Do Not Contain References class Point { var x, y: Float Point Point Point Point Reference Reference Reference Reference Array

32 Classes That Do Not Contain References class Point { var x, y: Float Point Point Point Point var array: [Point] =... for p in array { Reference Reference Reference Reference... Array

33 Classes That Do Not Contain References class Point { var x, y: Float Point Point Point Point var array: [Point] =... for p in array { Reference Reference Reference Reference increment... Array

34 Classes That Do Not Contain References class Point { var x, y: Float Point Point Point Point var array: [Point] =... for p in array { Reference Reference Reference Reference increment... decrement Array

35 Structs That Do Not Contain References struct Point { var x, y: Float Point Point Point Point var array: [Point] =... for p in array { Reference Point Reference Point Reference Point Reference Point increment... decrement Array

36 Structs That Do Not Contain References struct Point { var x, y: Float var array: [Point] =... for p in array { Reference Point Reference Point Reference Point Reference Point increment... decrement Array

37 Structs That Do Not Contain References struct Point { var x, y: Float var array: [Point] =... for p in array { Point Point Point Point... Array All reference counting operations eliminated

38 Structs Containing a Reference

39 Structs Containing a Reference A Struct requires reference counting if its properties require reference counting

40 Structs Containing a Reference A Struct requires reference counting if its properties require reference counting Struct Point Float Float

41 Structs Containing a Reference A Struct requires reference counting if its properties require reference counting Struct Point Float Float UIColor

42 Structs Containing a Reference A Struct requires reference counting if its properties require reference counting Struct Point Float Float UIColor Class 1

43 Structs Containing a Reference A Struct requires reference counting if its properties require reference counting Struct Point Float Float UIColor Struct Point Float Float UIColor Class 1

44 Structs Containing a Reference A Struct requires reference counting if its properties require reference counting Struct Point Float Float UIColor Struct Point Float Float UIColor Class 12

45 Structs Containing Many References Struct User String String String Array Dictionary

46 Structs Containing Many References Class Struct User String String String Array Dictionary 1 Class 1 Class 1 Class 1 Class 1

47 Structs Containing Many References Class Struct User String String String Array Dictionary 1 Class 1 Class 1 Class 1 Class 1 Struct User String String String Array Dictionary

48 Structs Containing Many References Class Struct User String String String Array Dictionary 12 Class 12 Class 12 Class 12 Class 12 Struct User String String String Array Dictionary

49 Use a Wrapper Class Reference Wrapper Class 1 Struct User String String String Array Dictionary Class 1 Class 1 Class 1 Class 1 Class 1

50 Use a Wrapper Class Reference Reference Wrapper Class 12 Struct User String String String Array Dictionary Class 1 Class 1 Class 1 Class 1 Class 1

51 Use a Wrapper Class Reference Reference Wrapper Class 12 Struct User String String String Array Dictionary Class 1 Class 1 Class 1 Class 1 Class 1 Building Better Apps with Value Types in Swift Mission Friday 2:30PM

52 Overview Reference Counting Generics Dynamic Dispatch

53 Overview Reference Counting Generics Dynamic Dispatch

54 How Generics Work func min<t : Comparable>(x: T, y: T) -> T { return y < x? y : x

55 How Generics Work func min<t : Comparable>(x: T, y: T) -> T { return y < x? y : x f func min<t : Comparable>(x: T, y: T) -> T { return y < x? y : x

56 How Generics Work func min<t : Comparable>(x: T, y: T) -> T { return y < x? y : x func min<t : Comparable>(x: T, y: T, FTable: FunctionTable) -> T { let xcopy = FTable.copy(x) let ycopy = FTable.copy(y) let m = FTable.lessThan(yCopy, xcopy)? y : x FTable.release(x) FTable.release(y) return m

57 How Generics Work func min<t : Comparable>(x: T, y: T) -> T { return y < x? y : x func min<t : Comparable>(x: T, y: T, FTable: FunctionTable) -> T { let xcopy = FTable.copy(x) let ycopy = FTable.copy(y) let m = FTable.lessThan(yCopy, xcopy)? y : x FTable.release(x) FTable.release(y) return m

58 How Generics Work func min<t : Comparable>(x: T, y: T) -> T { return y < x? y : x func min<t : Comparable>(x: T, y: T, FTable: FunctionTable) -> T { let xcopy = FTable.copy(x) let ycopy = FTable.copy(y) let m = FTable.lessThan(yCopy, xcopy)? y : x FTable.release(x) FTable.release(y) return m

59 Generic Specialization func foo() { let x: Int =... let y: Int =... let r = min (x, y)...

60 Generic Specialization func foo() { let x: Int =... let y: Int =... let r = min (x, y)...

61 Generic Specialization func foo() { let x: Int =... let y: Int =... let r = min (x, y)... func min<t : Comparable>(x: T, y: T, FTable: FunctionTable) -> T { let xcopy = FTable.copy(x) let ycopy = FTable.copy(y) let m = FTable.lessThan(yCopy, xcopy)? y : x FTable.release(x) FTable.release(y) return m

62 Generic Specialization func foo() { let x: Int =... let y: Int =... let r = min (x, y)... func min<int>(x: Int, y: Int, FTable: FunctionTable) -> Int { let xcopy = FTable.copy(x) let ycopy = FTable.copy(y) let m = FTable.lessThan(yCopy, xcopy)? y : x FTable.release(x) FTable.release(y) return m

63 Generic Specialization func foo() { let x: Int =... let y: Int =... let r = min (x, y)... func min<int>(x: Int, y: Int) -> Int { return y < x? y : x

64 Generic Specialization func foo() { let x: Int =... let y: Int =... let r = min <Int> (x, y)... func min<int>(x: Int, y: Int) -> Int { return y < x? y : x

65 Specialization is Limited by Visibility Module A File1.swift func compute(...) -> Int {... return min(x, y) File2.swift func min<t: Comparable>(x: T, y: T) -> T { return y < x? y : x

66 Specialization is Limited by Visibility Module A File1.swift func compute(...) -> Int {... return min(x, y) Passing Int to min<t> File2.swift func min<t: Comparable>(x: T, y: T) -> T { return y < x? y : x

67 Specialization is Limited by Visibility Module A File1.swift func compute(...) -> Int {... return min(x, y) Passing Int to min<t> File2.swift func min<t: Comparable>(x: T, y: T) -> T { return y < x? y : x Definition not visible in File1

68 Specialization is Limited by Visibility Module A File1.swift func compute(...) -> Int {... return min(x, y) Passing Int to min<t> Must call min<t> File2.swift func min<t: Comparable>(x: T, y: T) -> T { return y < x? y : x Definition not visible in File1

69 Whole Module Optimization Module A File1.swift func compute(...) -> Int {... return min(x, y) File2.swift func min<t: Comparable>(x: T, y: T) -> T { return y < x? y : x Definition not visible in File1

70 Whole Module Optimization Module A File1.swift func compute(...) -> Int {... return min(x, y) File2.swift func min<t: Comparable>(x: T, y: T) -> T { return y < x? y : x Definition is visible in File1 Definition not visible in File1

71 Whole Module Optimization Module A File1.swift func compute(...) -> Int {... return min(x, y) Can call min<int> File2.swift func min<t: Comparable>(x: T, y: T) -> T { return y < x? y : x Definition is visible in File1 Definition not visible in File1

72 Overview Reference Counting Generics Dynamic Dispatch

73 Overview Reference Counting Generics Dynamic Dispatch

74 Dynamic Dispatch

75 Dynamic Dispatch public class Pet func noise() var name func noiseimpl() class Dog override func noise()

76 Dynamic Dispatch public class Pet func makenoise(p: Pet) { print("my name is \(p.name)") func noise() var name func noiseimpl() p.noise() class Dog override func noise()

77 Dynamic Dispatch public class Pet func makenoise(p: Pet) { print("my name is \(p.name)") func noise() var name p.noise() func noiseimpl() func makenoise(p: Pet) { print("my name is \(p.name)") p.noise() class Dog override func noise()

78 Dynamic Dispatch public class Pet func makenoise(p: Pet) { print("my name is \(p.name)") func noise() var name p.noise() func noiseimpl() func makenoise(p: Pet) { class Dog override func noise()

79 Dynamic Dispatch public class Pet func makenoise(p: Pet) { print("my name is \(p.name)") func noise() var name p.noise() func noiseimpl() func makenoise(p: Pet) { class Dog override func noise() let namegetter = Pet.nameGetter(p) print("my name is \(namegetter(p))") let noisemethod = Pet.noiseMethod(p) noisemethod(p)

80 Dynamic Dispatch public class Pet func makenoise(p: Pet) { print("my name is \(p.name)") func noise() var name p.noise() func noiseimpl() func makenoise(p: Pet) { class Dog override func noise() let namegetter = Pet.nameGetter(p) print("my name is \(namegetter(p))") let noisemethod = Pet.noiseMethod(p) noisemethod(p) Can only emit direct calls if it is known that the method is not overridden

81 Communicate API Constraints

82 Communicate API Constraints Inheritance

83 Communicate API Constraints Inheritance Access Control

84 Inheritance public class Pet func noise() var name func noiseimpl() func makenoise(p: Pet) { print("my let namegetter is = Pet.getNameGetter(p) \(p.name)") print("my name is \(namegetter(p))") let noisemethod = Pet.getNoiseMethod(p) noisemethod(p) class Dog override func noise()

85 Inheritance public class Pet func noise() var name func noiseimpl() func makenoise(p: Pet) { print("my let namegetter is = Pet.getNameGetter(p) \(p.name)") print("my name is \(namegetter(p))") let noisemethod = Pet.getNoiseMethod(p) noisemethod(p) class Dog override func noise()

86 Inheritance public class Pet func noise() final var var name name func noiseimpl() func makenoise(p: Pet) { print("my let namegetter is = Pet.getNameGetter(p) \(p.name)") print("my name is \(namegetter(p))") let noisemethod = Pet.getNoiseMethod(p) noisemethod(p) class Dog override func noise()

87 Inheritance public class Pet func noise() final var var name name func noiseimpl() func makenoise(p: Pet) { print("my name is \(p.name)") let noisemethod = Pet.getNoiseMethod(p) noisemethod(p) class Dog override func noise()

88 Access Control public class Pet func noise() final var name override func noiseimpl()? func noiseimpl() class Dog override func noise() override func noiseimpl()?

89 Access Control Module A Pet.swift public class Pet func noise() final var name override func noiseimpl()? func noiseimpl() Dog.swift class Dog override func noise() override func noiseimpl()?

90 Access Control Module A Pet.swift Module B Cat.swift public class Pet func noise() final var name class Cat override func noise() override func noiseimpl()? func noiseimpl() Dog.swift class Dog override func noise() override func noiseimpl()?

91 Access Control Module A Pet.swift Module B Cat.swift public class Pet func noise() final var name class Cat override func noise() override func noiseimpl()? func noiseimpl() Dog.swift class Dog override func noise() override func noiseimpl()?

92 Access Control Module A Pet.swift Module B Cat.swift public class Pet func noise() final var name class Cat override func noise() override func noiseimpl() func noiseimpl() Dog.swift class Dog override func noise() override func noiseimpl()

93 Access Control Module A Pet.swift Module B Cat.swift public class Pet func noise() final var name class Cat override func noise() override func noiseimpl() private func func noiseimpl() Dog.swift class Dog override func noise() override func noiseimpl()

94 Access Control Module A Pet.swift Module B Cat.swift public class Pet func noise() class Cat override func noise() final var name private func func noiseimpl() Dog.swift class Dog override func noise()

95 Whole Module Optimization Module A Pet.swift public class Pet func noise() final var name private func func noiseimpl() Dog.swift class Dog override func noise()

96 Whole Module Optimization Module A Pet.swift public class Pet func noise() func bark(d: Dog) { d.noise() final var name private func func noiseimpl() Dog.swift class Dog override func noise()

97 Whole Module Optimization Module A Pet.swift public class Pet func noise() func bark(d: Dog) { d.noise() final var name private func func noiseimpl() func bark(d: Dog) { Dog.swift class Dog let noisemethod = Dog.getNoiseMethod() noisemethod(d) override func noise()

98 Whole Module Optimization Module A Pet.swift public class Pet func noise() func bark(d: Dog) { d.noise() final var name private func func noiseimpl() Dog.swift class Dog override func noise() func bark(d: Dog) { let noisemethod = Dog.getNoiseMethod() noisemethod(d)

99 Whole Module Optimization Module A Pet.swift public class Pet func noise() func bark(d: Dog) { d.noise() final var name private func func noiseimpl() Dog.swift class Dog func bark(d: Dog) { override func noise()

100 Whole Module Optimization Module A Pet.swift public class Pet func noise() func bark(d: Dog) { d.noise() final var name private func func noiseimpl() Dog.swift class Dog func bark(d: Dog) { d.noise() override func noise()

101 Swift vs. Objective-C Program speed (higher is better) 2.67 Swift Objective-C DeltaBlue Richards 1 1x 2x 3x 4x 5x 6x 7x 8x

102 Communicate your API Intent Use the final keyword and access control Help the compiler understand your class hierarchy Be aware of breaking existing clients Enable Whole Module Optimization

103 Demo Joe Grzywacz Engineer, Performance Tools

104 Summary Swift is a flexible, safe programming language with ARC Write your APIs and code with performance in mind Profile your application with Instruments

105 More Information Swift Language Documentation Apple Developer Forums Stefan Lesser Developer Tools Evangelist

106 Related Sessions Profiling in Depth Mission Thursday 3:30PM Building Better Apps with Value Types in Swift Mission Friday 2:30PM

107

Implementing UI Designs in Interface Builder

Implementing UI Designs in Interface Builder Developer Tools #WWDC15 Implementing UI Designs in Interface Builder Session 407 Kevin Cathey Interface Builder Engineer Tony Ricciardi Interface Builder Engineer 2015 Apple Inc. All rights reserved. Redistribution

More information

Improving your Existing Apps with Swift

Improving your Existing Apps with Swift Developer Tools #WWDC15 Improving your Existing Apps with Swift Getting Swifty with It Session 403 Woody L. in the Sea of Swift 2015 Apple Inc. All rights reserved. Redistribution or public display not

More information

Advanced Debugging and the Address Sanitizer

Advanced Debugging and the Address Sanitizer Developer Tools #WWDC15 Advanced Debugging and the Address Sanitizer Finding your undocumented features Session 413 Mike Swingler Xcode UI Infrastructure Anna Zaks LLVM Program Analysis 2015 Apple Inc.

More information

What s New in LLDB. Debug your way to fame and glory #WWDC15. Developer Tools. Session 402

What s New in LLDB. Debug your way to fame and glory #WWDC15. Developer Tools. Session 402 Developer Tools #WWDC15 What s New in LLDB Debug your way to fame and glory Session 402 Kate Stone Software Behavioralist Sean Callanan Master of Expressions Enrico Granata Data Wizard 2015 Apple Inc.

More information

Understanding Undefined Behavior

Understanding Undefined Behavior Session Developer Tools #WWDC17 Understanding Undefined Behavior 407 Fred Riss, Clang Team Ryan Govostes, Security Engineering and Architecture Team Anna Zaks, Program Analysis Team 2017 Apple Inc. All

More information

Building Faster in Xcode

Building Faster in Xcode #WWDC18 Building Faster in Xcode Session 408 David Owens, Xcode Engineer Jordan Rose, Swift Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written

More information

Using and Extending the Xcode Source Editor

Using and Extending the Xcode Source Editor Developer Tools #WWDC16 Using and Extending the Xcode Source Editor Session 414 Mike Swingler Xcode Infrastructure and Editors Chris Hanson Xcode Infrastructure and Editors 2016 Apple Inc. All rights reserved.

More information

Finding Bugs Using Xcode Runtime Tools

Finding Bugs Using Xcode Runtime Tools Session Developer Tools #WWDC17 Finding Bugs Using Xcode Runtime Tools 406 Kuba Mracek, Program Analysis Engineer Vedant Kumar, Compiler Engineer 2017 Apple Inc. All rights reserved. Redistribution or

More information

Extending Your Apps with SiriKit

Extending Your Apps with SiriKit App Frameworks #WWDC16 Extending Your Apps with SiriKit Session 225 Vineet Khosla SiriKit Engineering Diana Huang SiriKit Engineering Scott Andrus SiriKit Engineering 2016 Apple Inc. All rights reserved.

More information

Thread Sanitizer and Static Analysis

Thread Sanitizer and Static Analysis Developer Tools #WWDC16 Thread Sanitizer and Static Analysis Help with finding bugs in your code Session 412 Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer, Program Analysis Team 2016

More information

Questions. Exams: no. Get by without own Mac? Why ios? ios vs Android restrictions. Selling in App store how hard to publish? Future of Objective-C?

Questions. Exams: no. Get by without own Mac? Why ios? ios vs Android restrictions. Selling in App store how hard to publish? Future of Objective-C? Questions Exams: no Get by without own Mac? Why ios? ios vs Android restrictions Selling in App store how hard to publish? Future of Objective-C? Grading: Lab/homework: 40%, project: 40%, individual report:

More information

Profiling in Depth. Do you know where your code is? Session 412. Kris Markel Performance Tools Engineer Chad Woolf Performance Tools Engineer

Profiling in Depth. Do you know where your code is? Session 412. Kris Markel Performance Tools Engineer Chad Woolf Performance Tools Engineer Developer Tools #WWDC15 Profiling in Depth Do you know where your code is? Session 412 Kris Markel Performance Tools Engineer Chad Woolf Performance Tools Engineer 2015 Apple Inc. All rights reserved.

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

What s New in Xcode App Signing

What s New in Xcode App Signing Developer Tools #WWDC16 What s New in Xcode App Signing Developing and distributing Session 401 Joshua Pennington Tools Engineering Manager Itai Rom Tools Engineer 2016 Apple Inc. All rights reserved.

More information

What s New in MapKit. App Frameworks #WWDC17. Fredrik Olsson

What s New in MapKit. App Frameworks #WWDC17. Fredrik Olsson Session App Frameworks #WWDC17 What s New in MapKit 237 Fredrik Olsson 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. MKMapView.mapType.standard

More information

Swift. Introducing swift. Thomas Woodfin

Swift. Introducing swift. Thomas Woodfin Swift Introducing swift Thomas Woodfin Content Swift benefits Programming language Development Guidelines Swift benefits What is Swift Benefits What is Swift New programming language for ios and OS X Development

More information

Mastering UIKit on tvos

Mastering UIKit on tvos App Frameworks #WWDC16 Mastering UIKit on tvos Session 210 Justin Voss UIKit Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from

More information

Monetize and Promote Your App with iad

Monetize and Promote Your App with iad Media #WWDC15 Monetize and Promote Your App with iad From design to launch Session 503 Carol Teng Shashank Phadke 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without

More information

Reverse Engineering Swift Apps. Michael Gianarakis Rootcon X 2016

Reverse Engineering Swift Apps. Michael Gianarakis Rootcon X 2016 Reverse Engineering Swift Apps Michael Gianarakis Rootcon X 2016 # whoami @mgianarakis Director of SpiderLabs APAC at Trustwave SecTalks Organiser (@SecTalks_BNE) Flat Duck Justice Warrior #ducksec Motivation

More information

Team: The Cimple Programming Language

Team: The Cimple Programming Language Team: Shankara Pailoor (sp3485) Panchampreet Kaur (pk2506) Graham Barab (gmb2154) The Cimple Programming Language We hope to build a statically typed language based off C with features that enable the

More information

iphone Application Programming Lecture 3: Swift Part 2

iphone Application Programming Lecture 3: Swift Part 2 Lecture 3: Swift Part 2 Nur Al-huda Hamdan RWTH Aachen University Winter Semester 2015/2016 http://hci.rwth-aachen.de/iphone Review Type aliasing is useful! Escaping keywords could be useful! If you want

More information

Core ML in Depth. System Frameworks #WWDC17. Krishna Sridhar, Core ML Zach Nation, Core ML

Core ML in Depth. System Frameworks #WWDC17. Krishna Sridhar, Core ML Zach Nation, Core ML System Frameworks #WWDC17 Core ML in Depth Krishna Sridhar, Core ML Zach Nation, Core ML 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from

More information

Building Watch Apps #WWDC15. Featured. Session 108. Neil Desai watchos Engineer

Building Watch Apps #WWDC15. Featured. Session 108. Neil Desai watchos Engineer Featured #WWDC15 Building Watch Apps Session 108 Neil Desai watchos Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Agenda

More information

SWIFT! init(title: String) { self.title = title } // required initializer w/ named parameter

SWIFT! init(title: String) { self.title = title } // required initializer w/ named parameter SWIFT! class Session { let title: String // constant non-optional field: can never be null and can never be changed var instruktør: Person? // variable optional field: null is permitted var attendees:

More information

Introducing On Demand Resources

Introducing On Demand Resources App Frameworks #WWDC15 Introducing On Demand Resources An element of App Thinning Session 214 Steve Lewallen Frameworks Engineering Tony Parker Cocoa Frameworks 2015 Apple Inc. All rights reserved. Redistribution

More information

Argument Passing All primitive data types (int etc.) are passed by value and all reference types (arrays, strings, objects) are used through refs.

Argument Passing All primitive data types (int etc.) are passed by value and all reference types (arrays, strings, objects) are used through refs. Local Variable Initialization Unlike instance vars, local vars must be initialized before they can be used. Eg. void mymethod() { int foo = 42; int bar; bar = bar + 1; //compile error bar = 99; bar = bar

More information

Enabling Your App for CarPlay

Enabling Your App for CarPlay Session App Frameworks #WWDC17 Enabling Your App for CarPlay 719 Albert Wan, CarPlay Engineering 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

QUIZ. Write the following for the class Bar: Default constructor Constructor Copy-constructor Overloaded assignment oper. Is a destructor needed?

QUIZ. Write the following for the class Bar: Default constructor Constructor Copy-constructor Overloaded assignment oper. Is a destructor needed? QUIZ Write the following for the class Bar: Default constructor Constructor Copy-constructor Overloaded assignment oper. Is a destructor needed? Or Foo(x), depending on how we want the initialization

More information

Seamless Linking to Your App

Seamless Linking to Your App App Frameworks #WWDC15 Seamless Linking to Your App Session 509 Conrad Shultz Safari and WebKit Software Engineer Jonathan Grynspan Core Services Software Engineer 2015 Apple Inc. All rights reserved.

More information

ios Accessibility Developing for everyone Session 201 Ian Fisch ios Accessibility

ios Accessibility Developing for everyone Session 201 Ian Fisch ios Accessibility App Frameworks #WWDC15 ios Accessibility Developing for everyone Session 201 Ian Fisch ios Accessibility 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written

More information

Outline. Java Models for variables Types and type checking, type safety Interpretation vs. compilation. Reasoning about code. CSCI 2600 Spring

Outline. Java Models for variables Types and type checking, type safety Interpretation vs. compilation. Reasoning about code. CSCI 2600 Spring Java Outline Java Models for variables Types and type checking, type safety Interpretation vs. compilation Reasoning about code CSCI 2600 Spring 2017 2 Java Java is a successor to a number of languages,

More information

WatchKit In-Depth, Part 2

WatchKit In-Depth, Part 2 App Frameworks #WWDC15 WatchKit In-Depth, Part 2 Session 208 Nathan de Vries watchos Engineer Chloe Chang watchos Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted

More information

Advanced Scrollviews and Touch Handling Techniques

Advanced Scrollviews and Touch Handling Techniques Frameworks #WWDC14 Advanced Scrollviews and Touch Handling Techniques Session 235 Josh Shaffer ios Apps and Frameworks Engineer Eliza Block ios Apps and Frameworks Engineer 2014 Apple Inc. All rights reserved.

More information

Accessibility on OS X

Accessibility on OS X Frameworks #WWDC14 Accessibility on OS X New Accessibility API Session 207 Patti Hoa Accessibility Engineer! Chris Dolan Accessibility Engineer 2014 Apple Inc. All rights reserved. Redistribution or public

More information

Introduction to Siri Shortcuts

Introduction to Siri Shortcuts #WWDC8 Introduction to Siri Shortcuts Session 2 Ari Weinstein, Siri Willem Mattelaer, Siri 208 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

Xcode & Swift: Introduction

Xcode & Swift: Introduction Dr.-Ing. Thomas Springer M.Sc. Martin Weißbach Concept You need Apple Computer Xcode 8 (ios device) Hands on course to learn how to program ios 1/1/0 means 45min lecture, 45min seminar introducing concepts

More information

Data Delivery with Drag and Drop

Data Delivery with Drag and Drop Session App Frameworks #WWDC17 Data Delivery with Drag and Drop 227 Dave Rahardja, UIKit Tanu Singhal, UIKit 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without

More information

Power, Performance, and Diagnostics

Power, Performance, and Diagnostics Core OS #WWDC14 Power, Performance, and Diagnostics What's new in GCD and XPC Session 716 Daniel Steffen Darwin Runtime Engineer 2014 Apple Inc. All rights reserved. Redistribution or public display not

More information

Mysteries of Auto Layout, Part 1

Mysteries of Auto Layout, Part 1 App Frameworks #WWDC15 Mysteries of Auto Layout, Part 1 Session 218 Jason Yao Interface Builder Engineer Kasia Wawer ios Keyboards Engineer 2015 Apple Inc. All rights reserved. Redistribution or public

More information

Kevin van Vechten Core OS

Kevin van Vechten Core OS Kevin van Vechten Core OS 2 3 Bill Bumgarner 4 (lambda (a) (add a d)) 10 timesrepeat:[pen turn:d; draw] z.each { val puts(val + d.to_s)} repeat(10, ^{ putc('0'+ d); }); 5 6 7 8 ^ 9 [myset objectspassingtest:

More information

Working with Metal Overview

Working with Metal Overview Graphics and Games #WWDC14 Working with Metal Overview Session 603 Jeremy Sandmel GPU Software 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

Creating Extensions for Safari

Creating Extensions for Safari Creating Extensions for Safari Part One Timothy Hatcher Safari and WebKit Engineer 2 3 HTML5 CSS3 JavaScript Native Code 4 Cross Platform Secure Crashes 5 What You ll Learn When to make a Safari Extension

More information

Short Notes of CS201

Short Notes of CS201 #includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

More information

15CS45 : OBJECT ORIENTED CONCEPTS

15CS45 : OBJECT ORIENTED CONCEPTS 15CS45 : OBJECT ORIENTED CONCEPTS QUESTION BANK: What do you know about Java? What are the supported platforms by Java Programming Language? List any five features of Java? Why is Java Architectural Neutral?

More information

Review: Object Diagrams for Inheritance. Type Conformance. Inheritance Structures. Car. Vehicle. Truck. Vehicle. conforms to Object

Review: Object Diagrams for Inheritance. Type Conformance. Inheritance Structures. Car. Vehicle. Truck. Vehicle. conforms to Object Review: Diagrams for Inheritance - String makemodel - int mileage + (String, int) Class #3: Inheritance & Polymorphism Software Design II (CS 220): M. Allen, 25 Jan. 18 + (String, int) + void

More information

5/23/2015. Core Java Syllabus. VikRam ShaRma

5/23/2015. Core Java Syllabus. VikRam ShaRma 5/23/2015 Core Java Syllabus VikRam ShaRma Basic Concepts of Core Java 1 Introduction to Java 1.1 Need of java i.e. History 1.2 What is java? 1.3 Java Buzzwords 1.4 JDK JRE JVM JIT - Java Compiler 1.5

More information

Porting Objective-C to Swift. Richard Ekle

Porting Objective-C to Swift. Richard Ekle Porting Objective-C to Swift Richard Ekle rick@ekle.org Why do we need this? 1.2 million apps in the ios App Store http://www.statista.com/statistics/276623/numberof-apps-available-in-leading-app-stores/

More information

Getting the Most out of Playgrounds in Xcode

Getting the Most out of Playgrounds in Xcode #WWDC18 Getting the Most out of Playgrounds in Xcode Session 402 Tibet Rooney-Rabdau, Xcode Engineer Alex Brown, Core OS Engineer TJ Usiyan, Xcode Engineer 2018 Apple Inc. All rights reserved. Redistribution

More information

C++ (Non for C Programmer) (BT307) 40 Hours

C++ (Non for C Programmer) (BT307) 40 Hours C++ (Non for C Programmer) (BT307) 40 Hours Overview C++ is undoubtedly one of the most widely used programming language for implementing object-oriented systems. The C++ language is based on the popular

More information

iphone Application Programming Lecture 3: Swift Part 2

iphone Application Programming Lecture 3: Swift Part 2 Lecture 3: Swift Part 2 Nur Al-huda Hamdan RWTH Aachen University Winter Semester 2015/2016 http://hci.rwth-aachen.de/iphone Properties Properties are available for classes, enums or structs Classified

More information

CS201 - Introduction to Programming Glossary By

CS201 - Introduction to Programming Glossary By CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with

More information

Getting to Know Swift Package Manager

Getting to Know Swift Package Manager #WWDC18 Getting to Know Swift Package Manager Session 411 Rick Ballard, SwiftPM Release Manager Boris Buegling, Developer Tools Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display

More information

Accessibility on ios. Developing for everyone. Frameworks #WWDC14. Session 210 Clare Kasemset ios Accessibility

Accessibility on ios. Developing for everyone. Frameworks #WWDC14. Session 210 Clare Kasemset ios Accessibility Frameworks #WWDC14 Accessibility on ios Developing for everyone Session 210 Clare Kasemset ios Accessibility 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without

More information

What's New in UIKit Dynamics and Visual Effects Session 229

What's New in UIKit Dynamics and Visual Effects Session 229 App Frameworks #WWDC15 What's New in UIKit Dynamics and Visual Effects Session 229 Michael Turner UIKit Engineer David Duncan UIKit Engineer 2015 Apple Inc. All rights reserved. Redistribution or public

More information

Memory management COSC346

Memory management COSC346 Memory management COSC346 Life cycle of an object Create a reference pointer Allocate memory for the object Initialise internal data Do stuff Destroy the object Release memory 2 Constructors and destructors

More information

Leveraging Touch Input on ios

Leveraging Touch Input on ios App Frameworks #WWDC16 Leveraging Touch Input on ios And getting the most out of Apple Pencil Session 220 Dominik Wagner UIKit Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display

More information

Introducing Swift Playgrounds

Introducing Swift Playgrounds Developer Tools #WWDC16 Introducing Swift Playgrounds Exploring with Swift on ipad Session 408 Matt Patenaude Playgrounds Engineer Maxwell Swadling Playgrounds Engineer Jonathan Penn Playgrounds Engineer

More information

Programming Kotlin. Familiarize yourself with all of Kotlin s features with this in-depth guide. Stephen Samuel Stefan Bocutiu BIRMINGHAM - MUMBAI

Programming Kotlin. Familiarize yourself with all of Kotlin s features with this in-depth guide. Stephen Samuel Stefan Bocutiu BIRMINGHAM - MUMBAI Programming Kotlin Familiarize yourself with all of Kotlin s features with this in-depth guide Stephen Samuel Stefan Bocutiu BIRMINGHAM - MUMBAI Programming Kotlin Copyright 2017 Packt Publishing First

More information

The Mysterious Swift Performance

The Mysterious Swift Performance The Mysterious Swift Performance 2017 me Marcin Krzyżanowski blog.krzyzanowskim.com Work at - the leading crossplatform solution for integrating PDFs into your app twitter: @krzyzanowskim github.com/krzyzanowskim

More information

Stanford CS193p. Developing Applications for ios. Fall CS193p. Fall

Stanford CS193p. Developing Applications for ios. Fall CS193p. Fall Stanford Developing Applications for ios Today Mostly Swift but some other stuff too Autolayout teaser Quick review of what we learned in Concentration CountableRange of floating point numbers Tuples Computed

More information

Dynamic Dispatch and Duck Typing. L25: Modern Compiler Design

Dynamic Dispatch and Duck Typing. L25: Modern Compiler Design Dynamic Dispatch and Duck Typing L25: Modern Compiler Design Late Binding Static dispatch (e.g. C function calls) are jumps to specific addresses Object-oriented languages decouple method name from method

More information

Forth Meets Smalltalk. A Presentation to SVFIG October 23, 2010 by Douglas B. Hoffman

Forth Meets Smalltalk. A Presentation to SVFIG October 23, 2010 by Douglas B. Hoffman Forth Meets Smalltalk A Presentation to SVFIG October 23, 2010 by Douglas B. Hoffman 1 CONTENTS WHY FMS? NEON HERITAGE SMALLTALK HERITAGE TERMINOLOGY EXAMPLE FMS SYNTAX ACCESSING OVERRIDDEN METHODS THE

More information

ITP 342 Mobile App Dev. Fundamentals

ITP 342 Mobile App Dev. Fundamentals ITP 342 Mobile App Dev Fundamentals Object-oriented Programming A programming paradigm based on the concept of objects. Properties Variables holding data Can be varying types Methods Behaviors An action

More information

ios Application Development Lecture 2: Seminar and Unit 1

ios Application Development Lecture 2: Seminar and Unit 1 ios Application Development Lecture 2: Seminar and Unit 1 Dr. Simon Völker & Philipp Wacker Media Computing Group RWTH Aachen University Winter Semester 2017/2018 http://hci.rwth-aachen.de/ios Swift 18

More information

CLASS DESIGN. Objectives MODULE 4

CLASS DESIGN. Objectives MODULE 4 MODULE 4 CLASS DESIGN Objectives > After completing this lesson, you should be able to do the following: Use access levels: private, protected, default, and public. Override methods Overload constructors

More information

Creating Complications with ClockKit Session 209

Creating Complications with ClockKit Session 209 App Frameworks #WWDC15 Creating Complications with ClockKit Session 209 Eliza Block watchos Engineer Paul Salzman watchos Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display

More information

CMSC131. Inheritance. Object. When we talked about Object, I mentioned that all Java classes are "built" on top of that.

CMSC131. Inheritance. Object. When we talked about Object, I mentioned that all Java classes are built on top of that. CMSC131 Inheritance Object When we talked about Object, I mentioned that all Java classes are "built" on top of that. This came up when talking about the Java standard equals operator: boolean equals(object

More information

COMP-520 GoLite Tutorial

COMP-520 GoLite Tutorial COMP-520 GoLite Tutorial Alexander Krolik Sable Lab McGill University Winter 2019 Plan Target languages Language constructs, emphasis on special cases General execution semantics Declarations Types Statements

More information

Introduce C# as Object Oriented programming language. Explain, tokens,

Introduce C# as Object Oriented programming language. Explain, tokens, Module 2 98 Assignment 1 Introduce C# as Object Oriented programming language. Explain, tokens, lexicals and control flow constructs. 99 The C# Family Tree C Platform Independence C++ Object Orientation

More information

Index. object lifetimes, and ownership, use after change by an alias errors, use after drop errors, BTreeMap, 309

Index. object lifetimes, and ownership, use after change by an alias errors, use after drop errors, BTreeMap, 309 A Arithmetic operation floating-point arithmetic, 11 12 integer numbers, 9 11 Arrays, 97 copying, 59 60 creation, 48 elements, 48 empty arrays and vectors, 57 58 executable program, 49 expressions, 48

More information

C# and Java. C# and Java are both modern object-oriented languages

C# and Java. C# and Java are both modern object-oriented languages C# and Java C# and Java are both modern object-oriented languages C# came after Java and so it is more advanced in some ways C# has more functional characteristics (e.g., anonymous functions, closure,

More information

Syllabus & Curriculum for Certificate Course in Java. CALL: , for Queries

Syllabus & Curriculum for Certificate Course in Java. CALL: , for Queries 1 CONTENTS 1. Introduction to Java 2. Holding Data 3. Controllin g the f l o w 4. Object Oriented Programming Concepts 5. Inheritance & Packaging 6. Handling Error/Exceptions 7. Handling Strings 8. Threads

More information

What s New in Swift #WWDC18. Ted Kremenek, Languages & Runtimes Manager Slava Pestov, Swift Compiler Engineer

What s New in Swift #WWDC18. Ted Kremenek, Languages & Runtimes Manager Slava Pestov, Swift Compiler Engineer Session #WWDC18 What s New in Swift 401 Ted Kremenek, Languages & Runtimes Manager Slava Pestov, Swift Compiler Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted

More information

Java Inheritance. Written by John Bell for CS 342, Spring Based on chapter 6 of Learning Java by Niemeyer & Leuck, and other sources.

Java Inheritance. Written by John Bell for CS 342, Spring Based on chapter 6 of Learning Java by Niemeyer & Leuck, and other sources. Java Inheritance Written by John Bell for CS 342, Spring 2018 Based on chapter 6 of Learning Java by Niemeyer & Leuck, and other sources. Review Which of the following is true? A. Java classes may either

More information

Modern User Interaction on ios

Modern User Interaction on ios App Frameworks #WWDC17 Modern User Interaction on ios Mastering the UIKit UIGesture System Session 219 Dominik Wagner, UIKit Engineer Michael Turner, UIKit Engineer Glen Low, UIKit Engineer 2017 Apple

More information

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

Weiss Chapter 1 terminology (parenthesized numbers are page numbers) Weiss Chapter 1 terminology (parenthesized numbers are page numbers) assignment operators In Java, used to alter the value of a variable. These operators include =, +=, -=, *=, and /=. (9) autoincrement

More information

1 Lexical Considerations

1 Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2013 Handout Decaf Language Thursday, Feb 7 The project for the course is to write a compiler

More information

Mobile Application Programming. Swift Classes

Mobile Application Programming. Swift Classes Mobile Application Programming Swift Classes Swift Top-Level Entities Like C/C++ but unlike Java, Swift allows declarations of functions, variables, and constants at the top-level, outside any class declaration

More information

Media and Gaming Accessibility

Media and Gaming Accessibility Session System Frameworks #WWDC17 Media and Gaming Accessibility 217 Greg Hughes, Software Engineering Manager Charlotte Hill, Software Engineer 2017 Apple Inc. All rights reserved. Redistribution or public

More information

(CONDITIONALS_BOUNDARY)

(CONDITIONALS_BOUNDARY) Pitest (../../) Overview PIT currently provides ten built-in mutators, of which seven are activated by default. The default set can be overriden, and different operators selected, by passing the names

More information

ios Memory Deep Dive #WWDC18 Kyle Howarth, Software Engineer James Snee, Software Engineer Kris Markel, Software Engineer

ios Memory Deep Dive #WWDC18 Kyle Howarth, Software Engineer James Snee, Software Engineer Kris Markel, Software Engineer Session #WWDC18 ios Memory Deep Dive 416 Kyle Howarth, Software Engineer James Snee, Software Engineer Kris Markel, Software Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display

More information

A program execution is memory safe so long as memory access errors never occur:

A program execution is memory safe so long as memory access errors never occur: A program execution is memory safe so long as memory access errors never occur: Buffer overflows, null pointer dereference, use after free, use of uninitialized memory, illegal free Memory safety categories

More information

Hierarchical inheritance: Contains one base class and multiple derived classes of the same base class.

Hierarchical inheritance: Contains one base class and multiple derived classes of the same base class. 1. What is C#? C# (pronounced "C sharp") is a simple, modern, object oriented, and type safe programming language. It will immediately be familiar to C and C++ programmers. C# combines the high productivity

More information

Managing Documents In Your ios Apps

Managing Documents In Your ios Apps Session #WWDC18 Managing Documents In Your ios Apps 216 Brandon Tennant, Software Engineer Thomas Deniau, Software Engineer Rony Fadel, Software Engineer 2018 Apple Inc. All rights reserved. Redistribution

More information

(infinitespeak.wordpress.com) Classes and Structs. Dr. Sarah Abraham

(infinitespeak.wordpress.com) Classes and Structs. Dr. Sarah Abraham (infinitespeak.wordpress.com) Classes and Structs Dr. Sarah Abraham University of Texas at Austin CS329e Fall 2018 Classes and Structures General-purpose, flexible constructs to build blocks of code Properties

More information

New UIKit Support for International User Interfaces

New UIKit Support for International User Interfaces App Frameworks #WWDC15 New UIKit Support for International User Interfaces Session 222 Sara Radi Internationalization Software Engineer Aaltan Ahmad Internationalization Software Engineer Paul Borokhov

More information

Topics Covered Thus Far. CMSC 330: Organization of Programming Languages. Language Features Covered Thus Far. Programming Languages Revisited

Topics Covered Thus Far. CMSC 330: Organization of Programming Languages. Language Features Covered Thus Far. Programming Languages Revisited CMSC 330: Organization of Programming Languages Type Systems, Names & Binding Topics Covered Thus Far Programming languages Syntax specification Regular expressions Context free grammars Implementation

More information

What s New in watchos

What s New in watchos Session App Frameworks #WWDC17 What s New in watchos 205 Ian Parks, watchos Engineering 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from

More information

Stanford CS193p. Developing Applications for ios. Winter CS193p! Winter 2015

Stanford CS193p. Developing Applications for ios. Winter CS193p! Winter 2015 Stanford CS193p Developing Applications for ios Today Objective-C Compatibility Bridging Property List NSUserDefaults Demo: var program in CalculatorBrain Views Custom Drawing Demo FaceView Bridging Objective-C

More information

Introducing the Photos Frameworks

Introducing the Photos Frameworks Media #WWDC14 Introducing the Photos Frameworks Session 511 Adam Swift ios Photos Frameworks 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

Building Visually Rich User Experiences

Building Visually Rich User Experiences Session App Frameworks #WWDC17 Building Visually Rich User Experiences 235 Noah Witherspoon, Software Engineer Warren Moore, Software Engineer 2017 Apple Inc. All rights reserved. Redistribution or public

More information

Expressing high level optimizations within LLVM. Artur Pilipenko

Expressing high level optimizations within LLVM. Artur Pilipenko Expressing high level optimizations within LLVM Artur Pilipenko artur.pilipenko@azul.com This presentation describes advanced development work at Azul Systems and is for informational purposes only. Any

More information

New Ways to Work with Workouts

New Ways to Work with Workouts Session #WWDC18 New Ways to Work with Workouts 707 Niharika Bedekar, Fitness Software Engineer Karim Benhmida, Health Software Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display

More information

VIRTUAL FUNCTIONS Chapter 10

VIRTUAL FUNCTIONS Chapter 10 1 VIRTUAL FUNCTIONS Chapter 10 OBJECTIVES Polymorphism in C++ Pointers to derived classes Important point on inheritance Introduction to virtual functions Virtual destructors More about virtual functions

More information

App Extension Best Practices

App Extension Best Practices App Frameworks #WWDC15 App Extension Best Practices Session 224 Sophia Teutschler UIKit Engineer Ian Baird CoreOS Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted

More information

Using Grouped Notifications

Using Grouped Notifications #WWDC18 Using Grouped Notifications Session 711 Michele Campeotto, ios User Notifications 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

CMSC 132: Object-Oriented Programming II

CMSC 132: Object-Oriented Programming II CMSC 132: Object-Oriented Programming II Java Support for OOP Department of Computer Science University of Maryland, College Park Object Oriented Programming (OOP) OO Principles Abstraction Encapsulation

More information

What s New in tvos #WWDC16. App Frameworks. Session 206. Hans Kim tvos Engineer

What s New in tvos #WWDC16. App Frameworks. Session 206. Hans Kim tvos Engineer App Frameworks #WWDC16 What s New in tvos Session 206 Hans Kim tvos Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Welcome

More information

Stanford CS193p. Developing Applications for ios. Spring CS193p. Spring 2016

Stanford CS193p. Developing Applications for ios. Spring CS193p. Spring 2016 Stanford Developing Applications for ios Today Memory Management for Reference Types Controlling when things leave the heap Closure Capture Closures capture things into the heap too Extensions A simple,

More information

Quick Interaction Techniques for watchos

Quick Interaction Techniques for watchos App Frameworks #WWDC16 Quick Interaction Techniques for watchos Session 211 Tom Witkin watchos Engineer Miguel Sanchez watchos Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display

More information