Procrastinative Ninja

what I do, when I don't do, what I should do.

WWDC 2018 Notes

Jul 02, 2018

For about 8 years now, I’ve been an iOS developer. In recent years I’ve tried to watch more and more WWDC videos. This is the first year where I watched pretty much all the videos that sounded somehow interesting to me: That’s nearly 60 sessions or roughly 60% (there were 120 sessions in total, but these include labs and special events).

I (manually) downloaded everything, roughly categorized the videos into folders and tagged the most important or interesting ones with Finder colors, so future-me would know what to watch first. This worked pretty well, however next year I might want to try wwdc-downloader or WWDC for macOS.

My video player of choice is VLC, because it handles playback speed adjustment the best. I started watching at ~1.3x and kept increasing it when I felt comfortable and speaker and topic permitted it. Every now and then I had to skip back or slow down, but in the end I watched most videos at ~2.5x - you get used to it, believe me. This way I could watch 2-3 videos per hour and I tried to spare one hour before and one after work.

While watching I took notes to better remember things and to have a reference to come back to. To emphasize: I took these notes for me, you might find something else interesting or noteworthy. Still, maybe my notes can save you some time or motivate you to watch a session you might have missed otherwise.

The session notes are grouped into categories that made sense to me, they don’t necessarily overlap with Apple’s categorization. The sessions in each category are ordered from most important/general to least. The number of notes can be used as a secondary indicator for how much interesting content there is in a session. I’ve also added some emoji highlights:

  • 💎 A pure gem - must watch
  • ⭐️ This one is pretty good, too
  • 🚨 Uh-oh, better pay attention to this
  • 🎉 Woohoo! It’s the small things that make this place livable
  • ⏯ Related video

If you find something else interesting or know a session that I completely missed, please leave comment.

Categories

Meta

What’s New

Highlights

Tools

⭐️ Platforms State of the Union (102)

  • logging: os_log & Instrumentation: os_signpost
  • OS X apps need to be notarized (“approved” by Apple) -> WTF?!
  • IB: NSGridView (for Settings) -> 209
  • 🎉 Xcode
    • Library view can will float around (cmd+shift+L)
      • Same for snippets in a code editor. To create new snippets select code and right click -> Create Code Snippet
    • Callers option
    • More refactoring
    • Change bar: highlight upstream changes & potential conflicts - nice!
    • Supports overscroll
    • Code Folding
    • Multi Cursor Editing (ctrl+shift?), alt+drag -> multiple column editing
    • SCM pull supports rebase
    • Randomized test execution order AND parallel execution (also UI tests!)
  • Swift 5 will have ABI stability (early next year)
  • AR: Object recognition

⭐️ What’s New in LLVM (409)

  • Check Release Notes to see if affected by ABI change (regarding to structs with ARC object pointer fields)
  • 🚨 Enable “Performance Anti-Patterns with Grand Central Dispatch” warning
  • 🚨 Enable “Analyze During ‘Build’” option
  • Canary stack region is inserted before return address to check for a stack overflow (actually old)
    • New: check if “allocations inside a function” > stack size. If yes, crash (instead of overflowing into the heap). This is enabled by default.

Building Faster in Xcode (408)

  • Product -> Perform Action -> Build With Timing Summary
  • 🚨 @Swift: Compilation Mode “Whole Module” should no longer be necessary to get short build times. Incremental builds should work, too - but ONLY set it for Debug builds!

Creating Custom Instruments (410)

  • A lot of XML fiddling…
  • “Last 5s” recording mode is the most efficient one

Coding

