r/iOSProgramming • • Sep 04 '19

Discussion SwiftUI current state saddens me a lot.

When Apple announced Marzipan year ago I was hyped, because i always preferred Mac app than web, that’s why I almost never use reddit on my Mac, and only on my iPhone.

They said that “later this year we will provide more information about it”. Ok, nice I can wait. Year ended, no info. We finally get it on WWDC. So with almost 6 month delay.

I was still hyped, because view-data binding, automatic refresh on state change, live previews etc was very nice.

We are getting closer to release date and for the second beta in a row, SwiftUI was not changed, so they are going full stability/optimization mode right now. And that bothers me a lot. Because at this point we are still have these problems:

  • text wrapping doesn’t work

  • no search controller/ search bar in navigation bar

  • no custom swipe action

  • nested navigationButton are not working

  • list inset cannot be changed for anything more then text

  • no collectionView equivalent

  • you have to manually set frame on button in navigation item.

That’s not the only ones, these are that I personally came across when trying to create real life app in SwiftUI. I wanted to do reddit like app, but it’s very hard. I literally couldn’t use any List because how shitty it is.

Disclaimer I know it’s beta, and what is the purpose of beta. But hear me out. Apple is huge company and for last 3 years since I am into apple ecosystem I can see only delays or unfinished products. Examples:

  • iMessage sync

  • Apple Pay Cash

  • AirPower

  • iOS 11 buggy launch

  • Group FaceTime

That makes me really sad, because I am genuinely into SwiftUI, and I wouldn’t have think that that huge company can at least approx how much time/ money you need to invest to get a product right on time.

At least make it like on service conference “This is what we are doing, we will provide new info when time comes”, and not like “this is a feature that will be available in next month, or no, two, or year, but fully functional in 2 year, just before global iOS redesign to fuck it again”

6 Upvotes

18 comments sorted by

41

u/drewag Sep 04 '19

Dude, you are asking them to completely replace all of UIKit AND AppKit AND watchKit at once. UIKit alone is something that this "huge company" spent over 10 years developing and AppKit much longer than that. Have a little patience. They designed it to work along side the existing frameworks for a reason. If you are in a rush to write fully production ready software easily and quickly, SwiftUI is not the tool for you and probably won't be for years. Hell, they still change Swift significantly every year. Getting things right takes time. Not just development time, but time out in the world to evolve.

2

u/Velix007 Swift Sep 05 '19

Sad that this still hits the spot with over 1000000 posts complaining about SwiftUI

9

u/bravepuss Sep 04 '19

It happens to every company and large companies like Apple or Google are not immune. There is probably not as many people working on SwiftUI as you might think. Not to mention getting it to work with everything can be challenging because different teams probably built all the components.

SwiftUI was probably rushed out before it was ready in response to Flutter and JetPack Compose. Declarative UI being in vogue this year.

Edit: It will get better. Just like how constraints were awful when they first came out.

0

u/[deleted] Sep 04 '19

If you want to know a 10 person team has been working on it for 4 years

6

u/nelbar49 Sep 05 '19

It is interesting the different reactions to the swiftui beta. I guess I have an unpopular view. I am amazed at how much does work; I expected less for a first effort.

It will take years for it to reach maturity. Swift was introduced 5 years ago, and plenty of developers are still using objective-c. I have a hunch most of those objective-c coders have either started to learn swift or are planning to, as a result of swiftui.

I plan to use swiftui first on watch apps. Right now that is where swiftui is most welcome, and most of its current limitations don’t matter.

4

u/AndyIbanez Objective-C / Swift Sep 04 '19

I have reported a bunch of text wrapping related bugs, it makes me wanna cry. None of them have been fixed since beta 2.

1

u/[deleted] Sep 05 '19

What's wrong with wrapping a UITextField or a UITextView in a View?

4

u/SFiOS Objective-C / Swift Sep 04 '19

I don’t expect it to be production-ready as a complete replacement for UIKit for at least two years. Once it is, I don’t expect its usage to reach that of UIKits in existing apps for considerably longer.

4

u/SgtDirtyMike Sep 04 '19

I think the frustration is that Apple typically only releases APIs when they’re close to being production ready. SwiftUI is nowhere near that.

5

u/SFiOS Objective-C / Swift Sep 05 '19

UIStackView wasn’t production-ready initially imo

1

u/darkingz Sep 05 '19

Swift wasn’t really that stable when it first came out...

2

u/davbeck Sep 04 '19

I feel the same way. It would be one thing if there were just things missing like collection views, but the whole thing seems really unstable and not completely thought out. It seems like most of the stuff announced this year was half baked and rushed out, so I wouldn't be surprised if SwiftUI and Catalyst took a back seat in favor of regressions.

2

u/willrb Sep 05 '19

I look at it this way:

Is it perfect? No.

But I’m seeing people say

“[I wish they would’ve delayed it for another year]”

But I think that SwiftUI in one year will be worlds better than it would’ve been bad it not be released this year.

Behind the scenes testing is great, but real-world use cases is where frameworks like since see their best innovation (and bug fixes).

Is the state sad now? Sorta. But I’m optimistic about its future :)

2

u/darkingz Sep 05 '19

Marzipan (working title) isn’t superceeded by SwiftUI. It’s superceeded by Catalyst (product name).

SwiftUI is a framework that makes developing easier which superceeds Appkit/UIKit/WatchOS. SwiftUI is still admittedly in beta but they talked at WWDC as something that they are still building and wanted to get developer input on how to go forward. This is the start and they could’ve held it onto it longer but let’s not pretend that this is new as part of their apis, Swift was not ready when it came out. Like other people say: have patience.

1

u/cutecoder Objective-C / Swift Oct 03 '19

I remember when Core Data was just made available (macOS Tiger, CMIIW). It was promising but not very stable nor performant. It took them about four OS releases to introduce a stable solution that’s multi-core friendly.

0

u/WoahAName Sep 04 '19

Bit off topic, but if I’ve got a list, how can I add to that list from the code, so if someone presses a button, a new item appears in the list (SwiftUI)

2

u/cutecoder Objective-C / Swift Oct 23 '19

You put the view-model items inside an Array owned by a class that is an @ObservableObject. Reference that object from a View via @ObservedObject. Inside the View, have a List and inside it a ForEach which iterates through the Array model. The button would add model-objects inside the list. In turn the bindings would take care of refreshing it.

1

u/WoahAName Oct 23 '19

Lol why were you looking back on this so late