www.robkerr.com
www.robkerr.com

mobile development, cloud computing and building great software

Tags


Twitter


www.robkerr.com

Swift

Articles pertaining to Apple's new Swift programming language, the emerging standard for iOS development.

Benchmarking Xcode Builds

I recently started working with a fairly large iOS/Swift code base--one which takes several minutes to complete a full build from a clean folder. Since I have several macOS workstations on-hand, I naturally was curious how they compare in my most common use case--developing Swift iOS applications. Is there one that would give me less ti…

Rob KerrRob Kerr

Testing whether a view is currently visible

When manipulating iOS UI from background threads, or in response to NSNotification messages, you won't always be sure that the view your controller is working with is on-screen. How can you check? Relatively easy. Here's a simple check from within the context of a View's ViewController: if self.isViewLoaded() && self.view.window…

Rob KerrRob Kerr

Install Swift 3.0 on Ubuntu Linux 16.04 LTS

Since Apple released Swift to open source last year, there's been a grass roots movement to begin building a server-side ecosystem around Swift. Before doing any server-side development with Swift, though, it needs to be installed first! Below are the steps I took to install Swift 3.0 on my AWS EC2-based Ubuntu 16 LTS development server:…

Rob KerrRob Kerr

Facebook login using the iOS API with Swift

A common requirement for consumer mobile apps is to allow users to authenticate with their FaceBook credentials. Let's explore why, and then go ahead and make the integration with iOS and Swift Why use Facebook authentication? Why would we want to use Facebook auth instead of providing our own authentication database? Really it boils do…

Rob KerrRob Kerr

Swift 3.0 substrings made easy

Swift is a fantastic, modern language, and has fast become my favorite. So much of what's built into it is intuitive, simple and makes coding much more expressive than older, more syntactically heavy programming languages. But...sometimes its sophistication makes what was simple in older languages more complicated. Case in point is takin…

Rob KerrRob Kerr

Big Improvements in iOS10 Swift3 CoreData

Having a built-in relational database in iOS via CoreData is a pretty nice feature of the mobile OS. I've always liked using it, but like many developers I've never appreciated the volume of boilerplate code to create and maintain just to setup the basic scaffolding in a new project. As much as I appreciate CoreData being totally a "bui…

Rob KerrRob Kerr

Accessing AppDelegate in swift 1...3

We all learned in uni that global variables are undesirable, but most iOS applications need to access some global members of the shared UIApplication object. I appreciate that the syntax is getting better and better, but it's still a moving target and challenges my noodle to keep up. Here's a quick cheat sheet on accessing AppDelegate th…

Rob KerrRob Kerr

Swift 3.0 for loop syntax

If you've been programming for a while, whether you started with K&R C (like me!), or even C++ or Java, you're probably used to the following C-based for loop syntax: for (int i=0; i<10; i++) { printf("%d", i); } // printf() is called 10 times Since most of my coding is in Swift for the last few years, I've been adjusting to it…

Rob KerrRob Kerr

Connecting a Native Swift iOS App to Salesforce.com Data

Enterprise mobile apps most often need to integrate with broader platforms. This quickstart demonstrates how easy it is to integrate an iOS mobile app with the Salesforce.com platform. Install Node.js and npm If you haven't installed node on your system, you'll need to do this first. There are several methods for installing node. You ca…

Rob KerrRob Kerr

Developing Robot Runner.app for the Apple Watch

The news on Apple Watch ordering day when I rose at 6:30 US/Eastern was that the first production run had sold out--which I expected. Unexpected was that I found one (and only one!) style available for first wave delivery. The watch arrived April 24 (Friday) via UPS as promised. Time to Code! On Friday I enjoyed using the Apple Watch, and…

Rob KerrRob Kerr

Initial thoughts on Apple's Swift Language

If you're not a nerd, you don't know what this means This past Monday, Apple announced that iOS developers working on native applications would have a brand new language to work with: Swift. For those doing (or have done) any iOS or OSX native development, this is the part of the presentation where they stopped checking their e-mail, sat…

Rob KerrRob Kerr