💎 UIKit Apps for Every Size and Shape (235)

  • Safe Area
    • rectangular region, that’s never clipped
    • on iPhone 8 full screen (well, excluding the status bar…)
    • on iPhone X bottom and top are missing (in landscape left, right and bottom)
    • .safeAreaInsets/safeAreaLayoutGuide propagates to subviews (with correct values)
    • .additionalSafeAreaInsets to add to .safeAreaInsets
    • Safe area insets of a view never grows larger than what it parent provides - otherwise animations would suck
  • Layout Margins
    • fully controllable padding of a view
    • .directionalLayoutMargins for LTR/RTL support
    • use .layoutMarginsGuide for constraints
    • calculated from inside safe area -> margins are additional padding
      • .insetsLayoutMarginsFromSafeArea = false to change this
    • does NOT propagate to subviews
      • unless .preservesSuperviewLayoutMargins = true
    • ViewController views have a default left and right margin: .systemMinimumLayoutMargins
      • set .viewRespectsSystemMinimumLayoutMargins = false to prevent .layoutMargins be combined with .systemMinimumLayoutMargins
  • Scroll Views
    • contentInset increases scrollable area
      • contentInset.top = 20 allows contentOffset to become -20
    • scroll views stop safe area inset propagation
    • .adjustedContentInset = contentInset + system insets (aka safe area insets - don’t know which other could be meant….systemMinimumLayoutMargins?)
      • see .contentInsetAdjustmentBehavior
        • .always will always incorporate system insets -> will make table view horizontally scrollable on iPhone X in landscape
        • .scrollableAxes breaks, if the content is too small, if scrollable
        • .automatic becomes .scrollableAxes if .automaticallyAdjustScrollViewInsets = false
        • .never will propagate safe area insets
  • .readableContentGuide will honor layout margins -> use that to constrain flowing text
    • set tableView.cellLayoutMarginFollowReadableWidth = true (also in IB) for multi line label cells
  • TableViewCell .contentView does NOT extend beyond safe area (background and selected background views do) - opt out with .insetsContentViewstoSafeArea = false

⭐️ High Performance Auto Layout (220)

  • Auto Layout is faster in iOS 12
  • don’t unnecessarily re-create constraints (for example don’t re-create them in every updateConstraints())
  • New instrument for Auto Layout
  • 🚨 systemLayoutSizeFittingSize() creates an extra layout engine, performs a calculation and discards it -> expensive -> avoid

⭐️ A Tour of UICollectionView (225)

  • UICollectionViewLayout.prepare() is called when the layout is invalidated. Flow layouts are invalidated when the collection view size changes -> subclasses can use this method to implement customizations that depend on the collection view size
    • set item.width = cv.width to get a pseudo table view
  • Order of UICollectionView move/delete/insert calls does NOT matter (delete always uses the before state, insert the after state)
    • 🚨 reloading a cell is actually deleting and re-inserting it -> conflicts with move animation -> do reloads separately

💎 Optimizing App Assets (227)

  • Loose images need extra space due to metadata in image file format. Image atlas creation (happens during asset catalog packing) might (and probably will) save disk space.
  • Asset catalogs support lossy compression
    • HEIF is now the default
  • New lossless compression: Apple Deep Pixel Image Compression
    • Decode time improvement
  • Test with App Thinning (Distribute Ad Hoc -> All compatible device variants)
  • Design and Production
    • 🚨 DO NOT STRIP color profiles in assets - keep them as source artifacts
    • Asset catalogs eliminate them during build time
    • Use consistent color settings for all design files (use sRGB (8bit) or P3 if fancy)
  • Sliced images are cropped during build time -> no need to make sliced assets as small as possible (they are way easier to work with, if they are larger)
  • 🚨 “Preserve Vector Data” images only fall back to the vector data, if the displayed image larger than the natural size
  • Fuzzy edges (half pixel) are still a thing (even with retina) -> create 2x PDFs and drop it in the 2x-slot (see 31:40)
  • Asset catalogs support namespaces - who knew?
  • Interesting option: divide assets into performance capability groups (i.e. RAM instead of DPI) (see 36:54)
    • Use capability specialized data asset PLIST to do hardware feature detection
  • Sprite Kit atlases can be used with UIImages

