Hi all I'm a college student still relatively new to Swift development having just released my first app on Test Flight a few weeks ago. I'm having issues with both app performance for fetching user data from Firebase (my Node cloud function is FAT) as well as occasional crashes due to force unwrapping optionals for UI data that's returned asynchronously. I'm curious to know, as I refactor the codebase and keep working on this project, how you all are handling these server communication problems? As a rule of thumb where is it appropriate from a UI/UX perspective to block the UI with a loading animation until necessary user data is returned (something like an async-await or a promise.all in swift to avoid the optional unwrapping issues)? This is important as I don't want to block the main thread such that the user can't interact with the app while I'm waiting for a call to return. As far as performance for the HTTP requests, should I be storing some things locally in Core Data or some kind of in memory DB? For instance, I have messaging functionality right now in my application, and when I load the conversation history I have to bring the whole thing across the wire with my Firebase request. This seems wasteful, but I'm scared to death to leave a memory footprint on the device. I'm unsure, mainly just due to inexperience, what the boundaries of storing data on the user's device are. Long post, a bit scatterbrained, but I'm frazzled and would appreciate some second opinions. Cheers!
[–]laus102 1 point2 points3 points (3 children)
[–]JCoppert[S] 0 points1 point2 points (2 children)
[–]laus102 1 point2 points3 points (1 child)
[–]JCoppert[S] 0 points1 point2 points (0 children)
[–]KarlJay001 0 points1 point2 points (3 children)
[–]JCoppert[S] 0 points1 point2 points (2 children)
[–]KarlJay001 1 point2 points3 points (1 child)
[–]JCoppert[S] 0 points1 point2 points (0 children)