Fabian Gruß's banner
Fabian Gruß's profile picture

Fabian Gruß

@fabiangruss4,041 subscribers

One day, one of my apps will win an  Design Award. atm building your fav social diary w @goingonapp & a set of small bets on the side ✨ prev founder @epap_app

Shorts

Why not add more hand-drawn stuff to our UIs? ✍️ And yes, I drew this myself!

Why not add more hand-drawn stuff to our UIs? ✍️ And yes, I drew this myself!

72,831 Aufrufe

This update is ready - check it out! Besides removing the hassle around CloudKit + SwiftData, the app now feels waaay more fluid & faster than before 🛫 Now with Apple Sign In & Firebase. For existing users there is a data migration - happy to share more about how that works

This update is ready - check it out! Besides removing the hassle around CloudKit + SwiftData, the app now feels waaay more fluid & faster than before 🛫 Now with Apple Sign In & Firebase. For existing users there is a data migration - happy to share more about how that works

56,967 Aufrufe

Sundays again are for shipping - new Testflight Release (v3)! ✈️ Also opening 50 more spots so watch your inbox - first come first serve. The changes: - Tidied up the user profile (no more confusing birthday and address). Also added this cute animation :) More 👇

Sundays again are for shipping - new Testflight Release (v3)! ✈️ Also opening 50 more spots so watch your inbox - first come first serve. The changes: - Tidied up the user profile (no more confusing birthday and address). Also added this cute animation :) More 👇

16,015 Aufrufe

Videos

fabiangruss's profile picture

A little look behind the scenes: Many of you asked how I handle switching from SwiftData & CloudKit to Firebase and a different way of sharing entries with your friends. Previously, there was no need to create an account and the app just used the user's iCloud ID in the background to "sign up". Why did I do this? SwiftData is really nice to use but after working with it for over a year now, it feels still quite unstable, buggy and errors are super hard to track. Same goes for CloudKit and the CloudKit sharing that I implemented. For a growing app, in my opinion, it's just not feasible to use because errors happen regularly, you don't really know if the data is stored (and shared) correctly and the documentation on CK is just bad. I have big plans for this app (reacting to your friends' entries, Apple Health integration, tagging multiple friends in entries etc.) and all of it is now much simpler - and faster to build. The Migration part When an existing user starts the app, a little migration sheet with a couple of steps opens which can't be dismissed. The goal is that the user maintains all entries and can use the app like before :) Steps: 1) Create an Account using Apple Sign In and Firebase Auth 2) Migrate your user profile (profile picture etc.) and all your friends from SwiftData to Firestore. Here I basically iterate over all the data that is there, run a custom conversion for all the fields (some things need to be stored differently) and save them. Profile Images are now saved in Firebase Storage 3) Migrate all entries to Firestore the same way. Images and Voice Notes are now saved in Firebase Storage (that might take a bit of time, video is sped up) 4) After that, migration is basically done and the user can use the app like before. In the settings, the user can now log out or delete the account, things that weren't possible before. If for any reason the migration has to be done again, this can be triggered from the settings as well. How do I decide if a user needs to migrate? Previously, I saved the user's profile in SwiftData under a specific key (simplified). If the app finds something under this key, user is prompted for a migration. New users don't have to run through the migration. They simply start fresh with the Apple Sign in in the onboarding like seen in the referenced post. How does sharing entries now work? For sharing, I create deeplinks using branch . io now. These links basically work like every other Invite Link you've received or created. The friend opens the link, can accept your invitation and now both of you are connected as buddies. Previously using CloudKit Sharing, this process took two steps - each user had to share a link to give access to their entries. The process now is much simpler and better understand for the user. Developing the migration Tbh I thought this would be way quicker. In the end it was > 100 commits since I had to basically change every screen in the app. Working with SwiftData is quite different to how things work with Firebase (and most other frameworks), so every interaction where data was involved had to be reworked. Now the app runs on a combination of Firestore, Cloud Functions and Firebase Storage. In terms of memory, the app feels notably faster and only needs around 1/4 of the memory bandwidth it needed before. Let's see if it will be worth it! All in all super happy with the new flexibility for the app and not being limited by the technology anymore 👀

Fabian Gruß

26,781 Aufrufe • vor 1 Jahr

Keine weiteren Inhalte verfügbar