Sign in

Emanuel G. Luayza
iOS Engineer at Rocket Insights

For the last couple of weeks, I’ve been working on a project where I had to delay the camera feed of an iPhone with some milliseconds.

Using the AVFoundation Framework allows us to customize and configure the camera’s settings. It’s the highest level framework for all things audio/visual in iOS, it’s very powerful and it gives you all the flexibility you could possibly want.

The process of creating a delay with a great user experience was very difficult. So I hope this tutorial saves a lot of headaches for those developers who need to do the same.

Let’s dig in!

Allowing our App to access the camera

During the last months, I’ve been working on projects where the UI had to be created with code. Xib files or Storyboards were not used, and UIKit framework was applied instead of SwiftUI framework.

Sometimes it’s painful to create the UI with code because we cannot see what we are building until we run the App on a device or on an iOS Simulator. Another main problem is the amount of code we have to write: create controls, set them up, add constraints, etc. The code could turn out a disaster if we are not neat.

In this post, I’m…

  • Did you ever have to deal with Design Architectures on iOS?
  • Did you have to create a lot of folders and files all the time to comply with the architecture?
  • Probably you had to copy and paste a lot of code and then rename it, didn’t you?

Well… What if I tell you that I have a solution?

There is a moment in a developer’s live where you have to leave our zone of comfort. Where you know that the things will be harder and you’ll have to deal with new responsibilities, knowledge, languages, tools, etc. Probably you’ll ask yourself a lot of questions in the middle of that situation, where the stress takes an important leadership. By questions I mean:

  • What will happen?
  • Will I be able to deal with it?
  • Will I perform well?
  • Do I have what it takes for this?

But, honestly, you won’t know until you are there.

I’m here to tell you…

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