This is all that's needed to get started with SwiftData.
Yes, everything can fit on the screen.
No, no more model definition files.
No more PersistenceController.
I have yet to figure out CloudKit & App Groups.
New Indie Dev Stack:
UI: SwiftUI
Persistence: SwiftData
Animated Icons: SF Symbols
Paywall: StoreKit
Every WWDC it becomes easier & faster to make apps. This year, we got Paywalls, Persistence & Animations.
Some more tidbits I picked up during the keynote:
- SwiftUI Custom Animations
- Animated SF Symbols
- Improved MapKit with SwiftUI
- Native Swift Predicates
- Time in Daylight API
- SwiftData
- StoreKit Views
- Custom Workout API
- Inline predictive text API
- Embedded
It's time for another design remake!
This time I remade this Calendar in about 20 minutes, as always using nothing but
#SwiftUI
.
Code on my Github:
Note: The Timeline at the bottom is hardcoded, making it dynamic could be an interesting challenge!
Programmatic scrolling is actually super easy in
#SwiftUI
!
I made a video about this a few months ago, but these are the only 3 things you need to do!
This is all that's needed to get started with SwiftData.
Yes, everything can fit on the screen.
No, no more model definition files.
No more PersistenceController.
I have yet to figure out CloudKit & App Groups.
Here's a nifty little helper that makes working with CoreData much nicer in SwiftUI.
1. Create an overload on ?? for Bindings of Optional<T>
2. Directly bind to your ObservedObject's optional attributes, e.g. in a TextField
3. Don't forget to save the context after changes
A quick reference for the default SwiftUI Fonts.
The number represents the font size in points for the default scale on an iPhone.
Thinking of making a menu bar app just with this in it, as I always mix up the order of these fonts.
I just hit 6,000 on Twitter and 4,000 on Youtube - thank you WWDC π«Ά
If you're interested in practical examples for everything new in WWDC23, head over to and subscribe.
All my content is free and I try my best to make it high-quality.
π Stay focused while working on multiple projects, plan out your releases and schedules tasks with LaunchBuddy.
π Get it for free:
LaunchBuddy is out now! Retweets & Reviews are highly appreciated. β€οΈ
One year on the App Store as a student/indie developer:
- 12 (small-medium-large) apps
- 227k impressions
- 4.3k downloads
- about 4k sessions
- $265 raw profit
- $180 spent (icons & developer account)
(excludes LaunchBuddy)
π₯³ I'm giving away 5 promo codes for Forge as a thank you for 1k followers!
How to enter: Like or Retweet
Forge is a marketing image generator that I made for indie developers. It lets you create ASC/social media images for your app in just a few seconds.
Develop for visionOS
- Windows (SwiftUI Scene)
- Volumes (SwiftUI Scene)
- Spaces (contains windows, volumes & 3d objects)
- iOS & iPadOS apps are displayed as windows
- SwiftUI & UIKit for UI
- RealityKit for 3D content
- ARKit to understand 3D space around the user
- Add
visionOS app icons consist of 3 image files:
- background
- layer 1 (base)
- layer 2 (object)
The system handles animations etc. automatically, so make sure your icons support this setup.
How are you handling dependency injection in your iOS projects? Personally I just added
@twannl
's &
@v_pradeilles
's solution to another project.
Find my version of it on Github:
Thanks to Swift 5.5 you now don't always need a DateFormatter.
Instead you can use the new .formatted() modifier on a Date directly:
`date.formatted(date: .long, time: .omitted)`
Want a fancier navigationTitle in
#SwiftUI
?
You can add a ToolbarItem with a placement of .navigationBarLeading or .principal instead, which lets you fully customise what's shown.
As I already talked about I am working on a new developer app at the moment. It's called LaunchBuddy and helps you structure your releases and launches across all of your apps/projects.
I will use this as an ongoing thread talking about updates & ideas.
Did you know that you can change the order of Views in a ZStack using `.zIndex()`?
I will be using this for a future Forge update, where you can move elements to the back and front as you'd like.
Let's kick things off by building a full app with SwiftData and tons of the new iOS 17 APIs.
πΉ
Today's lesson 1 covers SwiftData, including Relationships and unique attributes & NavigationStack.
I don't use MVVM in my personal projects anymore.
But last time I mentioned this, I got very mixed comments.
So I made another video clearing up the topic with code examples & explanations regarding CoreData with & without MVVM.
Watch here:
Last year, I built a solution to creating 100% customisable & localisable App Store Screenshots with SwiftUI.
The process is completely automated - no more Simulator Screenshots and Figma/Sketch needed!
Just make your designs in SwiftUI.
Launching soon!
LaunchBuddy is π TODAY!
Get for free (lifetime!) for today's WWDC start.
βββββ
Please take a second to leave a rating as a thank you β€οΈ
I frequently get asked how you can create "half height" sheets with SwiftUI.
Here's the solution: An API introduced at WWDC22, available in iOS 16 and up.
I'm currently running TikTok, Youtube & Reddit Ads for LaunchBuddy. (Instagram soon as well)
This is not only for my own education, but also to make a video on the topic so other indie developers can benefit from it.
Obligatory LaunchBuddy link:
TIL: You can add `.animation()` to Bindings in SwiftUI to enable implicit animations when the value changes.
`Toggle("My Label", isOn: $myBoolean.animation())`
Found in this quick HWS article:
A quick reference to programmatic navigation in iOS 16 & SwiftUI.
- Setup enum for navigation states
- Add value to NavigationLinks
- Empty array to pop to root
- Add arbitrary enum cases to programmatically navigate (multiple layers)
Intro Video:
πLaunchBuddy is now available for iOS!
Get it for free:
LaunchBuddy makes it easy to stay on track with your app releases & tasks.
A new macOS version is also available (and needed to enable iCloud Sync).
I often build apps that have state depending on the current day. (like SickDays, where I check if the user has already logged their health today)
This little ViewModifier refreshes a View's body when the app becomes active & it's a new day.
Also made a quick video about this example:
This surely makes things easier. Next we'll have to look into MVVM + SwiftData - does it make more sense than it did with CoreData? I have a feeling that SwiftData wasn't made with MVVM in mind, but we'll see.
Hitting a 1/10 of Youtube is a nice feeling, especially after some rather unsuccessful videos in the past weeks.
Learn about alternatives to `Spacer()` here:
This is how easy it is to create shortcuts for iOS 17.
`\.$appTitle` is just a parameter of `CreateAppIdeaIntent`
I just love the AppIntents framework...
Are you e.g. sharing your UserDefaults with an App Extension (like Widgets)?
You can use the `.defaultAppStorage` ViewModifier to make sure it's used everywhere in @.AppStorage.
iOS 15 introduced the `dismiss` EnvironmentValue, which behaves the same as `presentationMode.wrappedValue.dismiss()` while being shorter and easier to read.
Just spent around 15 minutes to build this little menu bar app.
It's an easy way for me to copy links that I need daily (for tweets, etc.).
Thinking about making a little video about it, is there any interest?
π Β Iβve been hacking away at a brand new developer app for the past week and itβs finally out.
XCLocalizer is a tool that automatically extracts Strings from your SwiftUI code and translates them to any language youβd like!
Try it for πΒ β
Creating your own EnvironmentValues in
#SwiftUI
is actually super easy and allows you to pass data through a View hierarchy without *actually* passing it to another View.
It's finally time for the video I've been looking forward too since I first had the idea a few months ago!
Thanks to everyone who invested time to make this happen π
Do you want to get started with building apps for visionOS?
π₯
Here's my playlist on the topic! We're building a simple SwiftUI app for the new platform.
This playlist will be updated with new lessons in the future.
Is it only me or is there not much new for devs this WWDC? I feel like the SwiftUI additions are small (but nice!) and the only "big" change is to AppIntents, which we can't use in the iOS beta yet.