⭐️ Images and Graphics Best Practices (219)

  • Create downsampled images, if the full resolution is not needed to preserve RAM (see 11:10 for code) - also see 416
  • Not only prefetch images (esp. UICollectionView/UITableView) but also decode in a background thread (but only a background thread: don’t disp_async in a frenzy, because too many threads will be spawned. Instead have a special serial dispatch queue).
  • Preserve vector data for icons (only tab bar?): if dynamic type is set to very large, and a finger is kept on an icon, an enlargement HUD is displayed (and we don’t want that image to be blurry)
  • Custom UIKit drawing
    • Overriding drawInRect(): requires a backing store (CALAyer buffer to be displayed in frame buffer) the size of the view -> requires RAM
      • composition of views with possibly CALayer properties set may not require a backing stores -> save RAM
      • rather than using maskView/maskLayer use an image (compile time vs build time)
    • 🚨 DON’T use UIGraphicsBeginImageContext() -> use UIGraphicsImageRenderer

Testing Tips & Tricks (417)

  • Wrap iOS framework dependencies by protocols to be able to cleanly inject mocks (without the need to subclass) (23:51)
  • RunLoop.current.run(until: Date(timeIntervalSinceNow: 10)) to exercise the run loop for 10s and then continue in the test
  • Try to eliminate all time dependencies during Unit Tests
  • 🚨 To run tests as fast as possible, ensure that the app launches fast (for example skip any UI creation - it’s only in the way anyhow)

Embracing Algorithms (223)

  • Swift: startIndex... is the same as startIndex..<endIndex
  • “No Raw Loops” - write an algorithm instead and move the loop there
  • “It takes practice to look past the implementation details and discover algorithms”

Debugging

💎 Advanced Debugging with Xcode and LLDB (412)

  • Swift debugging improved
  • 🎉 Xcode property: Open a hit breakpoint in a Debug tab instead of reusing the active tab (Behaviors -> Running -> Pauses -> Switch to Tab named “Debug”)
  • Entries below breakpoints indicate the resolved breakpoint location (esp. interesting for symbolic breakpoints)
  • In ASM code use pseudo registers $argN to access function registers without memorizing the calling conventions
    • for ObjC: $arg1 = object, $arg2 = selector (needs to be casted to SEL)
  • Use a breakpoint to set a breakpoint (yo dawg) -> need to use breakpoint set command
  • The current instruction highlight actually has a grab handle and can be moved
  • Watchpoints! Access via variable view context menu
  • To evaluate ObjC in a Swift frame, use -l objc, but this creates a new expression context that does not inherit the variables form the Swift frame -> use backticks to pre-evaluate in the current frame (self.view) (27:43)
  • po <pointer> does not work in Swift, because it treats them as numbers -> use ObjC context
  • lldb convenience: Enter repeats previous command
  • Summary slides at 33:28 and 34:04
  • If p[o] fails, use frame variable <name>
  • cmd+click is a system wide gesture to perform an action without activating the window (useful to activate the view debugger without dismissing a popover)
  • View Debugger
    • Select view and choose Navigate -> Reveal in Debug Navigator (shift+cmd+d)
    • Bottom button to show constraints
    • Select any object (view or constraint) and Edit -> Copy gives casted pointer to selected object (also works in memory debugger)
    • Backtrace of a constraint shows where it was created -> needs malloc stack logging enabled (Schema -> Diagnostics -> Malloc Stack -> All)
    • cmd+click to click through views (why not the same as in IB?!)

⭐️ Measuring Performance Using Logging (405)

  • Unified Logging and Activity Tracing (WWDC 2016 - 721)
  • Use signposts to measure performance: mark beginning and end of operations and analyze in Instruments
  • Log category: Name for group of operations, Signpost name: An operation to measure, Signpost ID: operation ID
  • Metadata string parameters/placeholders can be annotated with “engineering types” to tell Xcode and Instruments how to analyze(!) and display a value: more info in the Instruments Developer Help Guide (Help Menu in Instruments)
  • Change Instruments recording mode (alt+record button) to lessen performance impact
  • Points of Interest to annotate events (not periods)

