Alright, might be time to abstract #SwiftData in my app. Who has the best example? Should I use a ModelActor? Would a class holding a ModelContainer be sufficient if I create a new ModelContext inside the CRUD functions? #iosdev#swift
This is the 2nd in the 3 part #SwiftUI Photo Picker/Camera series.
Create a viewModel and view to either update or create new objects for your data store and use the #PhotosUI PhotoPicker for choosing a photo and saving to #SwiftData.
In an app of mine I use #SwiftData and 2 @model structures. I register both normally and can use them. However one of the Models behaves very unstable: sometimes the data is saved, sometimes – not. After updating to new TestFlight version it’s always gone. Any ideas why?
This is the first in 3 part #SwiftUI video series where I show you how to add a photo from your photo album with a photo picker or choose, and use a camera to take photos and persist those photos to a #SwiftData data Store. Next videos on Wed & Sun https://youtu.be/T7wf4DGPCHs
◉ Fast Tracker — my simple, reliable and privacy-centric Intermittent Fasting Tracker — has been updated with Siri/Shortcuts Integration, Fasting Zone and Fast Reminder Notifications, and more.
It's now easier than ever to start and stop a fasting session… you don’t even have to open the app!
In this final video in the #MapKit with #SwiftUI and #SwiftData series we complete the application by adding in MapControls and learning about map scope. We give the users a style choice in how they want to present their map views; satellite or standard, with or without traffic. https://youtu.be/9Lmb6HoHrm0
In this 9th video in the #MapKit with #SwiftUI and #SwiftData series learn how to display a route between your current location and one of your selected markers. Determine the time to walk or drive as well as get by step directions. https://youtu.be/yVMvOXGMd_Q
Using #SwiftData to update models from both the app and the widgets is so good but I struggle with a small problem. If I open the app, then send it to background, update model using widget action and then open the app again – the model there will be unchanged. What do I do wrong?
As far as I understand the Intent in the widget uses a different model context than the app itself. But how to I sync them then?
This might sound trivial but I just figured it out and I’m so happy to have learned it!
If you’re using #SwiftUI and #SwiftData and you don’t add/delete entries on a certain screen but rather just update the entries themselves – you don’t need to use @Query!
You can load the entries once using context.fetch() and then work with them. SwiftUI will automatically update views when you update the entries but without @Query it won’t make fetch requests EVERY TIME something changes
This is the 8th video in the #MapKit with #SwiftUI and #SwiftData series. In this video we’ll add search capabilities to our user location view and modify the marker location detail view to accommodate our needs.
Fun #SwiftData bug for the day - adding var isDeleted = false to your model looks exactly like a normal persisted property, and can be accessed through queries and everything, but it doesn't get persisted because it shares a name with a property on Model.
In this 7th video in the #MapKit with #SwiftUI and #SwiftData series we will ask for permission and if granted, show the users's location on the map. We implement a new service class that will manage this authorization and deal with errors
The first 4 videos of the 10 part #MapKit with #SwiftUI and #SwiftData series are now out. Check out the playlist and if you want access to all 10 now, buy me a Ko-Fi and I will send you an email with the links.
This is the 2nd video in the 10 part #MapKit for #SwiftUI series. In this video you’re introduced mock data and persistence with #SwiftData so that you can save our destinations and markers for subsequent launches. https://youtu.be/Z3B8z6WhjCE
I am looking for someone who has decent experience with SwiftData. I am running into a couple of things that I can’t make sense of and could really use some help.
I’ve spent some time over the last day breaking out the #postcard backend for my #sharedPhotography app, in anticipation of actually finishing it. I can’t enable international printing until I switch to lob.com, and I can’t switch to Lob until I reconfigure the layout mechanism to accept a configuration for fulfillment.
The real fun will be when I bring this back into #swiftui to rebuild on device real time preview.
A plethora of newness: fun flippable exploration of cards, new #SwiftData model that can now store n postcards that you’ve sent previously, onboarding that teaches a la “Super Mario Bros” Level 1-1, and a bunch of other under-the-hood improvements.
Wading in to the SwiftData waters and added saving to a context, and I’m impressed. Gave the app an infinite loop at the view layer and we’ll fix that later.
Doodled a couple candidates for a development and alternate app icon! Someone has to bring a little culture.
Just that tiny bit of progress today but the momentum is what’s important. #BuildInPublic#iOSDev
I’m proud to introduce you to Bike Index: an open-source iOS app for the world’s leading bike registration and recovery service of the same name! Bikes mean everything to their riders: freedom of movement, ability to transport cargo, exercise and empowerment, connecting with nature and the great outdoors. Bike Index helps you recover your bike if it’s ever lost or stolen. Built with #SwiftUI and #SwiftData