104 whats new in xcode

Upload: raja

Post on 05-Jul-2018

232 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/16/2019 104 Whats New in Xcode

    1/63

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

    #WWD

    What’s New in Xcode

    Ken Orr Developer Tools

    Featured

    Session 104

  • 8/16/2019 104 Whats New in Xcode

    2/63

  • 8/16/2019 104 Whats New in Xcode

    3/63

  • 8/16/2019 104 Whats New in Xcode

    4/63

    Swift 2

  • 8/16/2019 104 Whats New in Xcode

    5/63

    Error handling

    Availability

     TestabilityProtocol Extensions

  • 8/16/2019 104 Whats New in Xcode

    6/63

    Swift Migrator

  • 8/16/2019 104 Whats New in Xcode

    7/63

    Obj-C

  • 8/16/2019 104 Whats New in Xcode

    8/63

    Playgrounds

  • 8/16/2019 104 Whats New in Xcode

    9/63

    Ready | Today at 412 PM

    Mandelbrot Set Rendering

    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.

    // 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 setm.mandelbrotRect = newMandelbrotRect(points[“e”]!)

    Mandelbrot

  • 8/16/2019 104 Whats New in Xcode

    10/63

    Ready | Today at 412 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 setm.mandelbrotRect = newMandelbrotRect(points[“e”]!)

    Mandelbrot

    Mandelbrot Set Rendering

    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.

  • 8/16/2019 104 Whats New in Xcode

    11/63

    Mandelbrot Set Rendering

    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.

  • 8/16/2019 104 Whats New in Xcode

    12/63

    Ready | Today at 412 PM

    Mandelbrot Set Rendering

    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.

    // 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 setm.mandelbrotRect = newMandelbrotRect(points[“e”]!)

    Mandelbrot

  • 8/16/2019 104 Whats New in Xcode

    13/63

    Ready | Today at 412 PM

    Mandelbrot Set Rendering

    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.

    // 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 setm.mandelbrotRect = newMandelbrotRect(points[“e”]!)

    Mandelbrot_Sources.M…

    Mandelbrot_Sources.M…

    Mandelbrot

  • 8/16/2019 104 Whats New in Xcode

    14/63

    Ready | Today at 412 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 setm.mandelbrotRect = newMandelbrotRect(points[“e”]!)

    Mandelbrot_Sources.M…

    Mandelbrot_Sources.M…

    Mandelbrot

    Sources

    ComplexNumbers.swift

    Resources

    MandelbrotView.swift

    Equations.png

    First Images.png

    History.png

    Other 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.

  • 8/16/2019 104 Whats New in Xcode

    15/63

    Ready | Today at 412 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 setm.mandelbrotRect = newMandelbrotRect(points[“e”]!)

    Mandelbrot_Sources.M…

    Mandelbrot_Sources.M…

    Mandelbrot

    Sources

    ComplexNumbers.swift

    Resources

    MandelbrotView.swift

    Equations.png

    First Images.png

    History.png

    Other 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.

  • 8/16/2019 104 Whats New in Xcode

    16/63

    Ready | Today at 412 PM

    GuidedTour

    Control Flow

    Functions and Closures

    GuidedTour

    Simple Values

    Enumerations and Structures

    Protocols and Extensions

    Objects and Classes

    Generics

    Sources

    Resources

    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 partof 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 touse for each key-value pair. Dictionaries are an unordered collection, so theirkeys 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

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

    0

    (8 times)

  • 8/16/2019 104 Whats New in Xcode

    17/63

  • 8/16/2019 104 Whats New in Xcode

    18/63

  • 8/16/2019 104 Whats New in Xcode

    19/63

  • 8/16/2019 104 Whats New in Xcode

    20/63

    Games   1009

    Start Game

    RM

    JA

    1009Players

    ?TAP TO ANSWER

    In ‘Game of Thrones’ who is

    Tyrion Lannister’s older

    brother?

    ROUND 1

    1009CancelCHOOSE AN ANSWER

    Eddard "Ned" Stark

    Cersei Lannister

    Jaime Lannister

    Tywin Lannister

    ?

    650Points Total

    Trivia Games

  • 8/16/2019 104 Whats New in Xcode

    21/63

    TUE

    9   10 09Trivia

    Sci-fi & Fantasy

    In Progress…

    2650AAPL

    131.39

    ?

    650Points TotalTrivia Games

  • 8/16/2019 104 Whats New in Xcode

    22/63

    TUE

    9   10 09Trivia

    Sci-fi & Fantasy

    In Progress…

    2650AAPL

    131.39

  • 8/16/2019 104 Whats New in Xcode

    23/63

    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

  • 8/16/2019 104 Whats New in Xcode

    24/63

    941 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

  • 8/16/2019 104 Whats New in Xcode

    25/63

    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

    941 AM

  • 8/16/2019 104 Whats New in Xcode

    26/63

    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. Le t’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

    941 AM

    Games

  • 8/16/2019 104 Whats New in Xcode

    27/63

    App Thinning

  • 8/16/2019 104 Whats New in Xcode

    28/63

    Bitcode

  • 8/16/2019 104 Whats New in Xcode

    29/63

    Bitcode

  • 8/16/2019 104 Whats New in Xcode

    30/63

    Bitcode Slicing

  • 8/16/2019 104 Whats New in Xcode

    31/63

    Bitcode Slicing

  • 8/16/2019 104 Whats New in Xcode

    32/63

    Bitcode Slicing On Demand

    Resources

  • 8/16/2019 104 Whats New in Xcode

    33/63

    Demo

    Jon Hess Developer Tools

  • 8/16/2019 104 Whats New in Xcode

    34/63

    Demo

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

    App Thinning in Xcode Presidio Wednesday 9:00

    Introducing On Demand Resources Pacific Heights Wednesday 4:30

  • 8/16/2019 104 Whats New in Xcode

    35/63

    Debugging and Profiling Tools

  • 8/16/2019 104 Whats New in Xcode

    36/63

    Location Instrument

  • 8/16/2019 104 Whats New in Xcode

    37/63

    Location Instrument

    Metal System Trace

  • 8/16/2019 104 Whats New in Xcode

    38/63

    Metal System Trace

  • 8/16/2019 104 Whats New in Xcode

    39/63

  • 8/16/2019 104 Whats New in Xcode

    40/63

  • 8/16/2019 104 Whats New in Xcode

    41/63

    Demo

    Kate Stone Developer Tools

  • 8/16/2019 104 Whats New in Xcode

    42/63

    Demo

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

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

  • 8/16/2019 104 Whats New in Xcode

    43/63

    Crash Logs

  • 8/16/2019 104 Whats New in Xcode

    44/63

    Fully Symbolicated

    App Store and Test Fligh

    Full Xcode Integration

  • 8/16/2019 104 Whats New in Xcode

    45/63

  • 8/16/2019 104 Whats New in Xcode

    46/63

    Demo

    Itai Rom Developer Tools

  • 8/16/2019 104 Whats New in Xcode

    47/63

     Testing

  • 8/16/2019 104 Whats New in Xcode

    48/63

     Test Navigator XCTest Xcode Server

  • 8/16/2019 104 Whats New in Xcode

    49/63

    Performance Asynchronous

  • 8/16/2019 104 Whats New in Xcode

    50/63

    User Interface Testing

  • 8/16/2019 104 Whats New in Xcode

    51/63

  • 8/16/2019 104 Whats New in Xcode

    52/63

    Code Coverage

  • 8/16/2019 104 Whats New in Xcode

    53/63

    Build

    3 targets

    Run

    Debug

    Test

    Debug

    Profile

    Release

    Analyze

    Debug

    Archive

    Release

    Install

    Debug

    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

  • 8/16/2019 104 Whats New in Xcode

    54/63

    Build

    3 targets

    Run

    Debug

    Test

    Debug

    Profile

    Release

    Analyze

    Debug

    Archive

    Release

    Install

    Debug

    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

  • 8/16/2019 104 Whats New in Xcode

    55/63

    Gather coverage dataCode Coverage

  • 8/16/2019 104 Whats New in Xcode

    56/63

  • 8/16/2019 104 Whats New in Xcode

    57/63

  • 8/16/2019 104 Whats New in Xcode

    58/63

  • 8/16/2019 104 Whats New in Xcode

    59/63

    Demo

    Joar Wingfors Developer Tools

  • 8/16/2019 104 Whats New in Xcode

    60/63

    Demo

    UI Testing in Xcode Nob Hill Wednesday 11:0

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

    Accurate Rendering iOS Energy GaugeAction Editor User Interface Re

  • 8/16/2019 104 Whats New in Xcode

    61/63

     Texture Atlas Support

    Data Sets

    ODR Debug

    OS X Crash LogsStoryboard References

    Global IlluminationODR Resource Tagging

    GPU System Trace

    SCM On

    Local ODR

    View Debugger Focus

    App Extension Cra

    Stack View

    Level Editor

    Action Editor

    Address Sanitizer

    Instruments Track View Code Co

    User Interface Testing

    SCM with ssh

    Incremental SCM Logs

    App Slicing Playground

  • 8/16/2019 104 Whats New in Xcode

    62/63

  • 8/16/2019 104 Whats New in Xcode

    63/63