Live data from Hacker News

SwiftData

developer.apple.com

51–60 of 109 posts

Re: SwiftData

#51
post #34

Earlier quoted context omitted.

They actually can figure that out, though [0]. I hope this can solve some of it because their deployment model is the dumbest fucking thing. I'm glad they figured out how to backport async/await, it's just impossible to use in a serious library otherwise. [0] https://github.com/apple/swift-evolution/blob/main/proposals...

Over 80% of iPhones are running the latest version. I’ll take that any day as a developer over the Android hellscape of versions that need to be tested for and supported. https://www.macrumors.com/2023/06/01/apple-shares-ios-16-ado...

Same, but its still a 1 year lag on relying on a new API. Probably 2 or 3 in practice if you support the old OSes for a bit. Could be zero lag.

Re: SwiftData

#52
post #39

Earlier quoted context omitted.

Apple has like >80% of devices released in last 5 years on iOS 16. Nowhere near the fragmentation of Android. Given only a minority of users are not on the latest major OS, worrying about supporting older firmware, at least in this case, is not worth the time or money.

I know, but even with my small app I don't feel comfortable dropping support for the 20% users who are behind. And if I'm supposed to maintain both the old and the new API in parallel then why bother. Now for new apps I can see going all in with the latest SDKs.

While you're finishing it, it goes to 5%

Re: SwiftData

#53

Earlier quoted context omitted.

A basic app or one you created a bunch of custom logic, cloud sync integration, etc? I can build a simple app in a minute or two.

Yes, custom logic and cloud sync. It tracks sprint workouts with GPS / pedometer. It's not Uber, but it's a good bit beyond a hello world.

That’s pretty amazing, don’t think I have access to GPT-4, need paid subscription for that right?

Re: SwiftData

#54
post #9

Is this a ground up rewrite or just varnish over CoreData.

Models still have to be classes, so it seems more like varnish.

This is really unfortunate... I wonder if they'll adapt the varnish to work with structs in a future release

Re: SwiftData

#55

One of the things I like about CoreData is that all the relationships and entities are defined in one file, and its easier to browse the history of that schema to see how the models evolved. One of the things I dislike though is that it doesn't interop well with swift types and almost everything has to be marked as optional. It looks like this SwiftData solves the second problem, but since definitions are spread acro…

put them in one file then.

Ditto to this suggestion. Especially when you auto generate classes it ends up creating the main class for each entity and a separate extension file for each. By default we merge the two and avoid the separate extension altogether.

Re: SwiftData

#56

One of the things I like about CoreData is that all the relationships and entities are defined in one file, and its easier to browse the history of that schema to see how the models evolved. One of the things I dislike though is that it doesn't interop well with swift types and almost everything has to be marked as optional. It looks like this SwiftData solves the second problem, but since definitions are spread acro…

I hope all the swift tutorials don't switch to just SwiftData, seeing as how we must support iOS(-2).

Re: SwiftData

#57
Looks promising and it is about time that they modernized the interface to CoreData that was getting really long in the tooth by now.

I still prefer Realm though. It has a much more flexible days model and I can use it both on iOS and Android with seamless sync between the two.

When Apple adds cross-platform sync to SwiftData I’ll consider it. Until then it is dead in the water.

Re: SwiftData

#58
post #34

Earlier quoted context omitted.

Over 80% of iPhones are running the latest version. I’ll take that any day as a developer over the Android hellscape of versions that need to be tested for and supported. https://www.macrumors.com/2023/06/01/apple-shares-ios-16-ado...

> Over 80% of iPhones are running the latest version. If the past is any indicator, the number will be over 90% by the time iOS 17 ships this fall.

I doubt iOS 17 will be adopted faster than previous versions. For one, they are dropping support for multiple device generations this time.

Re: SwiftData

#59
post #58

Earlier quoted context omitted.

> Over 80% of iPhones are running the latest version. If the past is any indicator, the number will be over 90% by the time iOS 17 ships this fall.

I doubt iOS 17 will be adopted faster than previous versions. For one, they are dropping support for multiple device generations this time.

They are actually of the same age, the iPhone 8 and X came out at the same time (yes it’s still confusing now)

Re: SwiftData

#60
post #39

Earlier quoted context omitted.

Apple has like >80% of devices released in last 5 years on iOS 16. Nowhere near the fragmentation of Android. Given only a minority of users are not on the latest major OS, worrying about supporting older firmware, at least in this case, is not worth the time or money.

I know, but even with my small app I don't feel comfortable dropping support for the 20% users who are behind. And if I'm supposed to maintain both the old and the new API in parallel then why bother. Now for new apps I can see going all in with the latest SDKs.

Thanks! I appreciate this attitude as I’m stuck on iOS 15, but still like my phone as it is.
Post reply on HN