what’s new in xcode - apple inc....“what’s new in xcode” session. johnny appleseed yes!...

Post on 20-Jun-2020

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

© 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

#WWDC15

What’s New in Xcode

Ken Orr Developer Tools

Featured

Session 104

Swift 2

Error handlingAvailabilityTestabilityProtocol Extensions

Swift Migrator

Obj-C

Playgrounds

Ready | Today at 4:12 PM

Mandelbrot Set RenderingThis playground renders the Mandelbrot set by running code embedded within the playground’s Sources folder. You can explore the Sources folder by opening the Project Navigator (CMD+1) and clicking the triangle next to the playground file.

// Create a Mandelbrot set let m = MandelbrotView(frame: rect) Mandelbrot_Source…

// Create “Seahorse Valley” m.mandelbrotRect = newMandelbrotRect(points[“b”]!)

// Create Mandelbrot set within the Mandelbrot set m.mandelbrotRect = newMandelbrotRect(points[“e”]!)

10 sec

Mandelbrot

Ready | Today at 4:12 PM

// Create a Mandelbrot set let m = MandelbrotView(frame: rect) Mandelbrot_Source…

// Create “Seahorse Valley” m.mandelbrotRect = newMandelbrotRect(points[“b”]!)

// Create Mandelbrot set within the Mandelbrot set m.mandelbrotRect = newMandelbrotRect(points[“e”]!)

10 sec

Mandelbrot

Mandelbrot Set RenderingThis playground renders the Mandelbrot set by running code embedded within the playground’s Sources folder. You can explore the Sources folder by opening the Project Navigator (CMD+1) and clicking the triangle next to the playground file.

Ready | Today at 4:12 PM

// Create a Mandelbrot set let m = MandelbrotView(frame: rect) Mandelbrot_Source…

// Create “Seahorse Valley” m.mandelbrotRect = newMandelbrotRect(points[“b”]!)

// Create Mandelbrot set within the Mandelbrot set m.mandelbrotRect = newMandelbrotRect(points[“e”]!)

10 sec

Mandelbrot

Mandelbrot Set RenderingThis playground renders the Mandelbrot set by running code embedded within the playground’s Sources folder. You can explore the Sources folder by opening the Project Navigator (CMD+1) and clicking the triangle next to the playground file.

Ready | Today at 4:12 PM

Mandelbrot Set RenderingThis playground renders the Mandelbrot set by running code embedded within the playground’s Sources folder. You can explore the Sources folder by opening the Project Navigator (CMD+1) and clicking the triangle next to the playground file.

// Create a Mandelbrot set let m = MandelbrotView(frame: rect) Mandelbrot_Source…

// Create “Seahorse Valley” m.mandelbrotRect = newMandelbrotRect(points[“b”]!)

// Create Mandelbrot set within the Mandelbrot set m.mandelbrotRect = newMandelbrotRect(points[“e”]!)

10 sec

Mandelbrot

Ready | Today at 4:12 PM

Mandelbrot Set RenderingThis playground renders the Mandelbrot set by running code embedded within the playground’s Sources folder. You can explore the Sources folder by opening the Project Navigator (CMD+1) and clicking the triangle next to the playground file.

// Create a Mandelbrot set let m = MandelbrotView(frame: rect) Mandelbrot_Source…

// Create “Seahorse Valley” m.mandelbrotRect = newMandelbrotRect(points[“b”]!)

// Create Mandelbrot set within the Mandelbrot set m.mandelbrotRect = newMandelbrotRect(points[“e”]!)

Mandelbrot_Sources.M…

Mandelbrot_Sources.M…

10 sec

Mandelbrot

Ready | Today at 4:12 PM

Mandelbrot Set Rendering

// Create a Mandelbrot set let m = MandelbrotView(frame: rect) Mandelbrot_Source…

// Create “Seahorse Valley” m.mandelbrotRect = newMandelbrotRect(points[“b”]!)

// Create Mandelbrot set within the Mandelbrot set m.mandelbrotRect = newMandelbrotRect(points[“e”]!)

