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

Talk by Юлия Ващенко

Originally posted here: https://speakerdeck.com/vashchenko/macos-app-development-for-ios-devs-expand-your-horizons

Рассказ о том, с чем могут столкнуться iOS-разработчики, занимаясь разработкой для macOS. А именно:

- Какие преимущества разработки для macOS могут быть для iOS программистов?
- Различия UIKit vs AppKit
- Взгляд на macOS & iOS с точки зрения их истории
- Технологии, специфичные для десктопа
- Демо: "Работа с файловой системой"

This talk was made for CocoaFriday #2 ( https://cocoaheads.org.ua/cocoafriday/2 ) which took place Apr 5, 2019.

Video: https://youtu.be/dIdDLBNiBgY

CocoaHeads Ukraine

April 05, 2019
Tweet

More Decks by CocoaHeads Ukraine

Other Decks in Technology

Transcript

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

    View 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 Slide

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

    View Slide

  4. iOSMac

    View Slide

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

    View Slide

  6. View Slide

  7. View Slide

  8. View Slide

  9. View Slide

  10. iOSMac

    View Slide

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

    View Slide

  12. Many great apps can be
    written for macOS!

    View Slide

  13. Does anyone write for
    macOS?

    View Slide

  14. View Slide

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

    View Slide

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

    View Slide

  17. iOS & macOS:
    alike and different

    View Slide

  18. UIKit vs AppKit

    View Slide

  19. UIApplication

    View Slide

  20. UIApplication NSApplication

    View Slide

  21. UIView

    View Slide

  22. UIView NSView

    View Slide

  23. UITableView

    View Slide

  24. UITableView NSTableView

    View Slide

  25. 100 days of OSX Development video tutorials

    View Slide

  26. 100 days of OSX Development video tutorials

    View Slide

  27. 100 days of OSX Development video tutorials

    View Slide

  28. UIWindow

    View Slide

  29. UIWindow NSWindow

    View Slide

  30. UIWindow NSWindow

    UIResponder

    NSObject
    UIView

    View Slide

  31. UIWindow NSWindow

    UIResponder

    NSObject
    UIView


    NSResponder

    NSObject

    View Slide

  32. UITableView NSTableView
    UIScrollView
    UIView
    UIResponder



    View Slide

  33. UITableView NSTableView
    UIScrollView
    UIView
    UIResponder



    NSControl
    NSView
    NSResponder



    View Slide

  34. NSControl

    View Slide

  35. NSControl

    View Slide

  36. NSControl

    View Slide

  37. NSCollectionView

    View Slide

  38. NSCollectionView
    Works a lot differently than
    UICollectionView

    View Slide

  39. CALayer of the view:
    find 3 differences

    View Slide

  40. CALayer of the view:
    find 3 differences

    View Slide

  41. CALayer of the view:
    find 3 differences

    View Slide

  42. CALayer of the view:
    find 3 differences

    View Slide

  43. Core Animation

    View Slide

  44. Core Animation

    View Slide

  45. Core Animation

    View Slide

  46. Core Animation

    View Slide

  47. Coordinate system

    View Slide

  48. Coordinate system

    View Slide

  49. Coordinate system

    View Slide

  50. Coordinate system
    myView.isFlipped = true

    View Slide

  51. Why so many differences?

    View Slide

  52. iOS & macOS history

    View Slide

  53. OS X

    View Slide

  54. OS X
    [ɔes ten]

    View Slide

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

    View Slide

  56. 1988 1989 1990 1991
    System 6 System 7

    View Slide

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

    View Slide

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

    View Slide

  59. 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 Slide

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

    View Slide

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

    View Slide

  62. 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 Slide

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

    View Slide

  64. System 1

    View Slide

  65. System 6

    View Slide

  66. System 6

    View Slide

  67. View Slide

  68. View Slide

  69. View Slide

  70. System 7

    View Slide

  71. Mac OS 9

    View Slide

  72. Mac OS 9

    View Slide

  73. Mac OS X

    View Slide

  74. Mac OS X 10.5

    View Slide

  75. macOS specifics

    View Slide

  76. macOS specifics
    Distribution out of App Store

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  82. Demo

    View Slide

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

    View Slide

  84. Any Questions?

    View Slide

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

    View Slide