@ryanashcraft@mastodon.social
@ryanashcraft@mastodon.social avatar

ryanashcraft

@ryanashcraft@mastodon.social

This profile is from a federated server and may be incomplete. Browse more on the original instance.

christianselig, to random
@christianselig@mastodon.social avatar

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?

Sample code: https://gist.github.com/christianselig/d88b1a4d1989b973689ae62d4691162f

ryanashcraft,
@ryanashcraft@mastodon.social avatar

@christianselig I love your noob questions because they're usually actually really good questions and highlights problems with the framework.

Anyways, I was only able to get it to release the first ViewModel if I manage SpecialView's id manually :\

https://gist.github.com/ryanashcraft/7e408c3c2b21fb76c359fda60c86c531

ryanashcraft,
@ryanashcraft@mastodon.social avatar

@christianselig oh yeah this is my best “get it working no matter the cost” attempt

ryanashcraft, to random
@ryanashcraft@mastodon.social avatar

Does anyone know how to properly export an SF Symbols SVG from Sketch in a way that maintains necessary metadata?

Simply exporting lock.square.stack.fill, opening in Sketch, exporting layer as SVG, then reimporting back into SF Symbols app shows this:

ryanashcraft,
@ryanashcraft@mastodon.social avatar

@harshil so it's not possible to create custom symbols anymore?

ryanashcraft,
@ryanashcraft@mastodon.social avatar

@harshil yay I got it. thank you!

dimillian, to random
@dimillian@mastodon.social avatar

It's time, @IceCubesApp got a little upgrade!

ryanashcraft,
@ryanashcraft@mastodon.social avatar
mergesort, to random
@mergesort@macaw.social avatar

I'm sorry for flooding your timelines all day but it's been so darn exciting! Tonight I'll go to bed not only having had a launch day that exceeded all of my wildest expectations, but I'll also have had Plinky cupcakes in my Plinky hat with a Plinky colored bouquet, courtesy of my perfect partner Colleen.

I would love it if you try the app, and if you think Plinky can make your life a bit better, please enjoy the 50% yearly discount. https://plinky.app/offer/REDPANDA
https://macaw.social/@mergesort/112412465363739000

ryanashcraft,
@ryanashcraft@mastodon.social avatar

@mergesort congrats on the super successful launch! 🧁🚀

MuseumShuffle, to random
@MuseumShuffle@mastodon.social avatar

If you have to wait out a severe thunderstorm, the Apple Store in Chicago is not a bad place to do it!

ryanashcraft,
@ryanashcraft@mastodon.social avatar

@MuseumShuffle that is such a cool Apple Store

MuseumShuffle, to random
@MuseumShuffle@mastodon.social avatar
ryanashcraft,
@ryanashcraft@mastodon.social avatar
manuel, to random
@manuel@iosdev.space avatar

Hey internet friends 🤗 I have a big announcement to make and this time it doesn't have anything to do with apps 🤓

Last month, our daughter was born and it is so incredible and wonderful to have her in the family now. I haven't been very active here nor done any work recently, as my wife and I were busy getting to know the little one and enjoying quality time to bond as a young family 🧑‍🧑‍🧒 🥰

PS: As many of you know I am very fond of dad jokes, so now I am officially entitled to make ‘em 😜

ryanashcraft,
@ryanashcraft@mastodon.social avatar

@manuel aww that’s wonderful. Congrats Manuel.

rooster, to random

Customers sometimes report that our app's widgets are “stuck”.

We handle this by wrapping every widget in a special URL modifier. It detects if the widget is in the “preview" state. A widget should only be tappable in preview if the device JUST rebooted, or else it means widgets are broken.

If preview is detected, it sends a special deep link to the app. We show a message that tells the user to reboot. And if widget is fine? Then it applies the regular deep link URL instead.

An alert dialog in an iOS app. It says: “The widget you tapped is still loading. If it is stuck in this state, rebooting your device may help.“

ryanashcraft,
@ryanashcraft@mastodon.social avatar

@rooster very clever

By the way have you noticed widgets getting stuck after the app gets updated? Seems to be a frequent occurrence for me these days. It’s not showing the preview, just stops updating.

ryanashcraft,
@ryanashcraft@mastodon.social avatar

