body
can return a scene (vs only some View
before)
WindowGroup
for multiple windows (macOS and iPad)Settings
DocumentGroup
.commands
modifier adds custom menus and keyboard shortcuts.LazyVGrid
and LazyHGrid
(collection views?)LazyVStack
and LazyHStack
.toolbar
modifier.help
modifier to tooltips on macOS (a11y for a11y on iOS)ProgressView
(spinner, progress bar)Gauge
.matchedGeometryEffect
for better transitionsContainerRelativeShape()
to match modifier to parent.recordName
and modifiedAt
need to be added in CloudKit dashboard for public databases.canUpdateRecord
used to check if records can be modifiedcanDeleteRecord
will return false if record is stored in public database (changes won’t be propagated to other devices) - use something like isTrashed
property on object.@State
would create a new SoT.@Binding
is correct way (to be able to write from subview)$
needs to be used to pass the binding type.ObservableObject
objectWillChange
is the only required method.@Published
to properties that might change (how does this work for CoreData?)@ObservedObject
will be notified on objectWillChange
(will change so SwiftUI can collapse all changes).@StateObject
(new in iOS 14) - SwiftUI owns the ObservableObject and is run just before body is called.@EnvironmentObject
allows you to use an object in a deep down subview without a lot of boilerplate (i.e. passing it down through each view)Identifiable
.List()
if entire list is data driven, but use ForEach()
to add other items to the list (like a footer).contentMode
show instantly in preview!struct
body
property.@State
@Binding
is read-write derived value (use for views that don’t own the object).withAnimation
to animate a property change.@StateObject
for a class that acts as a store.@ObservedObject
is an object that is passed into a view that needs to be observed..environment
way to set contextual information that flows down the view hierarchy (note that .environment
/@Environment
is used for key paths which already exist and .environmentObject
/@EnvironmentObject
for custom objects/properties).AVAggregateAssetDownloadTask
allows you to set preference for which audio and subtitle renditions to download.URLSessionConfiguration
and identifier used when setting up task.AVFoundation
/AVPLayer
passed as a material.Ok, so not a lot of information, but it is a short video. Specific to using media intents (audio) on Apple TV and HomePod. Basically media intents run on those platforms now, and there’s one new feature, alternative results.
successes(resolvedMediaItems:_)
(plural version of what you would implement before)Honestly, I had never even looked at the Xcode Organizer (window menu in Xcode), so learned that this exists! Short video about some of the changes in Xcode 12, mainly UI refresh and 2 new metrics.
10 ms/s - dropped frames
Overview of how to get started with HealthKit. Very basic, but great if you’ve never done anything with HealthKit before (like me!)
HKHealthStore
- entry point to HealthKit API (one instance used throughout application).HKObject
(parent type which includes things like device that recorded it, unique identifier for data, application that wrote it).
HKSample
HKQuantitySample
- used for any quantity types (walking with miles, hearing with db level)HKCategorySample
- list of values, no unit (an event like brushing teeth)HKWorkout
- multiple valuesHKCharacteristic
- static stuff like birthday, blood type.HKObjectType
HKStatisticsQuery
- get data based on certain conditions
HKSampleQuery
for retrieving other data.
HKAnchoredObjectQuery
, HKActivitySummaryQuery
(activity rings), HKWorkoutRouteQuery
@main
(SE-0281)Not a lot of tactile information on symbols, but a lot of recap and lots of information for how to use for designers.
UIImage(systemName:)
SiriKit
and NSUserActivity
NSUserActivity
, app needs to open on device, will not work on watch because it’s a jarring experience to open an app on a different device..continueInApp
cannot be used, need to support background execution).So much exciting stuff I didn’t know about from the keynote!
INShortcutAvailabilityOptions
)Session is specific to Playgrounds in Xcode (not standalone macOS, iOS app). Pretty interesting, nonetheless. I love the idea of being able to include a Playground with your package for documentation and tutorials!
The second half of the video was interesting. He demo’d CoreML and vision framework to identify fruit all within Playgrounds. This might also work on iOS and macOS app? 🤔
defaultContentConiguration
always returns a fresh configuration.
contentConfiguration
property.configuration.updated(for: state)
to update the state (original configuration with new state)updateConfiguration:
to update configurations and any other cell properties before displayed (gives you the state so you can update cell based on current state properties)Not a lot of useful information in this video other than to introduce the idea of putting custom views into the Xcode library. It’s a fun watch!
Overview of all the new additions to collection views as far as lists (think UITableView). There’s lots of neat improvements including self sizing cells being default and just generally more dynamic and flexible with sizing.
preferredLayoutAttributes:
on cell subclasses if you still need set height/widthNSCollectionLayoutSection
.firstItemInSection
can be set by config so first item is the header (data must be aware because now first item is header)Good overview of all the new stuff for UICollectionView this year. New stuff for diffable data source, lists (collection view looks like a table view!), and cell configurations.
UICollectionViewDataSource
UICollectionViewLayout
This session is all about creating an entire SwiftUI app using nothing but SwiftUI. Even thought I’m not really doing a lot of SwiftUI, interesting to see how they talk about the hierarchy between App, Scenes, View. Also this app is only a few lines of code (entire app!) and works on macOS, iOS, and watchOS!
WindowGroup
(there is also DocumentGroup
for document based apps, they talk a little about this at the end of the video).@main
attribute designates a struct as the main start point for an app (no longer need a main.swift file).I was hoping I could get a feel for what it’s like to develop on tvOS, but not really. Just talks about some of the new SwiftUI goodness and how it can be applied to a tvOS app.
.buttonStyle(CardButtonStyle())
contextMenu{}
modifier.isFocused
environment variable.@Namespace
modifier to provide a unique id (used in example to change an environment variable in just one view.Almost didn’t watch because they started out saying it was more of an advanced course on background execution, but not really. Great overview of the different background modes and how the system prioritizes tasks based on a number of factors.
sessionSendsLaunchEvents
requests the system launch app after background transfer is complete.isDiscretionary
allows transfers to be deferred (when phone is plugged in, etc.)isDiscretionary
and treat as true (only works on foreground)Nice overview of using Playgrounds on iPad. Also a nice overview of creating a simple SwiftUI view.
UIColor
.Not a lot of in depth information on creating a Playgrounds book, just comparing the differences between Mac and iPad. Second half of the session is a demo where a button is conditionally shown on iPad for an ARKit experience (cool that you can do ARKit in Playgrounds!).
UIRequiredDeviceCapabilites
to target capabilities (ARKit, Microphone, WiFi).Not really applicable unless you have a Yelp-like app, but interesting to learn about how App Clips are all separate apps from the user perspective, but all just open your app. Developer is responsible for handling different “skins” of the app for each business.
targetContentIndentifier
in user defaults should be used to send notification to the correct app clip experience (all separate apps)PHPickerViewController
gets config when initialized (images vs video, etc.)PHPickerViewController
).AssetsLibrary
is deprecated, use PhotoKit
(or even better, new Photos picker if you don’t need the extra stuff)..systemSmall
, .systemMedium
, .systemLarge
).StaticConfiguration
(activity) vs IntentConfiguration
(reminders)UISlider
- small UI tweaks, matches macOS more.UIActivityIndicatorView
- small UI changes, simpler looking.UIPickerView
- minor changes, preference is to use UIMenu
if it makes sense (see below).UIPageControl
- small UI tweaks and allows unlimited pages.UIColorPickerViewController
presented as a sheet or popover
UIDatePicker
- new calendar UI, compact or full options. No more for date/month/year!UIMenu
)
UIButton
and UIBarButton
now have a menu
property to easily add a menu.showsMenuAsPrimaryAction
causes the button to show immediately on touch.UIDeferredMenuElement
for dynamic menusUIAction
)
SKOverlay
to be lead to full app (new).