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

macOS app development for iOS devs: expand your horizons

macOS app development for iOS devs: expand your horizons

A presentation for CocoaFriday #2 meetup, focused on common and different aspects of development for iOS and macOS.

vashchenko

April 05, 2019
Tweet

More Decks by vashchenko

Other Decks in Programming

Transcript

  1. macOS app development
    for iOS devs:
    expand your horizons

    View full-size slide

  2. Julia Vashchenko
    macOS Engineer at
    • Languages: Objective-C, Swift, C++
    • Platforms: macOS, iOS
    • Technologies: inter-process communication,
    daemons & agents, multithreading, GUI apps
    iaronskaya

    View full-size slide

  3. Why macOS?
    Benefits of coding for macOS for iOS developers

    View full-size slide

  4. iOSMac
    See also: https://speakerdeck.com/steipete/hacking-marzipan

    View full-size slide

  5. https://developer.apple.com/macos/

    View full-size slide

  6. Many great apps can be
    written for macOS!

    View full-size slide

  7. Does anyone write for
    macOS?

    View full-size slide

  8. Seamless transition
    1. Familiar IDE: Xcode
    2. Same language stack:
    Swift, Objective-C, C++, C
    3. Well-known frameworks
    4. More possibilities

    View full-size slide

  9. Seamless transition
    1. Familiar IDE: Xcode
    2. Same language stack:
    Swift, Objective-C, C++, C
    3. Well-known frameworks
    4. More possibilities

    View full-size slide

  10. iOS & macOS:
    alike and different

    View full-size slide

  11. UIKit vs AppKit

    View full-size slide

  12. UIApplication

    View full-size slide

  13. UIApplication NSApplication

    View full-size slide

  14. UIView NSView

    View full-size slide

  15. UITableView NSTableView

    View full-size slide

  16. 100 days of OSX Development video tutorials

    View full-size slide

  17. 100 days of OSX Development video tutorials

    View full-size slide

  18. 100 days of OSX Development video tutorials

    View full-size slide

  19. UIWindow NSWindow

    View full-size slide

  20. UIWindow NSWindow

    UIResponder

    NSObject
    UIView

    View full-size slide

  21. UIWindow NSWindow

    UIResponder

    NSObject
    UIView


    NSResponder

    NSObject

    View full-size slide

  22. UITableView NSTableView
    UIScrollView
    UIView
    UIResponder



    View full-size slide

  23. UITableView NSTableView
    UIScrollView
    UIView
    UIResponder



    NSControl
    NSView
    NSResponder



    View full-size slide

  24. NSCollectionView

    View full-size slide

  25. NSCollectionView
    Works a lot differently than
    UICollectionView

    View full-size slide

  26. CALayer of the view:
    find 3 differences

    View full-size slide

  27. CALayer of the view:
    find 3 differences

    View full-size slide

  28. CALayer of the view:
    find 3 differences

    View full-size slide

  29. CALayer of the view:
    find 3 differences

    View full-size slide

  30. Core Animation

    View full-size slide

  31. Core Animation

    View full-size slide

  32. Core Animation

    View full-size slide

  33. Core Animation

    View full-size slide

  34. Coordinate system

    View full-size slide

  35. Coordinate system

    View full-size slide

  36. Coordinate system

    View full-size slide

  37. Coordinate system
    myView.isFlipped = true

    View full-size slide

  38. Why so many differences?

    View full-size slide

  39. iOS & macOS history

    View full-size slide

  40. OS X
    [ɔes ten]

    View full-size slide

  41. 1984 1985 1986 1987
    System 1 System 2 System 3
    System 4
    System 5:
    Macintosh System Software

    View full-size slide

  42. 1988 1989 1990 1991
    System 6 System 7

    View full-size slide

  43. 1992 1993 1994 1995
    Mac OS 7.5.1
    Mac OS 8

    View full-size slide

  44. 1996 1997 1998 1999
    Apple acquires NeXT
    Mac OS 9

    View full-size slide

  45. 2000 2001 2002 2003
    Mac OS X
    10.0 Cheetah,
    10.1 Puma
    Mac OS X
    10.2 Jaguar
    Mac OS X
    10.3 Panther

    View full-size slide

  46. 2004 2005 2006 2007
    Mac OS X
    10.4 Tiger
    Mac OS X
    10.5 Leopard
    iPhone 1 launch

    View full-size slide

  47. 2008 2009 2010 2011
    Mac OS X
    10.6 Snow Leopard
    Mac OS X
    10.7 Lion

    View full-size slide

  48. 2012 2013 2014 2015
    Mac OS X
    10.8 Mountain Lion
    Mac OS X
    10.9 Maverics
    Mac OS X
    10.10 Yosemite
    Mac OS X
    10.11 El Capitan

    View full-size slide

  49. 2016 2017 2018 2019
    macOS 10.12 Sierra
    macOS 10.13 High Sierra
    macOS 10.14 Mojave
    ?

    View full-size slide

  50. Mac OS X 10.5

    View full-size slide

  51. macOS specifics

    View full-size slide

  52. macOS specifics
    Distribution out of App Store

    View full-size slide

  53. macOS specifics
    Distribution out of App Store
    Living out of the Sandbox

    View full-size slide

  54. macOS specifics
    Distribution out of App Store
    Living out of the Sandbox
    Obtaining root privileges

    View full-size slide

  55. macOS specifics
    Distribution out of App Store
    Living out of the Sandbox
    Obtaining root privileges
    Using command-line tools

    View full-size slide

  56. macOS specifics
    Distribution out of App Store
    Living out of the Sandbox
    Obtaining root privileges
    Using command-line tools
    Scripting other apps

    View full-size slide

  57. macOS specifics
    Distribution out of App Store
    Living out of the Sandbox
    Obtaining root privileges
    Using command-line tools
    Scripting other apps
    ...

    View full-size slide

  58. PDP: Personal
    Development Plan
    https://gist.github.com/aronskaya/7daa8d2bf77d60c65d35f91c6316e8f0

    View full-size slide

  59. Any Questions?

    View full-size slide

  60. Thank you!
    email: [email protected]
    twitter: iaronskaya

    View full-size slide