@MuseumShuffle @rooster oh interesting, I wonder if it’s just a test flight thing. I think only people who have reported it were in TestFlight group (including myself)

krzyzanowskim, to random
@krzyzanowskim@mastodon.social avatar

TIL: SQLite follows the GDD (God Driven Development) software development approach

https://sqlite.org/codeofethics.html

ryanashcraft,
@ryanashcraft@mastodon.social avatar
zachwaugh, to random
@zachwaugh@mastodon.social avatar

I've been happily and successfully using CKSyncEngine in a new project that is local-first syncing with GRDB (SQLite). The one thing I'm not sure how to do though is handle failures. If CKSyncEngine tells me to something changed on the server and it fails on my end for whatever reason (so far, programming errors), I don't know how to tell the server and fetch those changes again. Anyone familiar with the right approach for that?

ryanashcraft,
@ryanashcraft@mastodon.social avatar

@zachwaugh do you have control over the change token? You’d ideally be able to detect the error, throw, and discard the new change token (ie do not persist it). Then when app updates, you retry the read operation with the same change token that failed before.

ryanashcraft,
@ryanashcraft@mastodon.social avatar

@zachwaugh this is what the UI looks like in Foodnoms when that happens

ryanashcraft, to random
@ryanashcraft@mastodon.social avatar

Huh, I guess we can actually come quite close to replicating cellLayoutMarginsFollowReadableWidth in SwiftUI Lists now using safeAreaInset (and good ol’ GeometryReader of course).

ryanashcraft,
@ryanashcraft@mastodon.social avatar

aww man… while this makes the entire area scrollable, it moves the scrollbar to the edge of the trailing inset 😩

ryanashcraft,
@ryanashcraft@mastodon.social avatar
MuseumShuffle, to random
@MuseumShuffle@mastodon.social avatar

@ryanashcraft Ryan you see this? Installer newsletter.

ryanashcraft,
@ryanashcraft@mastodon.social avatar

@MuseumShuffle :O

I did not, thanks for the heads up!

ryanashcraft, to random
@ryanashcraft@mastodon.social avatar

Weird times we're living in where SwiftUI is used as a workaround solution to a limitation in UIKit

https://stackoverflow.com/questions/63885449/how-to-access-color-from-an-asset-catalog-in-a-shared-framework-in-a-watchos-app/67163216#67163216

ryanashcraft, to random
@ryanashcraft@mastodon.social avatar

What I've been doing for the past three weeks

refactoring my app's monolithic swift package into 26 separate packages

🫠

ryanashcraft, to random
@ryanashcraft@mastodon.social avatar

It's been such a good week ~

  • Sleep and nutrition: 10/10
  • Exercise: four days of intense crossfit classes, probably the hardest I've ever worked out in one week
  • Home: made huge progress on backyard renovation plans
  • Espresso: got a bottomless portafilter and just made the best tasting espresso I've ever had
  • Foodnoms: getting close to finishing a big refactor that pays down some serious tech debt – plus backend dev is getting close to finishing up an exciting new feature!
ryanashcraft,
@ryanashcraft@mastodon.social avatar

Oh, one more thing!

I've been experiencing knee pain (jumper's knee) on and off for many years. Thanks to a new routine developed following advice from my coaches, I've finally started making serious progress. Yesterday I was able to do barbell squats for the first time in years without ANY knee pain. I couldn't stop smiling, I was so happy.

ryanashcraft,
@ryanashcraft@mastodon.social avatar

@MuseumShuffle it did!

manuel, (edited ) to random
@manuel@iosdev.space avatar

Just completed another trip around the sun 🥳 🎂 🎈

Fun fact: being born on 03/03 really helped when we moved to the US, as I never had to get used to entering my date of birth differently on forms, since MM/DD and DD/MM are the same 🤓

ryanashcraft,
@ryanashcraft@mastodon.social avatar

@manuel happy birthday!!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • tacticalgear
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • anitta
  • ethstaker
  • GTA5RPClips
  • modclub
  • tester
  • provamag3
  • osvaldo12
  • cisconetworking
  • everett
  • cubers
  • normalnudes
  • megavids
  • Leos
  • lostlight
  • All magazines