Posted on

ByteCoin

I finished the ByteCoin project, which gets the latest Bitcoin price in various currencies. I had a bug where I forgot to set the coinManager.delegate = self but I tracked that one down pretty quickly. There weren’t any instructional coding videos with this one, just lots of referring back to the Clima app we made previously. We did get to play with the UIPickerView though.

Posted on

Bugs for Christmas

Today I start four days off for Christmas, so naturally I am back into Swift programming. I am working on the Clima app which finds the weather for a given city. I just started to implement CoreLocation but I came across a bug: didUpdateLocations was not getting called in my CLLocationManagerDelegate extension. I did some searching on Stack Overflow (which today I actually joined after being a lurker for years) and the solution was to call:

locationManager(_: CLLocationManager, didUpdateLocations locations: [CLLocation])

instead of:

locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation])

which was the default code dropped in when I code completed didUpdateLocations.

I also had an issue when looking up locations that had a space in their name, such as New York or Los Angeles. The urlString wasn’t converting these spaces to ‘%20’, so I changed it to:

let urlString = "\(weatherURL)&q=\(cityName)".addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!

Okay, the turkey is done and I am ready for Christmas lunch!

Posted on

Development Update

I have just renewed my Apple Developer account which is a good time to reflect on my journey so far. I graduated with my Bachelor of Information Technology in 2020 from RMIT although I have to wait until Covid is over before I can attend an actual ceremony. My main job has been steady as a Data Officer for Suez but I have tried some projects on the side, including a farming style game I coded in Java. But in the Black Friday sales I picked up Angela Yu’s iOS Development and Web Development courses. The last time I programmed in Swift was back in 2018 as part of my degree so I have been basically starting at the beginning.

I am finding Angela’s course really engaging. She takes enough time to explain new features and demonstrates them practically, and there are numerous “pause the video and see if you can do it” challenges which really reinforce what you’re learning. The course was created for iOS 13, currently we are up to iOS 15 but the only issues I have had was using image literals and the ‘automatic’ assistant not finding the associated swift file when changing the View Controller, but these are quickly fixed by deleting the DerivedData folder for the project in the Xcode Library.

So far in the course I have coded a magic 8 ball, dice roller, xylophone, egg timer, quiz game, BMI calculator and bill splitting app. I’m currently working on the weather information app which finally gets into some networking.