Mandelbrot_Sources.M…

Mandelbrot_Sources.M…

10 sec

MandelbrotSources

ComplexNumbers.swift

ResourcesMandelbrotView.swift

Equations.pngFirst Images.pngHistory.pngOther Sets.png

Mandelbrot

This playground renders the Mandelbrot set by running code embedded within the playground’s Sources folder. You can explore the Sources folder by opening the Project Navigator (CMD+1) and clicking the triangle next to the playground file.

Ready | Today at 4:12 PM

Mandelbrot Set Rendering

// Create a Mandelbrot set let m = MandelbrotView(frame: rect) Mandelbrot_Source…

// Create “Seahorse Valley” m.mandelbrotRect = newMandelbrotRect(points[“b”]!)

// Create Mandelbrot set within the Mandelbrot set m.mandelbrotRect = newMandelbrotRect(points[“e”]!)

Mandelbrot_Sources.M…

Mandelbrot_Sources.M…

10 sec

MandelbrotSources

ComplexNumbers.swift

ResourcesMandelbrotView.swift

Equations.pngFirst Images.pngHistory.pngOther Sets.png

Mandelbrot

This playground renders the Mandelbrot set by running code embedded within the playground’s Sources folder. You can explore the Sources folder by opening the Project Navigator (CMD+1) and clicking the triangle next to the playground file.

Ready | Today at 4:12 PM

GuidedTour

Control FlowFunctions and Closures

GuidedTour

Simple Values

Enumerations and StructuresProtocols and Extensions

Objects and Classes

GenericsSourcesResources

Control Flow

case let x where x.hasSuffix(“pepper”): let vegetableComment = “Is it a spicy \(x)?”

default: let vegetableComment = “Everything tastes good in soup.”

}

Experiment: Try removing the default case. What error do you get?

Notice how let can be used in a pattern to assign the value that matched that part of a pattern to a constant.

After executing the code inside the switch case that matched, the program exits from the switch statement. Execution doesn’t continue to the next case, so there is no need to explicitly break out the switch at the end of each case’s code.

You use for-in to iterate over item in a dictionary by providing a pair of names to use for each key-value pair. Dictionaries are an unordered collection, so their keys and values are iterated over in an arbitrary order.

Is it a spicy red pepper?