Practical Approaches to great App Performance (407)

  • Use Time Profiler Instrument
  • Use Filters at the bottom
  • Optimize app launch times
    • test warm launches first (kill app & start), then cold launches (where not even dependency libraries are paged in) -> need to reboot device
    • Strive for 500-600ms (same time as the icon zoom animation)
    • do as little work as possible in the initializers and use viewDidLoad instead

Understanding Crashes and Crash Logs (414)

  • Always upload dSYMs
  • Use “Download Debug Symbols” button in organizer for bitcode/server compiled apps
  • Crash logs for terminations by the OS are available in the devices window and do NOT (always) show up in the Organizer
  • Memory error crashlogs might(?) contain malloc-region -> see if address is inside this range and check range modifiers (rwx)
  • More detailed info on how to debug memory crashes
  • Identify multithreading bugs by having multiple crashlogs where the stack traces of two threads look similar (if it’s not a multithreading issue this would be very unlikely)
  • Thread Sanitizer can find (possible) multithreading bugs -> run from time to time
  • Always name Dispatch/Operation Queues and Threads to make crash analysis/debugging easier

What’s New in Energy Debugging (222)

  • Location energy consumption is accuracy and frequency dependent
  • UI above video prevents optimizations -> auto hide controls
  • Writing Energy Efficient Apps (WWDC 2017 - 238)
  • Xcode Energy Logs & Organizer
    • 🚨 High CPU in background (>80% for >1min) kills app
    • One can rename energy (and bug?) reports

💎 iOS Memory Deep Dive (416)

  • Exceeding the allowed memory footprint raises EXC_RESOURCE_EXCEPTION
  • Xcode memory gauge now shows the value the system grades the app against (how much of the allowed limit is used)
  • Images
    • Downsampling: ImageIO uses streaming IO and prevents the need to decode the complete source image (also see 219)
    • Recommendation: unload large resources you cannot see (don’t display large images while app/VC in the background)
  • Memory graphs
    • Check for number of objects (unexpected multiple VCs?)
    • Check size of objects
    • Which part of an app uses the bulk of the memory?
      • use vmmap --summary *.memgraph -> check for dirty + compressed to find “big numbers”
      • vmmap --verbose *.memgraph | grep <identifier from previous step>
      • malloc_history *.memgraph --fullStacks 0x<starting address of vm region> (needs malloc stack recording enabled (Live objects only recommended))
    • 🚨 The simulator is NERVER going to run out of memory -> test on device

UI/UX

💎 Designing Fluid Interfaces (803)

  • Reduce latency, it’s a killer
  • Make gestures redirectable (change mind after gesture is started -> no need to complete gesture)
  • Start new interactions while animations of previous are still running
  • Spatial consistency (also see Spatial Interfaces)
  • Reward momentum with overshoot
    • tap should not bounce
    • flick should
  • Code snippet to calculate travel distance!
    • (initialVelocity / 1000) * decelerationRate / (1 - decelerationRate)
    • Use UIScrollView.DecelerationRate.normal as decelerationRate
  • Use learned cues to indicate possible interactions

⭐️ Adding Delight to Your iOS App (233)

  • Layout driven UI
    • do everything in layoutSubviews
    • mark dirty with setNeedsLayout whenever anything view related happens
    • trigger animations by animating layoutIfNeeded
  • App launch time optimization
    • Dynamic linking can take 40-50% of the time
    • UI Construction
      • Avoid writing to disk in will/didFinishLaunching and didBecomeActive
      • Avoid loading large data sets
    • First Frame
      • Only prepare the UI you need
    • Measure using the Time Profiler. Always multiple runs
  • Smooth scrolling
    • 🚨 Use Core Animation instrument to measure the frame rate
  • 🚨 It’s possible to handoff from App to Web! Aaand the other way around
  • LLDB
    • switch language mode: settings set target.language objective-c
    • expr dump(obj) == po for Swift
    • OjbC: -[NSObject _ivarDescription]

