Page 3 of 5
There are many reasons to use more than one programming language in a project. In some cases, a lot of work has gone into building a framework (years maybe). Rewriting the whole framework to have the codebase in the same programming language, might not be the best use of resources. You can see this in macOS between the two main programming languages, Swift and Objective-C (three counting C). In this post, I’ll show how to use Swift code in Objective-C, and how to use Objective-C code in Swift. We are going to explore how the interoperability occurs by building the code manually to get a better understanding.
Read More...
Apple’s network APIs are many, the older APIs are well documented, and you’ll find lots of examples. Not so much about the new Network framework. One factor might be that the name is not that search-friendly. In this post, I’ll explain how to use the NWFramework by creating a basic TCP server-client application.
The server will work as an echo, any message received will be sent back to the client. The client will allow us to send messages to the server and display the server response.
Read More...
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...
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...
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...
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...
We can install Fastlane as a Homebrew cask or as a gem. I’ll go the gem route.
add a Gemfile on your project:
1
2
3
4
| #Gemfile
source "https://rubygems.org"
gem "fastlane"
|
We are going to use bundler. If you are familiar with Ruby development, you will find this standard procedure.
1
2
| $ bundle update
$ bundle install
|
now we can run fastlane because we want to use the version we currently installed, we will run it:
Read More...
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...
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...
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...