using Zendesk Swift API providers

Photo by Kelly Sikkema on Unsplash

Zendesk is a great tool to provide a ticketing system to our users, as well as a knowledge base articles, aka. FAQs. From my experience implementing it in iOS, Zendesk provides UI components that allow us rapidly include a help center in our projects. However, when we want the UI to look differently, it gets a bit more complicated since modifying the styles or simply having a different custom behavior is not straightforward nor scalable whatsoever. In this article, I am showing how to use Zendesk service providers to build a layer on top, and separate support system concerns.

Of…


Photo by Claudio Schwarz | @purzlbaum on Unsplash

After creating a macOS application to generate QR codes and facing a variety of problems, I thought it may be interesting to share the knowledge and the code I ended up with. I must say this is a simplified version of doing QR codes, however, for adding new features and increasing customization, this can be a great first step. Alright, let’s crack on the tutorial.

As I usually do when creating new features, I try to picture what the functions should look like and create the empty methods (a skeleton if you will) which later I’ll proceed to implement.

I…


An approach using vanilla Swift

Photo by Greg Rosenke on Unsplash

Hi developer. What I am about to show you is the way I normally hook ViewModel properties to the Views/ViewControllers using Swift. If your project is using SwiftUI and/or Combine, this is probably not relevant to you. However, the concept of binding views to property changes is quite similar. I’ll try to be as clear and concise as possible, so details such as adding UIViews to the hierarchy or DispatchQueues are looked over.

Before I go any further, a quick disclaimer — This is an approach I’ve found useful, that doesn’t mean it’s right or wrong whatsoever.

Said that, these…


Using SwiftGen and [Phrase]

Photo by JACQUELINE BRANDWAYN on Unsplash

In this article, I’ll show you one of my favorites Localization flows I use for iOS applications. As you might already know, localization is an essential part of almost every iOS app but unfortunately, it’s usually relegated to later phases where sometimes it’s too late, thus very expensive and hard to refactor. With this flow that I am about to elaborate on(as well as many others on the internet), it’s possible to easily isolate what is happening on the localization side (pulling strings, generating constant files, and others), and also make the maintenance smoother and more error-prone. …


Photo by Jeffrey Brandjes on Unsplash

Having done a few animations with SwiftUI, I have realized how tough it is to use the withAnimation() modifier on multiple properties and views at different times or sequentially. Besides, when it comes to moving views around in a very particular way withAnimation() may lack clarity, extensibility, and sometimes organization. That’s why I’m going to show you the AnimationSequence framework I’ve written that wraps the beauty of SwiftUI.Animation and declutters our code a bit. Let’s dive into it.

This is what I normally find when looking for tutorials on Google or YouTube on how to animate views sequentially. …


Photo by Aron Visuals on Unsplash

Coding an iOS app almost always involves parsing data from a backend response or a JSON file into the structures or the classes of our domain, thus, decoding data should be as clean, error-prone, and transparent as possible.

// 1. Parsing the json (wherever it comes from) to data
let jsonData = JSON.data(using: .utf8)!
// 2. Decoding the data to the actual structure
let fact = try! JSONDecoder().decode(CatFact.self, from: jsonData)

This is the “most” common way to do it, however, these two lines are force-unwrapping the values, a practice not recommended in production due to the “unexpected” crashes that can…


Photo by Glenn Carstens-Peters on Unsplash

Many times in iOS development, we come across the task of sorting an array, and then we write a piece of code like the following, in any place of our app where it’s needed. Notice that the array of animals is not defined yet, neither is the Animal structure, but don’t worry, they will be specified later on in this article.

animals.sorted { (left, right) -> Bool in {
return left.id > right.id
}

1. The problem

What if, instead of sorting the array of animals by id, now we need to sort it by name or any other property the Animal has…

Cristhian Leon

Curious, passionate iOS Developer, interested in game design, and clean code principles.

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