Localization

⭐️ Creating Apps for a Global Audience (201)

  • Layouting
    • design for very long and very short texts (& directions) -> for directionality use leading & trailing constraints
    • Schema options -> Application Language -> Pseudolanguages
    • IB Assistant Editor -> Preview -> Select Language in the bottom right
    • 🚨 Centered labels only need a leading constraint, no trailing oO
    • 🎉 Xcode: Bottom button for “embed in” (instead of only UIStackView)
  • Font cascade lists to specify fallback fonts if a font does not support a requested script (custom font without Chinese Characters)
  • 🚨 Only a few scripts support italic - bold works in all
  • Bold on a character level does NOT work in all languages (Arabic & Hindi) -> use color (to highlight a search term in search results for example)

New Localization Workflows in Xcode (404)

  • Xcode Localization Catalog: a container for xliff and other resource files

Accessibility

⭐️ VoiceOver: App testing Beyond The Visuals (226)

  • Move finger over screen and VoiceOver reads what’s under the finger
  • Flick left/right to go to next/previous item
  • Two finger tap to pause
  • Double tap to tap an item
  • Two finger quick Z gesture to cancel a window/popover
  • Add semantic information like heading and button (with UI element traits?)
  • Support the Rotor
  • Test with screen curtain: three finger double tap
  • apple.com/accessibility & developer.apple.com/accessibility/ios

Deliver an Exceptional Accessibility Experience (230)

  • Contrast
    • Recommended Minimum Contrast Ratio: 4,5:1
      • WCAG 2.0 guidelines (w3.org/TR/WCAG20)
    • Color Contrast Calculator (Accessibility Inspector in Xcode)
  • 🚨 Accessibility Inspector has an Audit function!

Swift

⭐️ What’s New in Swift (401)

  • Swift 4.2
  • CaseIterable protocol to iterate over all enum values (compiler will generate .allCases property)
  • Sythesizing Equatable and Hashable implementation if all members of a struct are equatable/hashable
    • also works for generic types (through conditional conformance)
  • 🚨 Object hashes are seeded by process attribute -> change between app launches!
  • New random API: [Int|Float|...].random and also Collection.randomElement() and .shuffled()
  • #if canImport(<Framework>) build configuration directive
  • #error and #warning to produce a compile time error/warning
  • #if hasTargetEnvironment(simulator)
  • Set “Exclusive Access to Memory” build setting to “in All Builds”, if app is not performance critical

⭐️ Using [Swift] Collections Effectively (229)

  • Slices are zero-overhead views into their base collections
  • Beware: Slices keep their collections alive! Copy, if you want to free the memory
  • Use lazy collections to defer/avoid the creation of large collections
    • however they are re-evaluated for every access
  • Avoid mutable collections (less error prone) and try to imitate mutation with slices and lazy evaluation

Swift Generics (406)

  • Specialized implementations only override protocol extensions, if the method is part of the initial protocol (and the protocol extension becomes a default implementation)

Siri Shortcuts

Introduction to Siri Shortcuts (211)

  • Custom Intents!
  • Settings -> Developer -> Display Recent Shortcuts/Display Donations on Lock Screen -> Home Screen -> Search -> see donations that just happened
  • No real voice recognition of parameters! Only commands for previously happened things
  • Scheme run option (of the Intents extension): Siri Intent Query to automatically trigger the given phrase
  • Make sure to delete NSUserActivities & Donations when necessary (content no longer there or privacy relevant (logout))
  • 🎉 Media Shortcuts: INPlayMediaIntent to play (pause?) media content

Building for Voice with Siri Shortcuts (214)

  • Shortcuts can provide a custom response that will be read by Siri
  • Rules for info in donated Siri intents/NSUserActivities and suggested invocation phrases

Notifications

