jonduenas, to swift
@jonduenas@mastodon.world avatar

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

StewartLynch, to SwiftUI
@StewartLynch@iosdev.space avatar

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.

https://youtu.be/WT7bYj80gJ0

ramzesenok, to random
@ramzesenok@mastodon.social avatar

In an app of mine I use 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?

helge, to random
@helge@mastodon.social avatar

If you need a pre-filled #SwiftData database just to play around w/ SwiftData, I have this Northwind import as an example/prototyping database: https://github.com/Northwind-swift/NorthwindSwiftData

StewartLynch, to SwiftUI
@StewartLynch@iosdev.space avatar

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

kcador, to ethelcain
@kcador@toot.io avatar

◉ 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!

https://apps.apple.com/app/id6470127892

image/png

StewartLynch, to SwiftUI
@StewartLynch@iosdev.space avatar

The entire 10 part #MapKit with #SwiftUI and #SwiftData is now available for free. Watch on YouTube

https://youtube.com/playlist?list=PLBn01m5Vbs4A0dus7gfymgj0UI1qKTe3M&si=gSbk6dUUjS5TO3Xp

Or download my free StewartLynch Channel watching app and watch it there.
https://stewartlynch.gumroad.com/l/obsjz

StewartLynch, to SwiftUI
@StewartLynch@iosdev.space avatar

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

StewartLynch, to SwiftUI
@StewartLynch@iosdev.space avatar

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

ramzesenok, to random
@ramzesenok@mastodon.social avatar

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?

alpennec,
@alpennec@iosdev.space avatar

@ramzesenok I think you need to process relevant store changes to update the context on the other process.

More info in this article and sample project (based on #CoreData but should work with #SwiftData): https://developer.apple.com/documentation/coredata/consuming_relevant_store_changes

ramzesenok, to SwiftUI
@ramzesenok@mastodon.social avatar

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

StewartLynch, to SwiftUI
@StewartLynch@iosdev.space avatar

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.

https://youtu.be/F-H1CQAWQSU

brandonhorst, to random
@brandonhorst@techhub.social avatar

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.

StewartLynch, to SwiftUI
@StewartLynch@iosdev.space avatar

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

https://youtu.be/xIU0PtHiwtg

pixel, to swift
@pixel@social.pixels.pizza avatar
StewartLynch, to SwiftUI
@StewartLynch@iosdev.space avatar

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.

https://youtube.com/playlist?list=PLBn01m5Vbs4A0dus7gfymgj0UI1qKTe3M&si=LlPifiAGbqcMIo4N

https://ko-fi.com/StewartLynch

StewartLynch, to SwiftUI
@StewartLynch@iosdev.space avatar

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

thedevme, to random
@thedevme@mastodon.cloud avatar

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.

finestructure,
@finestructure@mastodon.social avatar

@thedevme I believe @helge has done a fair bit with #SwiftData

everyplace, to SwiftUI
@everyplace@mastodon.social avatar

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.

everyplace,
@everyplace@mastodon.social avatar

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.

#sharedPhotography #BuldInPublic #swiftui

A screencast of the latest build of Shared Photography. It features realistic postcard as an onboarding metaphor, and the video demonstrates moving and flipping the card all over the screen.

everyplace,
@everyplace@mastodon.social avatar
pixel, to swift
@pixel@social.pixels.pizza avatar
pixel, to swift
@pixel@social.pixels.pizza avatar
kharrison, to random
@kharrison@twit.social avatar

Silencing the Core Data CloudKit sync debug messages that fill the Xcode console #iOSDev #CoreData #SwiftData https://useyourloaf.com/blog/disabling-core-data-cloudkit-logging/

j4ck, to random
@j4ck@iosdev.space avatar

Starting a new project recently and:

  • 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.
j4ck,
@j4ck@iosdev.space avatar

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 and

Direct link here https://apps.apple.com/us/app/bike-index/id6477746994

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • osvaldo12
  • ngwrru68w68
  • GTA5RPClips
  • provamag3
  • InstantRegret
  • everett
  • Durango
  • cisconetworking
  • khanakhh
  • ethstaker
  • tester
  • anitta
  • Leos
  • normalnudes
  • modclub
  • megavids
  • lostlight
  • All magazines