Capstone - Ayyyyyye

haiii :wave:t4:

My name is Jade and I’ve been lucky enough to spend this time exploring things I find interesting, and aim my compass towards the things in life that feel fulfilling and good. Turns out iOS development is one of those interesting and fun things, I’ve really enjoyed my time learning for the past 2-ish months.

I was a software engineer for about 6 years but before that I was a seasonal human. I ran summer camps in the summer - was a snowboard bum in the winter - dabbled in Martial arts in the off-seasons.

Anyhow, I hope to continue learning and ship something mildy interesting with minimal bugs :bug:. Keyboard cheers to that clink

Wish me luck!

1 Like

Week one is a wrap and I think next week I’m going to try and get this up into testflight to test it out IRL.

Progress over the past week - MVP pretty much done.
I was able to spend the week diving in a little deeper and it’s been a lot of fun.

Wins
I used Mapkit and honestly really struggled for a little while. I was having a rough time pinning down what triggers what. Once I understood that I was able to refactor and remove a lot of the logic from the views and pull it into the model. Which feels way better. These are some features I added with MapKit.

  • Search bar that auto populates cities using MKLocalSearchCompletion
  • Center on your location from pressing a button.
  • A sortable list of locations that updates when your location is updated
  • The mapview updates when your location or the search location updates

Tough Lessons

  • Holy moly, I spent so many hours refactoring. My data is closely related and things just kept getting messy. I really should have spent more time laying that out but sometimes I think you gotta dig yourself in, then out again to learn a lesson. That is, unfortunately how I learn sometimes.
  • I used a singleton instance for my DB (thanks chatGPT) which was great but I didn’t like that all the models has a bunch of singletons. It weirded me out that the relationships between them wasn’t explicit, so I created an AppCoordinator to track all the instances and injected from there.
  • Lastly, I didn’t realize the view needed to be present in order for the onChange to take affect. I had an onAppear attached to the mapView and it was overriding what I wanted to happen in the onChange. That was a super confusing bug to pin down :lady_beetle:

Alrighty internet friends. I hope ya’ll have a great weekend and good luck on your projects!

Back at it with the journal entry for the testing section: Capstone Project - Task 5
TLDR; I found bugs! :beetle:

I used loom to go through the app and screen record a little, here it is if you’re interested. The video is about 3min

Overall, testing went well. I haven’t worked with mobile before, so there were some things to consider for me. Here are the bugs and how I plan to fix them/did fix them.

  1. The first bug I ran into was thinking there would always be internet connectivity. After authentication, I grab the user object from the database and set the user to nil in case of an error, and was originally going to retry but if there is no connection thats silly, it left me with the infinite wait spinner . :skull_and_crossbones:
  • To fix this, I plan to store the user object locally so that after authenticating with firebase, assuming they have offline support for a user whose logged into the app previously, I can pull the user with the auth ID out of local storage. If anyone has a better option, please let me know! This is my first auth rodeo considering an offline option.
  1. I am using Kingfisher for downloading and caching images. I wrote a script in python to fetch images from pexels depending on the location and name. (For example, a photo for Crane Cove in San Francisco, CA.) I stored the image URL in the DB and when I opened the page the initial load took a long time then a photo would jump in out of nowhere. I didn’t have a wait spinner and it felt unresponsive so I added one.

  2. The last issue I found was with the targets for favoriting and going back were small. I added a double tap gesture on the ZStack (I tried to add a clear tapable rectangle over the screen but that wasn’t working so I attached it on the ZStack. I didn’t see any issues but if there is something I’m missing please lmk.)

Overall, testing went well. I’m sure they’ll be more bugs along the way. Cheers all!

Looks great. Well done.

With regard to your images that take time to load, when you save them are you making use of JPG compression to reduce the file size when stored in the DB?

Thank you for the compression tip! I’m pulling the photos directly from pexels at this point (it’s a personal project) but if I do decide to go further I’ll definitely take a look at how to handle that! If there’s a course that covers it let me know, I really like Chris’ teaching style.

Thanks again!