Settings

Theme

Apple's API's Are Awful (At Least Some of Them)

mzfit.app

28 points by speedyapoc a year ago · 18 comments

Reader

TheNightman a year ago

If you think this is bad, try an Apple TV app! A lot of the platform APIs, like the one mentioned in the article, are still in objective C and really beginning to show their age. The worst is when you want to do something in SwiftUI but the platform APIs are UIKit (‘:

  • kridsdale3 a year ago

    Sheesh, it's not that bad! 10 years ago the same things were considered the nicest app APIs to work with in the biz, spawning the whole ZIRP app ecosystem.

    I guess if people feel like you do, I'll stay employed.

Terretta a year ago

The couple comments and then paragraph about having to restart the simulator:

... restart the simulator every 3rd try or so. Because if you don’t the workout will still be running in the background and everything just silently fails and you will think you have a bug in your code until you finally find the correct stack overflow reference that just explains this is the way life is.

Doesn't seem to happen to me in the standalone simulator or on a connected device. For me it seems to happen in the Preview, which is not the same thing. It seems to start when you manage to get the main app and the preview version out of sync, usually during a code edit and preview refresh.

The problem seems to go away if you handle previews and preview provider concurrency more explicitly:

https://developer.apple.com/documentation/swiftui/previewpro...

lawgimenez a year ago

Also a current funny bug with SwiftUI, if you left out a “dot”, it will compile but crashes the app during runtime.

VStack { } navigationDestination(isPresented: $goToSettings) { }

There should be a dot before navigationDestination and this should not compile ever.

  • plorkyeran a year ago

    That's not a bug. It's just calling `self.navigationDestination(isPresented:)`, which is a valid thing that exists. The same thing can happen anywhere that you're calling a method on an object which also exists on `self`.

drekipus a year ago

> And so Apple, I say, whoever had a hand in this should be ashamed of themselves. You can and should do better. I love SwiftUI. I love building iOS apps. But please clean this up.

As a recent macbook convert (work gave me one) I have to remind myself every day:

Apple is not a software company. Their business is to sell hardware at a premium. Software is an afterthought, and if they could offload software, they would. The sleek aluminium case, lovely screen, arm processor.. that's what you're getting.

You're not paying a premium for the inability to stack windows, or for shitty dual monitor support, or for awful application/state management.

Apple is a hardware company. They don't give a shit about software.

  • nielsbot a year ago

    Are you trolling? You may think Apple doesn't care about software--and I don't know why you would think that, TBH. But to say they don't give a sh*t about software is 180º wrong.

    • optimalquiet a year ago

      I think Apple cares a lot about software.

      On iPhones.

      Macs used to be so great, but a lot of their sheen has worn off, and Microsoft has really improved their UI generally in the past 15 years even if there's still a lot of rough edges. MacOS is one of those things that seems like it was really impressive back in 2010 but hasn't kept up with UI development. The window management in particular feels retrograde; Windows and FOSS window managment has embraced snap-to-edge while Macs try and make people use the clunky full-screen mode that gets rid of your system UI. Terminal also feels increasingly outdated, trapped in BSD utilities; Linux has the superior GNU utilities while Windows now has WSL for people who live on the command line. (And PowerShell for sysadmins.)

      iPads just get this weird franken-OS that has a lot of the theoretical power of MacOS, just glued to an iPhone interface.

      To me, they're behind in desktop and tablet software, and are continuously trying to make up the difference. And not by following the trend of UI development, mind you, but by making their non-phone interfaces more like their highly popular phone interfaces. The iPhone has taken over the company.

      • drekipus a year ago

        Perhaps this is what I was trying to say.

        Like I said, I'm only a very recent Macos user. I'm actually shot how bad some fundamental things of this os is. I don't know the history of it, I just know it doesn't work for me now

  • Terretta a year ago

    > Apple is a hardware company. They don't give a shit about software.

    A bicycle company is hardware.

    To turn a bicycle into a bicycle for the mind is software.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection