no shade but i really like how they have every former apple designer under the sun working on this thing and these are the UI sounds humane came up with

@bardi @Mecid when sizes classes aren't enough, I've found it useful to expose a platform idiom in the environment. This obviously isn't a substitute for platform directives if the API is unavailable, but it's useful to make small UI tweaks.

@gernot @keval the AppStorage interface will always return its default value, however if you access the value through the store (e.g UserDefaults.standard.double(forKey:)) you will get the store's default instead.

Yet another reason for having a common interface everywhere!

@phill “it’s not much but it’s honest work”

My job?

I restart Xcode and Clean Builder Folder for a living.

@keval @gernot beware that even if with an optional value the store will always return a default value. Double will return 0 if there is no entry, Bool will return false, etc. This can have subtle and unexpected consequences if you’re expecting nil.

By clearly defining your default values you’re making your codebase easier to reason with, test, etc.

@gernot very cool and similar! Great minds :-)

And yes it’s curious AppStorage works the way it does when the EnvironmentValues system is sat right there.

: Stop using AppStorage directly. It’s prone to typos, value mismatches and more.

Instead give yourself strongly typed keys and associated defaults, à la EnvironmentValues.

I’ve published my implementation as a package, but you can just as easily wrap AppStorage yourself with a few dozen lines.

@harry_wood @rwitherspoon definitely having some sort of routine to check your accounts is a good idea.

In my particular instance I checked fairly regularly, but rather sinisterly banking alerts weren’t being sent to me (despite receiving marketing alerts, which is what prompted me to check that day). Assume alerts won’t help you either.

@rwitherspoon frustratingly they won’t tell me the full details, so it’s hard to say what I or anyone could do differently.

But these things ultimately worked in my favour:

- getting a crime number asap
- noting everything the bank says down
- assuming bank is out to screw me

The whole thing made me paranoid; how could I have been compromised in such a catastrophic way?

Turns out (perhaps unsurprisingly) the weakest link in the chain was human. A fake ID was used inside a branch to gain access to my accounts. Additional checks that were supposed to be carried out, weren’t.

The bank issued the fraudsters with a new card and PIN number. And that was it. They had everything they needed.

Show thread

This time last year I had a life-changing amount of money stolen.

There was no obvious scam. I hadn’t sent any payments. It was just gone.

The police weren’t helpful and the bank did nothing but gaslight me the entire time.

Today the Financial Ombudsman found the bank at fault and have ordered everything to be paid back + compensation.

I cannot begin to express the relief I’m feeling after such an awful year.

Lots of happy crying this morning 🥲

@bardi no problem! And yes for all my sins I do use Apple Music…

@bardi You have a couple of options:

1. Use an overlay for the presentation instead (List is never gone, so focus remains)


2. Use the .focused modifier to restore it onAppear:

@khaost yeh all the navigation and sheet stuff by itself isn’t very useful. It’s definitely worth spending the time to create things like DismissSheetAction, PresentSheetAction, etc.

@bardi there is basically one bigboi target now (apart from watch). You can set platform specific files in the “Compile Sources” phase (though to be honest I find it easier to just use os() inline)

Show older
The Not So Big Company

The home of The Not So Big Company on Mastodon.