Pro Yearly is on sale from $80 to $50! »

Highlights of WWDC 2018 & Hacking Marzipan

Highlights of WWDC 2018 & Hacking Marzipan

The world's biggest gathering of iOS developers organized by Apple is happening just a few days before mDevCamp. Peter will be there and will bring all the hot news we should look at in upcoming weeks and months. The talk featured a first in-depth look at the experience of porting http://pdfviewer.io over to Apple's new iOSMac subsystem ("Marzipan"). Video of PDF Viewer running on macOS: https://twitter.com/steipete/status/1006292370160316418

832ece085bfe2c7c5b0ed6be62d7e675?s=128

Peter Steinberger

June 15, 2018
Tweet

Transcript

  1. Highlights of WWDC 2018 Peter Steinberger - @steipete

  2. Highlights of WWDC 2018 » WWDC 2018 » Talk Highlights

    » Marzipan Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC 2018
  3. What's New for Developers » Swift 4.2 » Xcode 10

    » ARKit 2 & USDZ » Network.framework » Siri Shortcuts » Core ML (Mac) Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC 2018
  4. "Bug fixes and performance improvements." Peter Steinberger - @steipete -

    PSPDFKit - Highlights of WWDC 2018
  5. iOS 13 Predictions » Application Tabs » Split Screen/Multple Windows

    » New Home Screen » Pinnable Widgets » ... Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC 2018
  6. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  7. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  8. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  9. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  10. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  11. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  12. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  13. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  14. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  15. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  16. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  17. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  18. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  19. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  20. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  21. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  22. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  23. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  24. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  25. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  26. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  27. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  28. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  29. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  30. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  31. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  32. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  33. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  34. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  35. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  36. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  37. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  38. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  39. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  40. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  41. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  42. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  43. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  44. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  45. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  46. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  47. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  48. Great Talks Peter Steinberger - @steipete - PSPDFKit - Highlights

    of WWDC 2018
  49. Understanding Crashes and Crash Logs (414) https://developer.apple.com/videos/play/wwdc2018/414/

  50. A Tour of UICollectionView (225) https://developer.apple.com/videos/play/wwdc2018/225/

  51. Embracing Algorithms (223) https://developer.apple.com/videos/play/wwdc2018/223/

  52. Advanced Debugging with Xcode and LLDB https://developer.apple.com/videos/play/wwdc2018/412/

  53. Marzipan Hacking Peter Steinberger - @steipete - PSPDFKit - Highlights

    of WWDC 2018
  54. None
  55. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  56. None
  57. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  58. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  59. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  60. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  61. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  62. DISCLAIMER » Things will break » Don't release Marzipan apps

    just yet » Don't try any of that on your main dev machine » Disabling security is a bad idea » I only had a few days to play with it Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC 2018
  63. Why bother then? » Get a headstart for 2019 »

    It will make your codebase better » It's fun! Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC 2018
  64. https://github.com/biscuitehh/MarzipanPlatter

  65. Disable Security ! sudo csrutil disable sudo nvram boot-args=“amfi_get_out_of_my_way=0x1” Peter

    Steinberger - @steipete - PSPDFKit - Highlights of WWDC 2018
  66. Virtual Machines do not work currently Peter Steinberger - @steipete

    - PSPDFKit - Highlights of WWDC 2018
  67. What's already there? » Both Swift and Objective-C are supported

    » Storyboards/Interface Builder layouts mostly work » Most Frameworks are available » MobileCoreServices: Renamed to CoreServices (new in macOS Mojave) Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC 2018
  68. Problems » Some parts from iOS 11 are missing »

    Deprecated API is gone (UIWebView is not there) » Auto Layout behaves different » Stuff's weird & undocumented » WINDOW SERVER FREEZES CONSTANTLY Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC 2018
  69. AppKit is still there and will haunt you Peter Steinberger

    - @steipete - PSPDFKit - Highlights of WWDC 2018
  70. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  71. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  72. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  73. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  74. @interface UILabel (PSPDFMarzipan) // Otherwise we get an unrecognized selector

    - (NSUInteger)ns_widgetType; @end @implementation UILabel (PSPDFMarzipan) - (NSUInteger)ns_widgetType { return 0; } @end @interface UITextField (PSPDFMarzipan) // Otherwise we get an unrecognized selector - (NSUInteger)ns_widgetType; @end @implementation UITextField (PSPDFMarzipan) - (NSUInteger)ns_widgetType { return 0; } @end Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC 2018
  75. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  76. @interface UILabel (PSPDFMarzipan) // Otherwise we get an unrecognized selector

    - (NSUInteger)ns_widgetType; @end @implementation UILabel (PSPDFMarzipan) - (NSUInteger)ns_widgetType { return 1; } @end Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC 2018
  77. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  78. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  79. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  80. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  81. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  82. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  83. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  84. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  85. UIStackView system spacing - (void)setPspdf_fallbackSpacing:(CGFloat)fallbackSpacing { if (@available(iOS 11.0, *))

    { self.spacing = UIStackViewSpacingUseSystem; } else { self.spacing = fallbackSpacing; } } Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC 2018
  86. UIStackView system spacing yolo - (void)setPspdf_fallbackSpacing:(CGFloat)fallbackSpacing { //if (@available(iOS 11.0,

    *)) { // self.spacing = UIStackViewSpacingUseSystem; //} else { self.spacing = fallbackSpacing; //} } Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC 2018
  87. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  88. Auto Layout Gotchas » Don't use visual format language (fails

    to match views) » Don't use UIStackViewSpacingUseSystem (introduced in iOS 11) » Some wilder hacks required (ns_widgetType) Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC 2018
  89. Window Chrome » No API Peter Steinberger - @steipete -

    PSPDFKit - Highlights of WWDC 2018
  90. Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC

    2018
  91. None
  92. pdfviewer.io

  93. Thanks! Try pdfviewer.io (iOS and Android, no macOS yet, sorry)

    Want more like that? Follow @steipete on Twitter Peter Steinberger - @steipete - PSPDFKit - Highlights of WWDC 2018