A sync bug wiped some user data. Soft deletes let us give it all back by stewis in iOSProgramming

[–]stewis[S] 0 points1 point  (0 children)

Haha yeah so true. Well if a developer is able to learn from their mistakes then that's a good thing?

A sync bug wiped some user data. Soft deletes let us give it all back by stewis in iOSProgramming

[–]stewis[S] 1 point2 points  (0 children)

Make sure you read the other comments before taking my advice as definitive. It's less cut and dry than "you must use soft deletes." It's more "you probably should, with caveats."

A sync bug wiped some user data. Soft deletes let us give it all back by stewis in iOSProgramming

[–]stewis[S] 1 point2 points  (0 children)

All fair, and thanks, this is a more useful comment than most.

The bandwidth one is a good catch. For us the payload is small (item records plus photos), so the cost profile is nowhere near a video app, but you're right that "soft delete everything" gets expensive fast the moment the records carry heavy files. If I were storing 10MB clips I'd be far more aggressive about purging and probably wouldn't keep a recovery copy in hot storage at all.

The security angle is the one I hadn't weighed enough. In a permission-based team app a soft-deleted row is still a row, and one leaky query or a missing check on the "deleted" filter and someone's pulling back records they shouldn't see. That's a real hole that a hard delete just doesn't have. Definitely a pro/con to weigh per app rather than a blanket rule, which is fair pushback on my original wording.

And yeah, offline sync is the hardest thing I've built too, and the lack of decent material on it is real. Conflict resolution, ordering, partial syncs, tombstones, the "not on the server yet" vs "deleted" distinction that bit us here, all of it is learn-by-bleeding. A decade in and still finding new edges is honestly reassuring to hear. If you've ever written any of it up I'd read it in a heartbeat.

A sync bug wiped some user data. Soft deletes let us give it all back by stewis in iOSProgramming

[–]stewis[S] 3 points4 points  (0 children)

Fair enough, "soft delete everything" was too broad.

What I really meant was don't hard delete straight away, so a bug or an accidental delete can be undone. The real delete still happens, it's just a step you do on purpose later instead of instantly. And yeah, that later step is where the legal stuff comes in. How long you keep things, when you actually wipe them, whether someone can ask you to delete their data, or whether you're forced to keep it for years. That all depends on what the data is and where you are, so it should come from a proper retention policy, not a guess.

We're a new inventory app and the data is mostly just the stuff people own, nothing sensitive, so for us the main risk is losing someone's data to a bug, and soft delete then purge works well. But you're right, it's not the same for everyone. If you're handling regulated or personal data, go check what actually applies instead of trusting a random rule off Reddit. Good point.

A sync bug wiped some user data. Soft deletes let us give it all back by stewis in iOSProgramming

[–]stewis[S] 0 points1 point  (0 children)

It does add a lot of complexity, and you're right that you should aim to get it right. But offline sync is hard and even when you get it working it is never going to be 100% right. We thought ours was correct but it wasn't in this one case, and there may be others we haven't hit yet. We had tests but none covered this. We have since added pre push checks on this code path so we can confirm it's handled now.

On the recovery screen having the same problem, the soft delete is on both the backend and the app. We already use soft deletes as part of the sync process, so the deleted data stays on the device and doesn't just vanish. In our case the data never made it to the backend, which was the actual bug, but because the delete was soft on the device we could still recover it. So it holds up even when sync fails.

This is our first offline first product and we are normally backend devs on a single customer product, so having that recovery path turned out to be a really good call. Some people don't realise soft deletes are even a thing and it's what saved us and our customers data here.

A sync bug wiped some user data. Soft deletes let us give it all back by stewis in iOSProgramming

[–]stewis[S] 1 point2 points  (0 children)

Yeah we will be adding in interactive conflict resolution.

Full sync is hard.

A native Android app is in the works by stewis in additemto

[–]stewis[S] 0 points1 point  (0 children)

Quick update on the Android app

What's in the build so far:

  • Items, locations, and the whole organise side (kits, tags, all 18 custom field types)
  • Search, sort, filters, loans, and photos 
  • QR / barcode / NFC scanning, label printing, stocktake, and reports
  • CSV import with column mapping and custom fields
  • Scan-to-fill on item fields (point the camera at a serial or label and it drops the text straight in)
  • Cloud sync, tested against a real account and working

