Cihat Gรผndรผz Profile picture
๐Ÿ“ฑIndie NAP Developer. Author of @SwiftEvolutionM. Maintainer of @WWDCNotes. Apps: @RemafoX_App, @Twoot_it. 7 more in the works.

Jun 11, 2023, 25 tweets

Hope you had a great week of #WWDC23! ๐ŸŽ‰

As a yearly tradition, I wrote a #SessionSummary tweet with my key takeaways for 23 selected sessions covered on @WWDCNotes.

Get a sense of each session & find ones that pique your interest!
And don't forget to share! ๐Ÿ”

Thread ๐Ÿงต๐Ÿงต๐Ÿงต๐Ÿ‘‡

What's new in Xcode 15:
๐Ÿš€ Smart code completion
๐ŸŒˆ Image/Color Symbols
๐Ÿ’ฌ Auto-extraction of Strings
๐Ÿ—‚๏ธ String catalog + visual editor
โšก Quick Actions โ‡งโŒ˜A
๐Ÿ”– Bookmark line/query
โœ๏ธ Editable Git staging
๐Ÿงช Test report redesign
๐Ÿ“ OSLog in console

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Whatโ€™s new in Swift:
๐Ÿ”€ if/else & switch expressions -> concise code
๐Ÿ“ฆ Param Packs overcome API overload limits
๐Ÿ› ๏ธ Macros eliminate boilerplate
โšก Foundation rewrite -> more performance
๐Ÿ”— C++ interop, like ObjC
๐ŸŽญ Actor executors for custom sync

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

