Need More Personal Space?

CitySpire is the guide to personal spaces.

Jessie Griffin
5 min readMar 4, 2021

Have you ever wondered what the livability score of the city you live in is? I mean, you live there, right? Did you even know there was a score? Yep, there is. And, now that you know the score exists, wouldn’t you like to know how your city measures up to others?

Photo by Andrea Cau on Unsplash

We designed the CitySpire app with you in mind. You know what it’s like to live where you live, but you don’t know what it’s like to live somewhere else. With the CitySpire app, you can use just a little bit of data to give you an idea if there’s another city out there that’s better suited for you. And if you love your city but still want to move, you can find a place just like it.

Features: Fun and Frustrating

OktaAuth: Creating CitySpire came with its own set of challenges. We wanted to give the user (you) a safe, private login and profile experience, so we incorporated OktaAuth for user authentication. Your name, email, and avatar are pulled in from Okta, so you don’t have to set up yet another tedious, survey-like profile, giving away all your precious information to us (the app creators). Soon, we plan to provide iOS fans the ability to login with their Apple accounts (my preference). Still, for now, Okta will have to do.

Though most of the code for incorporating OktaAuth was provided in the Scaffolding, there were a few things we had to do to get it working, like waiting for someone to give us the correct keys. But, hey, that’s what teamwork is all about. Sometimes, you just have to wait on the other guy.

But the most frustrating part of the login configuration for me was the lack of instant gratification. We were provided mock accounts to test our app with, but they were incomplete. They were missing avatars and sometimes other information. Sadly, we never saw our avatar image passed in from the user account. For us visual people, the struggle is real. We know we got the code right, though (or do we?).

Left — Storyboard view, Right — Simulator view

Lottie: Adding the Lottie framework was both fun and challenging. Lottie allows us to add gifs (like this little walking guy) to visually describe the data provided by the app.

Lottie gif for walkability score.

There’s a short list of ways to incorporate a Lottie gif into your Xcode project. The one we chose was to add the JSON into its own little file in the same directory as the ViewController that would use it, and then call a few of Lottie’s methods to play the gif and loop the motion.

The real challenge came with constraining the image to the UIView. It only took a few quick tries to get it right, though.

Setting up a Lottie animation in viewDidLoad()

Here’s what you get with the CitySpire app:

  • A map view with a search function powered by Mapkit.
  • Animated gifs powered by Lottie.
  • The ability to create a list of favorites.
  • A quick view comparison of your favorites details about rental rates, walkability scores, crime rates, and population.
  • Login securely with Okta.
Map view zooms in on the location typed in the search bar.

What the future holds…

All the comforts and conveniences Apple users expect are in your future (or, they will be in CitySpire).

As I mentioned before, it is my sincere desire to provide login with Apple account functionality and a floating search bar with autocomplete capabilities. I foresee developing the autocomplete functionality being challenging unless Swift has a magic function for that. It will certainly be a point of learning because currently, the only way I’ve seen it done included having a predetermined list prepared. But we don’t want to limit you to our puny lists, so we’ll have to find a better way.

Another feature we expect in the future is some sort of livability score. How’s the water, you ask? Well, I hear in Boston it’s dirty, but in Florida, it’s just fine. Data about water potency could be included in a livability score, but I’ll have to defer to the Data Scientists about that one.

One other thing our fans have been asking for is the ability to drill down into zip codes. Instead of viewing info on a whole city, you’ll see statistics on areas you are interested in, like the county with the lake or the one with the Community College.

Your favorites in list view lets you compare details.

Technical challenges? Meh, maybe.

One thing I didn’t finish on this project was combining the Detail View into one view controller. To separate out some of the team’s work a little more evenly, we ended up with two view controllers that did almost the same thing. The fix is mostly in the segue and a little dependency injection, but they’re also on two different storyboards and calling different methods to collect the data. So, needless to say, I’ll have to do a little refactoring here, a little restructuring there, and then all will be well.

Getting ready for work.

Working in a team environment throughout my time on this project has helped me practice and sharpen my communication skills. I learned a little bit about what NOT to do and more about what I CAN do to foster clear communication among the team. I gained experience in planning and coordinating tasks, working with Trello boards, and working through issues created by my pull requests. Also, implementing a simple third-party framework helped me brush up on a few skills I’d forgotten.

--

--

Jessie Griffin

Just another Swift superhero, saving the world one line of code at a time.