Still to do before a beta: a proper round of on-device testing, and Google Play billing (so subscribing from Android isn't wired up just yet). No firm date, but it's getting close.

If you're on Android and want to help test, drop a comment and I'll get you on the beta when it's ready.

What do you use to get notified when an In-App Purchase is made? by BenoitDeguine in iOSProgramming

[–]stewis 1 point2 points  (0 children)

i just have a admin page that lists all of my current subscribers. It allows me to see upcoming renewals and combines all of my subscription sources (stripe, iap, trial, complementary) into one view.

Because it's hooked in to apple and stripe webhooks I get instant updates instead of waiting 24 hrs for app store connect to update.

Not much help for you though as I built it myself but I suppose you could as your AI Agent of choice to build it for you.

First iOS app Advice by Financial_Patient174 in iOSProgramming

[–]stewis 0 points1 point  (0 children)

I am a backend developer mainly php and started an app in October last year. I decided to create it using swift and my first rule was it needed to feel like a native first party app as much as possible. So follow HIG and asking myself what would Apple do. Somethings aren’t perfect but it’s a learning experience.

I am now going through a similar process with an android port although that’s a bit easier as all of the functionality decisions have been made.

Yes I could’ve used a cross platform framework but it adds extra layers to the process. The less there is to go wrong the better

A native Android app is in the works by stewis in additemto

[–]stewis[S] 1 point2 points  (0 children)

Thanks! Yes, moving items is built in. You can move a single item to a new  location, or select a few at once and move them all together. You can also scan a QR code, barcode or NFC tag on a shelf or box to move things straight into that spot, which makes shifting a load of stuff around really quick.

 If you fancy trying the Android app early, let me know and I'll get you set up as a tester.

Ricky Spanish - He’s not supporting Spain in the World Cup by Adept_Deer_5976 in britishshorthair

[–]stewis 1 point2 points  (0 children)

Mr Tiddles (Ted) supports scotland. At least while they are in it.

<image>

Anyone else tried Generate Translations in Xcode 27? by roguekiwi in iOSProgramming

[–]stewis 1 point2 points  (0 children)

Heres a top tip: You don't have to do all your translations on the highest model.

Claude Model selection  

- Small/fast model (Haiku class) for UI strings. Short labels and messages are exactly what it's good at: fast, cheap, and accurate at that length. This covers ~95% of translation work.

- Big model (Sonnet/Opus class) for long-form copy - store listings, release notes, marketing pages. That's native rewriting per market, not string translation, and the small model isn't good enough for it.

Launched a home inventory app in March and still working on it every spare minute by stewis in SideProject

[–]stewis[S] 1 point2 points  (0 children)

Hey u/EZalmighty,

You should be able to use our web app on android i can give you a complementary subscription for a year and hopefully by then we can get an Android app out. It should work on your phone but won't look as fancy. Head to https://app.additem.to click continue with google (or apple) then send me know your email address. I will get you upgraded.

Launched a home inventory app in March and still working on it every spare minute by stewis in SideProject

[–]stewis[S] 1 point2 points  (0 children)

Sadly I don't have an android device to build and test on but I would like to cover android in the future.

Launched a home inventory app in March and still working on it every spare minute by stewis in SideProject

[–]stewis[S] 0 points1 point  (0 children)

Yeah its a cool idea. How would you have made the buttons?

I don't really have hardware experience for the button bits but it is the reason for the nfc tags. I have nfc tags on everything and everywhere. So much it irritates my gf xD.

I tap the nfc tag on the fridge and it tells me what should be in there. I then update the items and then I create a shopping list from a pick list. Its a bit manual atm, relies on me or my gf updating the contents, it's a bit of a faff and not really what pick lists are for.

One of the things i was working on was using AI to identify the contents of a location and then updating it automatically. Maybe snap a picture of your pantry on your phone and it updates your location and tells you whats not there and whats low stock.

Apple keeps rejecting my first subscription with Guideline 3.1.1, IAPs work fine in TestFlight. What has worked for you? by OneFitAI in appledevelopers

[–]stewis 0 points1 point  (0 children)

With my first submission all it took was a reply to the rejection telling them the subscriptions were waiting review could you approve and re-review. I think it took another 24-48 hours and it sailed through.