SwiftUI noob question: I understand why my ViewModel is being initialized twice, but why is it not being deinitialized?
It's created, then a second later when appState.show is changed, the view is recomputed, and view, and its ViewModel, are created anew. Cool! But why is the old one not deinitialized? What's holding onto it?
So basically it seems like a weird choice of the new Observation framework, in that @State doesn't use an autoclosure like @StateObject (which allows it to be smarter about duplicates), which is unfortunate design and causes @State to create instances without really needing to, but it’s at least documented with a weird workaround
My ViewModel is a bit heavy so having them be randomly allocated is kinda rough
@christianselig same! Been using a mix of optimized charging and 80% limit when I’m in “normal life mode” and turning off optimization only when I’m traveling and need as much percentage as I can get
Dumb question, but if I bought one of those "MagSafe stickers" on Amazon, that are traditionally used to give an Android phone MagSafe-like-stickiness, could I instead use it in reverse, and stick it to a non-MagSafe accessory so it would stick to my iPhone?
For instance, say I want to stick it to a banana so the banana magnets to my phone
Update on long USB-C cable journey: bought this 15-foot one per recommendations and it's been awesome, not too thick, charges great (only loses 3W versus a 3 ft cable when charging at 100W) https://mastodon.social/@christianselig/112378065694461950
Does launching a build with the debugger attached on Vision Pro take forever for anyone else? It's near instant on the simulator, but even after the data is transferred to the device, the actual launch screen hangs out for like 10 seconds (so I don't think dev strap would help?)
@christianselig It is indeed debugger attach and load time, and no, the developer strap doesn't help. In fact, the wireless seems faster, at least with my router. But it's not hard to beat USB 2 speeds by wifi, these days.
After drawing on my iPad screen for years and getting jittery lines, this video and the fact it was my screen protector blew my mind. Is there a screen protector that doesn't do this? And isn't matte, because despite drawing nice those destroy the colors
@christianselig Some time after the iPhone X Apple switched glass on most of their touchscreens to something that is more shatterproof but much easier to scratch. I had my X for 5 years with no scratches, the 14 Pro I have is already super scratched up :/. I'd rather the scratch resistance than being semi-drop-proof
Override by "Map to local" and replace all "false" with "true".
Don't know which one is actually required. I just replaced everything with true, instead of doing them one at a time to find which set is the minimal needed change.
The wildest bag someone recommended from this post is the TomToc Navigator. It's 40L, but only weighs 2.8 lb, has water bottle holders, compression straps, great laptop/iPad compartment, and one massive clamshell bucket for clothes. And it's only $80, which concerningly cheap
@christianselig I’ve been using the 17L model of that bag for daily stuff and short work trips and I love it. It has all the high quality stuff I look for in the bag and my go-to recommendation for people now.
Sometimes I forget there was a period of television where new episodes of Community, Parks and Recreation, 30 Rock, and The Office all aired back to back on the same night
Choosing a travel backpack is really hard, and I still haven't found one I love, so mostly for my own reference I wrote a long post with thoughts on pretty much every travel backpack out there https://christianselig.com/2024/04/choosing-a-backpack-is-hard/
Any recommendations for USB-C to C charging cables over 10 feet/3 meters long? USB 2.0 speeds are fine, no video transmission needed, just want 100W of power delivery and ideally not as thick as a garden hose