let interesting Numbers = [ “Prime”: [2, 3, 5, 7, 11, 13], “Fibonacci”: [1, 1, 2, 3, 5, 8], “Square”; [1, 4, 9, 16, 25],

] var largest = 0 for (kind, numbers) in interestingNumbers {

for number in numbers { if number > largest {

largest = number

30 sec

[Prime: [2, 3, 5, 7, 11, 13

0

(8 times)

watchOS 2

Games 10:09

Start Game

RM

JA

10:09Players

?TAP TO ANSWER

In ‘Game of Thrones’ who is Tyrion Lannister’s older

brother?

ROUND 110:09Cancel

CHOOSE AN ANSWER

Eddard "Ned" Stark

Cersei Lannister

Jaime Lannister

Tywin Lannister

?650Points TotalTrivia Games

TUE

9 10:09TriviaSci-fi & FantasyIn Progress…

26:50AAPL

131.39

?650Points TotalTrivia Games

TUE

9 10:09TriviaSci-fi & FantasyIn Progress…

26:50AAPL

131.39

Choose Genre Next

Classic Books Drama Movies

Engineering Classical Music Business Concepts Science

Sci-Fi & Fantasy Sports History World History Mathematics

Western Movies Thriller Movies

Games

9:41 AM

Choose Genre NextGames

Classic Books Drama Movies

Engineering Classical Music Business Concepts Science

Sci-Fi & Fantasy Sports History World History Mathematics

Western Movies Thriller Movies

Horror Movies Ancient History Reality TV Health & Medicine

Choose Genre NextGames

Classic Books Drama Movies Engineering

Classical Music Business Concepts Science Sci-Fi & Fantasy Sports History

World History Mathematics

Western Movies Thriller Movies

Horror Movies Ancient History Reality TV

9:41 AM

Choose Genre Next

Classic Books Drama Movies

Engineering Classical Music

Business Concepts Science Sci-Fi & Fantasy

Western Movies

Thriller Movies

Friends DetailsMessages

Anyone up for a game of Trivia this morning?

That sounds great Amy. I can kick-off the game. Which genre should I choose?

Amy Smith

I am at WWDC watching the “What’s New in Xcode” session.

Johnny Appleseed

Yes!Angelia O’Neil

Sci-fi & Fantasy sound good?

I am in! Sci-fi & Fantasy is my favorite trivia genre. Let’s play.

Ryan Davidson

Invite me.Debbie Brown

I’ve got the game running and I am going to invite all of you to play.

iMessage

9:41 AM

Games

App Thinning

Bitcode

Bitcode

Bitcode Slicing

Bitcode Slicing

Bitcode Slicing On Demand Resources

Demo

Jon Hess Developer Tools

Demo

Implementing UI Designs in Interface Builder Pacific Heights Wednesday 1:30PM

App Thinning in Xcode Presidio Wednesday 9:00AM

Introducing On Demand Resources Pacific Heights Wednesday 4:30PM

Debugging and Profiling Tools

Location Instrument

Metal System Trace

Address Sanitizer

Demo

Kate Stone Developer Tools

Demo

Advanced Debugging and the Address Sanitizer Mission Friday 9:00AM

What’s New in LLDB Nob Hill Tuesday 2:30PM

Crash Logs

Fully SymbolicatedApp Store and Test FlightFull Xcode Integration

Demo

Itai Rom Developer Tools

Testing

Test Navigator XCTest Xcode Server

Performance Asynchronous

User Interface Testing

Code Coverage

Build3 targets

RunDebug

TestDebug

ProfileRelease

AnalyzeDebug

ArchiveRelease

InstallDebug

Info Arguments Diagnostics

Build Configuration

Code Coverage

Debugger

Debug Process As

Gather coverage data

Debug executable

Me

root

Tests Test Application Data Test Location Test

Trivia Tests

Trivia Tests UI Tests

None

None

None

None

Debug

Duplicate Scheme Manage Schemes… CloseShared

Trivia iPhone 6

Build3 targets

RunDebug

TestDebug

ProfileRelease

AnalyzeDebug

ArchiveRelease

InstallDebug

Info Arguments Diagnostics

Build Configuration

Code Coverage

Debugger

Debug Process As

Gather coverage data

Debug executable

Me

root

Tests Test Application Data Test Location Test

Trivia Tests

Trivia Tests UI Tests

None

None

None

None

Debug

Duplicate Scheme Manage Schemes… CloseShared

Trivia iPhone 6

Gather coverage dataCode Coverage

Build3 targets

RunDebug

TestDebug

ProfileRelease

AnalyzeDebug

ArchiveRelease

InstallDebug

Info Arguments Diagnostics

Build Configuration

Code Coverage

Debugger

Debug Process As

Gather coverage data

Debug executable

Me

root

Tests Test Application Data Test Location Test

Trivia Tests

Trivia Tests UI Tests

None

None

None

None

Debug

Duplicate Scheme Manage Schemes… CloseShared

Trivia iPhone 6

Gather coverage dataCode Coverage

Demo

Joar Wingfors Developer Tools

Demo

UI Testing in Xcode Nob Hill Wednesday 11:00AM

Continuous Integration and Code Coverage in Xcode Presidio Thursday 10:00AM

Texture Atlas Support

Data Sets

ODR Debug Gauge

OS X Crash LogsStoryboard References

Global IlluminationODR Resource Tagging

GPU System Trace

SCM On-Ramp

Accurate Rendering

Local ODR hosting

iOS Energy Gauge

View Debugger Focus

App Extension Crash Logs

Stack View

Level Editor

Action Editor

Action Editor

Address Sanitizer

Instruments Track View Code Coverage

User Interface Testing

User Interface Recording

SCM with ssh

Incremental SCM Logs

App Slicing

Bitcode

Playground Pages

top related