What's new in SwiftUI:
๐ŸŒŒ Spacial: Model3D, RealityView, ImmersiveSpace
๐Ÿ“ฒ Button/Toggle in Widgets
๐Ÿ“… Widget Timeline Previews
๐Ÿ—บ๏ธ Better MapKit
๐Ÿ“Š Pie & Donut Charts
๐Ÿ’ฐ StoreKit views
๐Ÿ‘๏ธโ€๐Ÿ—จ๏ธ @observable macro
๐Ÿ” Inspectors
๐ŸŽฌ Advanced animations

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Meet SwiftData:
๐Ÿ“ฆ @model macro for class
๐Ÿ”‘ @Attribute(.unique) for fields
๐Ÿ” @Relationship for inverses/deletion
โŒ @transient to exclude
๐ŸŒ @environment(.modelContext) context
๐Ÿ” #Predicate & FetchDescriptor in code
๐Ÿ”Ž @query(sort:order:) in view

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Migrate to SwiftData:
๐Ÿค SwiftData & Core Data can co-exist
๐Ÿ› ๏ธ Core Data can create SwiftData code
๐Ÿ’พ SwiftData has implicit save
๐Ÿ”€ Migrate @FetchRequest to @query
๐Ÿ“š Incremental adoption: 2 stacks talking to 1 store
๐Ÿ”„ Changes complex on this mode

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Model your schema with SwiftData:
๐Ÿ—บ๏ธ Use @model to create schema
๐Ÿ”— @Attribute(originalName:) to map across versions
๐Ÿ”€ @Relationship has originalName, too
๐Ÿ“œ Define VersionedSchema enum, put models inside
๐Ÿ“… Order versions with SchemaMigrationPlan

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Meet StoreKit for SwiftUI:
๐Ÿ›๏ธ Store/Product/Subscription views
๐Ÿงฉ Encapsulate logic: load/purchase/L10nโ€ฆ
๐ŸŽจ Customizable style & background
๐Ÿ Start/Completion, purchase task modifiers
๐Ÿ”˜ Buttons: .redeemCode, .restorePurchase, .signIn, .policiesโ€ฆ

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Discover Observation in SwiftUI:
๐Ÿ”ญ @observable is a macro for automating property observation
๐Ÿ”€ Can be overridden manually in specific cases if required
๐Ÿš€ New projects should use @observable
โœจ Simplifies models and views
โšก Performance boost

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Inspectors in SwiftUI: Discover the details:
๐Ÿ” New .inspector(isPresented:) modifier
โ„น๏ธ Shows details of selected content
๐Ÿ’ Familiar to users from Apple apps
๐Ÿ“ Customize width & presented state
๐Ÿ”ง Flexible toolbar placement (in/out content/nav)

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Explore pie charts and interactivity in Swift Charts:
๐Ÿฅง SectorMark(angle:) to create pie chart
๐Ÿฉ Set innerRadius for Donut chart
๐Ÿ“ Put text inside donut using .chartBackground
๐ŸŽฏ New APIs for selection (supports range) & scrolling (both axes)

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Make features discoverable with TipKit:
๐Ÿ”– Create a tip by conforming a type to Tip protocol
๐Ÿ“ Requires title & message
๐Ÿ–ผ๏ธ Optionally asset & actions providable
โ˜‘๏ธ Eligibility based on parameters or events
๐Ÿ”ง Lots of configuration & testing options

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Debug with structured logging:
๐Ÿ“Š OSLog integration
๐Ÿšซ Don't use print โ€“ only for CLIs
๐Ÿ“ Use logger.debug|info|notice|error instead
๐ŸŽจ Nice console output with colors & filterable metadata
๐Ÿ” Right-click: "Jump to Source" & "Hide Similar items"

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Create rich documentation with Swift-DocC:
๐Ÿ“š External type extension support
๐Ÿ‘€ Live preview in Xcode
๐Ÿ“Š @row & @column for flexible layouts
๐Ÿ—บ๏ธ @TabNavigator e.g. for locales/platforms
๐Ÿ”– @metadata support
๐ŸŽจ Theming via JSON file
โŒจ๏ธ Supports โ‡งโŒ˜O

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Design for spatial user interfaces:
๐Ÿ–ผ๏ธ 3-layer App Icon
๐Ÿ”ฒ Avoid opaque window
๐ŸŽจ Use darker/lighter materials
๐Ÿ–‹๏ธ Don't color text, color backgrounds
๐Ÿ‘€ Tap target 60x60pt, button gap 16pt, list gap 4pt
๐Ÿ”€ Navigation -> TabView, Actions -> Ornaments

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Meet SwiftUI for spatial computing:
๐Ÿ”˜ Buttons get hover & tooltip
๐Ÿ”€ TabView expands
๐ŸŒŒ Full Space: 3D Full Screen
๐ŸŒ— No light/dark mode, glass & vibrancy
๐Ÿ”ฒ Volume: .windowStyle(.volumetric)
๐ŸŽฎ Model3D: 3D AsyncImage
๐ŸŒ RealityView for RealityKit

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Elevate your windowed app for spatial computing:
๐Ÿ“บ Simulator: cursor = eye tracking
๐Ÿ“ Content scales dynamically -> use vectors
๐ŸŒˆ Semantic foreground styles & fill colors
๐Ÿ”˜ Place custom views into plain style Buttons
๐Ÿ”€ Use TabView (not sidebar)

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Get started with privacy manifests:
๐Ÿ”’ 3rd-party SDKs document privacy practices
๐Ÿ“ Privacy report helps fill labels
๐ŸŒ Add domains to manifest: system blocks until tracking allowed
๐Ÿ“… Privacy-impacting SDKs list in fall, devs will get email

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Whatโ€™s new in SF Symbols 5:
๐ŸŽจ Configurable animation presets (e.g. bounce, scale)
๐ŸŒˆ Variable color presets (e.g. cumulative, iterative)
โœ๏ธ Custom symbols: use "erase layers" for better animation
๐Ÿš—๐ŸŽฎ 700 new symbols, majority about cars/gaming

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Bring widgets to new places:
๐Ÿ–ฅ๏ธ New locations: Desktop, iPad Lock, iPhone StandBy, Watch
๐Ÿ“ Content margins replace safe area
๐ŸŽจ Use .containerBackground for removable backgrounds
๐ŸŒˆ Visual changes in "vibrant rendering mode" -> react with env var

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Bring widgets to life:
๐ŸŽฌ Animate with .animation, .transition, .contentTransition
โœจ Interactive using Button/Toggle
๐Ÿ”— Actions exposed to widget via AppIntents
๐Ÿ”„ Triggering perform() reloads widget UI
๐Ÿ”– Pass properties to intent using @parameter

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Discover String Catalogs:
๐Ÿ“œ Supersedes .strings(dict) files
๐Ÿ” Strings automatically extracted, code source of truth
๐Ÿ”„ Use LocalizedStringResource to represent / pass around
๐Ÿ”ข Pluralization supported
โš™๏ธ Back to .string(dict) on build for compat.

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Meet Swift OpenAPI Generator:
๐Ÿ“ฆ Package plugin generates types, client, & server code
โš™๏ธ Config & spec via YAML
๐Ÿ” Handles requesting/parsing & more internally
๐Ÿƒ Mocking built-in for easy testing / previews
๐Ÿš€ Makes "Spec-Driven Development" easy

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

Meet Push Notifications Console:
๐ŸŒ Web-based tool
๐Ÿ“ฉ Send, inspect, validate
โœ‰๏ธ Compose notifications with types & payload
๐Ÿ” Analyze why a notification was not received
๐Ÿ”‘ Includes JWT token generator & validator
๐Ÿ“ฑ Even a device token validator

More: wwdcnotes.com/notes/wwdc23/1โ€ฆ

If you found this thread useful, try out my @RemafoX_App!
A Mac app written in #SwiftUI to improve workflows in #Xcode.

Free features:
- Sort Selection
- Multi-line Code
- One-line Code
- Machine-translate via Google/Microsoft/DeepL/Yandex

Get started:๐Ÿ‘‡

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling