Development

Intercepting iOS Network Request Calls with Proxyman

Published on

Intercepting iOS Network Request Calls with Proxyman

Working with network APIs can be tricky, especially when debugging. You oftentimes have to ask yourself if your app is sending and receiving the expected information. You also often worry about whether the web service returns whatever it promises it will return. Working with APIs is both easy and tricky due to all the implications behind the scenes. What happens if the service goes down and sends unexpected responses? Or if your app loses internet connection? Using a proxy to intercept network calls will help us answer these questions.


nil-null-mess in Objective-C and Swift

Published on

All programmers are familiar with the concept of nullability. Whether something exists or not. Whether something is there or not.

Objective-C is very dynamic when it comes to dealing with nullability. All Objective-C programmers are familiar with this phrase:

messages can be sent to nil.

Which means that nil itself can call methods, safely enough, without crashing.

In Swift, we have a bit more safety. We can send “messages” to nil, but only if they are the result of a chained optional. nil can only be a thing when we are working with optionals.


Understanding Basic Data Structures in Swift: Dictionaries in Depth

Published on

Whether you are a seasoned developer with a lot of code out in the wild world, or you started learning programming this week, chances are you hace used (and seen) dictionaries being used in many places. Also known as hashmaps or hash tables, dictionaries allow us to store key-value mappings, from one object to another.

In this article we will study this structure which is known by everyone, and we will also learn about its quirks and unknown features.


Understanding Basic Data Structures in Swift: Sets

Published on

I’m introducing a short small series in which we will talk about basic data structures in Swift. My goal is not to show how they are implemented internally, but rather to show when they can be useful.

In truth, unless you have studied Computer Science to some capacity, chances are you are missing on a lot of powerful existing data structures that can help you write better code. I have been studying iOS development for a long time with many resources, and none of the resources ever dive into useful data structures, such as sets. These sources tend to focus on arrays and dictionaries only (as the focus is iOS development, and not necessarily computer science), not teaching other structures that are actually really useful in the iOS Development world. I have never seen an iOS dev resource that covered these structures as deeply as my computer systems engineering courses did.


Being an iOS Developer in Bolivia (and South America)

Published on

Happy New Years everyone! To kick off this year, I wanted to write a non-technical article. This time I want to focus on a topic that you won’t find in many other places, and that is what it is like to hunt for iOS jobs in Bolivia, and what my experience has been like being one here. By the end of this article, you will hopefully understand a very different market compared to countries such as the USA, and you will be able to make a decision on whether this is a field you want to pursue or not. What I’m going to be writing about applies to Bolivia, but keep in mind that South America in general has very similar conditions and markets.


Getting Started with the App Store Connect API

Published on

In 2018, Apple introduced the App Store Connect API. We as iOS developers interact with App Store Connect almost daily. We like to see our sales reports, analytics, check how our apps are doing. Occasionally, we may need to register a new device or manage our users.

Many of these tasks are so common that it was necessary to get an App Store Connect API at some point. Having an API allows us to automatize some aspects of our day to day tasks on App Store Connect, and to make some tasks easier and faster. In this article, we will explore a few features of the App Store Connect API.


Understanding the Limited Photo Library in iOS 14

Published on

This year, Apple introduced a new feature that gives users even more control over what photos may third party apps see when they see a Photo Picker. The system will first present an alert asking users if they want to give access to their photos at all, and they have the option to give access to all their photos, or only to the photos they choose.

This is great, but it has been a very confusing experience for both users and developers alike. In this article we will explore this new privacy-focused photo picker and how to make good use of it without compromising too much of either usability and privacy.


Lazy Sequences in Swift

Published on

Lazy Sequences in Swift

If you have been writing Swift for a while, you have undoubtedly used high order functions such as .map and filter. These higher order function work on any collection, and they are very useful when we want to quickly transform objects into something else, or when you want to do other operations in sequences that would otherwise take more than one line of code if you were to make them with loops.


Quick Tip: Custom Debug Printing with CustomDebugStringConvertible in Swift

Published on

Printing stuff to the console is a simple but powerful step we can take when debugging our apps. But there are times when we want to print an object and we actually get something entirely different, often also useless.

For example, this commonly happens when working with classes and printing instances of them.

class User {
  let id: Int
  let name: String
  
  init(id: Int, name: String) {
    self.id = id
    self.name = name
  }
}

let andy = User(id: 1, name: "Andy")

print(andy)

In a playground, this will print:


Understanding KeyPaths in Swift

Published on

KeyPath. It sounds like a very fancy word. And it is a feature you have likely used it, either knowingly or unknowingly. KeyPaths are one of my favorite features in Swift, but they can be a bit tricky to understand. In this article we will explore what KeyPaths are, and when you may want to use them.

Understanding KeyPaths

In simple words, a KeyPath is a reference to an actual property instead of a value.