⭐️ What’s New in User Notifications (710)

  • Create custom groups using a “thread identifier” (can be turned off on per app basis)
  • Notification Content Extension
    • Custom UI for Notifications
    • Option to customize displayed actions (dynamic, multi step, ..)
    • Allowing user interaction with notification content
  • 🚨 Notification Management: API to offer “Configure in " button in the notification management sheet (to give the user an option to finely control notifications instead of turning them all off). There's no reason not to offer this!
  • Provisional Authorization: Opt in -> users will NOT get prompted for authorization. However! The notifications will only be shown in Notification Center (not on the lock screen) and they will not play a sound.
  • Critical Alert: Health, Home, oder public safety related that require the user to take immediate action. They bypass everything and will make a sound.
  • Using Grouped Notifications (711)

ARKit

What’s New in ARKit 2 (602)

  • Saving and loading scanned 3D point clouds (world maps)
    • “world” needs to be static and well-textured
  • Sharing of maps -> multi user applications
  • Capture the real environment as cube texture map to be used for reflections
  • Tracking of 2D images (as 3D markers)
  • Detection of not moving 3D objects. They also need to be scanned beforehand
  • Face expression detection -> can be used to animate custom characters
    • New: Independent eye/gaze tracking
    • New: Tongue out/in boolean

Understanding ARKit Tracking and Detection (610)

  • Orientation Tracking for augmentation of far away objects
  • Group tracked images to increase the max. number of trackable images
  • Images can be used as an absolute coordinate space to create shared experiences

Object Tracking in Vision (716)

  • Can detect faces, face features, bar codes, text rectangles, horizons, rectangles, …
  • Recognizes faces in all orientations
  • TODO: Find out what //#-code-listing(SetInitialCondition), //#-end-code-listing and /// - Tag: PerformanceRequests do in Swift code

and other frameworks

What’s New in Cocoa Touch (202)

  • 🚨 To improve scroll performance (and energy consumption -> 219), implement PrefetchDelegate
  • Tag password fields as such to support iOS 12 password suggestions & management
  • Safe area inset == rectangular content area that will never be clipped

Using Accelerate and simd (701)

  • Framework with mathematic algorithms: DTC, FFT,
  • simd: simplified vector & matrix programming
  • vImage: Image processing
    • Convert between RGB and YCbCr -> interesting for gradients and gamma correction?
    • Convolution: Blur
    • Live video effects

Introducing Network.framework (715)

  • Modern alternative to sockets
  • Supports Bonjour

Introducing Natural Language Framework (713)

  • Advancement of NSLinguisticTagger
  • Custom NLP models
  • Can be used to create more relevant search suggestions

Core Image Performance Prototyping and Python (719)

  • PyCoreImage: Python bindings for Core Image

Core Data Best Practices (224)

  • Recommended schema configuration at 25:02
  • 🚨 General advice: If you file a bug, attach a sample project with tests that communicate the expectations (see also Writing good bug reports)

Web

What’s New in Safari and WebKit (234)

  • 🚨 UIWebView is now officially deprecated

💎 Strategies for Securing Web Content (207)

  • HSTS (Strict Transport Security)
  • UIR (Upgrade insecure Requests)
  • Use only secure cookies
  • Cross-Origin Lockdown
    • Subresource Integrity: add integrity=<hash> to <script> -> make sure to provide a fallback
    • Content-Security-Policy HTTP Response Header: specify where to load scripts from AND prevent iFraming!
  • HttpOnly cookies: Prevent cookies from being readable from JS
  • SameSite cookies: Only send this cookie if NOT embedded/iFramed
  • Cross-Origin-Resource-Policy: Prevent other domains from loading resources (images/scripts) (WebKit only so far - details may change!)
  • Cross-Origin-Window-Policy: Prevent other domains from opening a new window with my site (WebKit only so far - details may change!)
  • 🚨 Sepctre attack prevention: UIWebView is vulnerable and opens the whole app to the attack -> use WKWebView!

Introducing MapKit JS (212)

  • What it says on the tin…

Misc

