Transition to tvOS wasn’t hard. However, some things created roadblocks

Apple tv remote control in front of the Apple tv.
Apple tv remote control in front of the Apple tv.
Photo by Kelly Sikkema on Unsplash

I started working as an iOS developer seven years ago. Until February this year, iOS was the only platform I developed apps. Transition to tvOS wasn’t hard. However, some things caused problems and wasted time. Here are eight pieces of advice I wish someone gave me when I started working on the tvOS.

There is no particular order here. Depending on the project you work on, some information will be more important to you. Moreover, these tips are not advanced features; these are the basics you need to deliver your tvOS project.

Important note before you continue reading. For many…


Photo by James Harrison on Unsplash

CoreData is one of the frameworks I use quite often, and I can’t imagine using it without fetched results controller (FRC) because they are so powerful and yet easy to use. This demo will show you how to get and filter your core data objects using FRC.

Fetching data

We will add our FRC in our view model. To use FRC, our class has to conform to the NSFetchedResultsControllerDelegate protocol. To conform to the protocol, our view model needs to inherit NSObject class.

Look at the properties above. CoreDataBookService is a helper class that will provide us the fetch request and…


Photo by Markus Spiske on Unsplash

Every now and then, we run into an issue with code we wrote a while ago. This article explores how we might tackle such a situation when refactoring a huge legacy system.

Deep comprehension of a system is necessary when wanting to apply any important changes. On rare occasions, we only need to invest a short time to study the code before we can start improving it. More often, we have to do some debugging first, even to make some unplanned modifications before we can start working on the initial task. I call this process refactoring for clarity.

Refactoring for…


Photo by Mike Von on Unsplash

At the start of 2020, I made a goal to read 30 books. For some people modest, but for me, a very ambitious goal. I tend to keep in balance fiction, and nonfiction works. A lot of those were great, and a few terrible. I won’t write about each and every one of them. However, I will give you a recommendation for the four best ones. Here is a complete list of books I read in the previous year.

Fictional books

Serbian Authors

  1. Amarcord — Zoran Živković
  2. Impossible encounters — Zoran Živković
  3. The Library — Zoran Živković
  4. The Bridge — Zoran Živković
  5. The Encyclopedia…


Photo by Marek Levák on Unsplash

Refactoring an unfamiliar working system is both risky and complicated. Add to this the need to simultaneously implement new features and persuade management to allocate time for the job to the equation; the task may seem impossible! However, if you create a good plan, this will be far easier than it may seem.

Please note: I won’t write about refactoring examples. Instead, I will leave that for another post. The main goal of this article is to show you how to begin the process.

Our starting point

The app that my team inherited didn’t have production issues. With 1.1M users, it was 99.9%…


Amazing animation by Charles Patterson

When we need to persist data, Core Data is always my first choice. However, there are some cases when Core Data isn’t the best solution. If we have a considerable data set, and we need to perform high-speed search queries, full-text search (FTS) is the solution. Unfortunately for us, Core Data doesn’t support the FTS. Therefore we need to use SQLite.

Before you continue reading, I want to let you know that the code you are going to see is just a proof of concept. Many things can be better, handling errors properly for a start. …


Software development is very challenging. Firstly you have to understand the problems you are solving. Then you need to think of the solution. Depending on the solution, you have to research proper technology. During the process, you need to have a clear perception of the system you are working on and to think longterm. If not any future changes will be hard to pull off.

It’s not enough to be a great engineer to develop and maintain the software. The effort you invest in the process has to be excellent too. I’ve made tons of mistakes only because I’ve lost…


Thanks to undraw for the illustration

Writing beautiful code is often underestimated, especially by inexperienced developers. The main reasons are that writing beautiful code takes more time, and you won’t see its benefits right away.

What is beautiful code?

Beautiful code is clean, well-organized, and simple to upgrade. It is easy to read, understand, and navigate. To create and maintain such code, I follow eight simple principles.

1. Have coding standards

Coding standards are a set of coding rules. There is no universal coding standard, every product team might have its own written and unwritten rules. Among important ones, I would mention guidelines for

  • naming variables & naming methods,
  • how to group methods &…


Flow coordinator pattern is excellent for structuring app navigation and making code clean and reusable. However, it has some flaws too. The coordinator is not working great with native navigation and back swipes.

The goal

The goal is to modify flow coordinator so we can use it both with custom and native back action, as well as swipe back. However, it’s a necessity to maintain clean code which is easy to read, reuse and upgrade.

The problem

The major problem with UINavigationController is that clicking on the default back button, or navigating back with a swipe, pops the view controller and the coordinator is…

Pavle Pesic

Senior iOS Developer & Mobile Team Lead

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store