Page 4 of 7

Understanding a few concepts of macOS applications by building an agent-based (menu bar) app Sep 3 2019

With advances in the frameworks and tools we use to develop software, creating a new app seems like magic. We just click a few buttons, and everything is created for us. I enjoy magic, but I think that sometimes we end up being Framework “users” without any real understanding of what is happening. In this post, I’ll explain a few concepts of how macOS apps work, so hopefully, we understand the ecosystem better.

Read More...

My Xcode gitignore template Aug 28 2019

I would like to change the template Xcode uses to generate a git repository, but I haven’t found how. So at the moment when I want to use my .gitignore template I just pull it from a GIST.

This y my Xcode .gitignore template. I use the raw address and Curl to copy it.

1
$ curl -L https://gist.githubusercontent.com/rderik/8550f34a93beaf62aacc9ac7d746b69c/raw/.gitignore > .gitignore

And that’s it for the moment. If anyone knows how to change the git template Xcode uses let me know.

Read More...

Using Xcode's visual debugger and Instruments' modules to prevent memory overuse Aug 27 2019

An essential step before you deliver your application to your users is to make sure that your app is not overusing your user’s resources. In this post, I’ll show how to use Xcode’s visual debugger and the command-line counterparts to check for common memory problems and also how to use Instrument’s to debug memory leaks.

First, let’s see which are the most common memory-related problems.

Memory issues

There are two common types of memory problems.

Read More...

Understanding XCUITest screenshots and how to access them Aug 20 2019

Getting the screenshots of your app doesn’t need to be complicated, and it shouldn’t require you to install additional applications to do it. Sure you can use any other third-party library, but sometimes simple is better. Also, it is always fun to explore and understand more of the process so you can be the judge on what works best for your case. In this post, I’ll show you how to work with XCUIScreenshot so you can have easier access to your screenshots and later you can build any scripts to process the screenshots.

Read More...

Automating build and TestFlight upload for simple iOS apps Aug 13 2019

Sometimes we only want to do the simplest of tasks of build and upload to TestFlight without having to spend much time doing lots of configuration. Maybe we are only testing a minimum viable product (MVP) and want to make it accessible to beta users. No matter the case, we also would like to understand the process behind the magic behind the graphic interface deployment. In this post, I’ll show the basic process of building and uploading an app to the Apps Store Connect(especially for TestFlight) using the command-line. And also, how can we automate it with a simple script and the tools already provided by Xcode.

Read More...

exportOptions properties Aug 13 2019

From the help obtained on

1
2
3
$ xcodebuild -version
# Xcode 10.3
# Build version 10G8

This are the options available for the exportOptins Property List file:

compileBitcode : Bool

For non-App Store exports, should Xcode re-compile the app from bitcode? Defaults to YES.

destination : String

Determines whether the app is exported locally or uploaded to Apple. Options are export or upload. The available options vary based on the selected distribution method. Defaults to export.

Read More...

Solutions to common scenarios when using UITextField on iOS Aug 5 2019

At some point on your app development career, you’ll find yourself working with text fields to get some data from the user. Collecting data from the user sometimes involves additional work than merely reading text from an UITextField. For example, if we have a field at the bottom of the screen, and we show the keyboard, the keyboard might cover it. We have to do additional work to fix this. Like this, there are many other small tasks that we would perform while working with UITextFields. In this post, I’ll show how to handle some of the most common scenarios. I’ll cover:

Read More...

Building a CLI tool using Swift and Vapor's Console module Jul 30 2019

Building a command-line interface (CLI) tools is a complicated task. We work on the logic of our application and also have to deal with other details like parsing parameters, handling the correct display directives depending on the TTY, etcetera. Vapor, the web framework, uses a module called Console (called ConsoleKit on V4) to build their CLI.

Vapor’s command-line tool provides a lot of functionality, and at the same time, it looks quite smooth. I would like my CLI tools to look more like their command-line tool.

Read More...

Using Swift for scripting Jul 23 2019

Swift is a powerful language. It can be used to create command-line tools, iOS apps, watch OS apps, macOS apps and server-side applications. However, sometimes, we only need to complete a small task, maybe do some automation on our local setup or build a simple script to process data and then send it to another tool. Using Swift for small tasks is what I want to share in this post, not how to build command-line interfaces (CLIs) but how to use the language you already know, Swift, and use it for scripting.

Read More...

Sharing information between iOS app and an extension Jul 16 2019

If you decided to create an Extension for your app (maybe a Today Extension), you will quickly find out that you need to access data from your main app. And soon after, you will find out that you can’t access files in your main app directly from the extension. The process is not as easy as you thought when you started. The good news is that there are a few solutions, and they are not that complicated. In this post, I’ll show you how to use App Groups and embedded frameworks to create the bridge between your app and the extension.

Read More...

$