⭐️ Automatic Strong Passwords and Security Code AutoFill (204)

  • Needs .textContentType to be set on text fields
  • iOS 12 asks to save passwords on app logins (needs associated domains)
    • need to remove login fields from the view hierarchy to indicate a successful login - but don’t clear them yet! oO
    • does not work with WKWebView Logins
  • iOS 12 will suggest usernames and strong passwords on sign up forms
    • same rules apply
  • Use .passwordRules (or directly in IB) to specify requirements -> use Apples “Password Rules Validation Tool” (https://developer.apple.com/password-rules) to verify
  • Use text content type oneTimeCode to support Security Code AutoFill
    • 🎉 Also works in Safari via handoff (wooho!)

What’s New in App Store Connect (301)

  • Previously iTunes Connect
  • App Store Connect API to automate Provisioning, User Management, App Delivery, Beta testing and Analytics
    • Will start “this summer”
    • 🎉 API to download financial and sales reports!
  • One place to manage users! The App Store Connect website -> Rules will change
  • 🎉 TestFlight Public Links: URL to invite people to the beta
  • App Store Connect app
  • Time based free trials for paid apps (actually only conventions for IAPs)

Better Apps Through Better Privacy (718)

  • Give privacy guarantees to build trust and guide throughout the dev cycle (“We cannot read your messages”, “Analytics does not identify you”, “We only retain aggregate usage data”)
  • Try to balance three sliders: De-identified, Aggregation, User Control (or also Coarse and On-device) (10:13)
  • Use out of process pickers for contacts, camera and photos to avoid permission prompts
  • 🚨 Delete OS content (Siri Shortcuts, Notifications, Passwords), when user deletes it from the app
  • Use DeviceCheck to store 2(!) bits across reset and erase install

⭐️ Optimizing Your App for Today’s Internet (714)

  • 🚨 TLS 1.3 is coming -> test with iOS 12 seed
  • 🚨 Certificate Transparency: From late 2018 every TLS certificate needs to be CT-validated
  • NSURLSession objects are expensive -> use sparingly
  • Set .waitsForConnectivity to prevent request fail and wait instead. This is better than connectivity checks
  • Advances in Networking Part 1/2 (WWDC 2017 - 707, 709)

Best Practices and What’s New with In-App Purchases (704)

  • Introductory prices and free trails for the beginning of a subscription
  • Free trials for paid apps: hacky solution with two IAPs - naming conventions apply
  • 🎉 Deep link into App Store to write a review (?action=write-review)
  • There’s all kinds of sandbox stuff to test IAPs
    • 🎉 iOS 12 has an option in the Settings app to specify a separate sandbox Apple account (no more signing out to test IAPs!)

What’s New in Search Ads (304)

  • 6 more App Stores: Japan, Korea, Germany, France, Italy and Spain (previously US, England, Australia, New Zealand, Canada, Mexico, Switzerland)
  • Assign screenshots to campaigns to show images matching the search term

AVSpeechSynthesis (236)

  • Synthesize speech directly on iOS device
  • One voice for each supported language
  • Siri voices are NOT available
  • Users can download higher quality voices
  • To customize pronunciations use the Pronunciation editor in Settings -> General -> Accessibility -> Speech -> Pronunciations to create IPA notation

Tips for Great Maps (810)

  • Maps are abstract - no need to closely represent the real thing
  • A map needs to answer these questions:
    • What is where?
    • What do thins mean at just a glance?
    • Keep asking users throughout the design process

macOS

What’s New in Cocoa for macOS (209)

  • 🚨 No need to set .wantsLayer = true (if linking against 10.14)
    • don’t override drawLayer/drawInContext but drawRect
    • NSView-[un]lockFocus doesn’t work anymore -> use drawRect
  • 🎉 NSGridView-Support in IB

Introducing Dark Mode (210)

  • macOS has accent colors now
  • Graphite Accent Color disables background color tinting

Your Apps and the Future of macOS Security (702)

  • New Notary Service: Apple signs your mac app, unsigned apps won’t run. It’s optional for now, will become mandatory in the future.
comments powered by Disqus