The Single Sign-On Enigma

Let’s say that you are building an application that needs some way of authenticating a user. Let’s also say that you don’t want to have your own user database and worry about keeping user information secure. This sounds like a perfect opportunity for identity federation. Identity federation allows you to offload the authentication of a user to the selected system and then the user can authorize your application to access their information....

Thoughts on WWDC 2018

This year’s WWDC was supposed to be a sparse in terms of new announcements (if the rumors were to be believed) due to Apple changing up the feature set of their major releases due to the poor reception of iOS 11 and macOS 10.13. In fact, iOS 11 has an atypical distribution share compared to iOS 9 and 10 when they were a year old (low 80s instead of high 90s)....

WKWebView is Weird

Up until iOS 8 (2014), displaying web content in an application required you to either launch out to Safari or use UIWebView. The benefit of using UIWebView was the the user did not have to leave your application, but the downside was that UIWebView was significantly underpowered when it came to Safari as it had (and still does) the benefit of a more modern rendering and JavaScript engine, so UIWebView content did not perform as well....

Protecting Data with Biometric Authentication

On the Apple platforms, the keychain is the database provided by the system to store small bits of data securely. Although the data can be anything, the keychain is geared towards certain types of data: passwords, certificates, keys, and identities. With the advent of Touch ID and Face ID, an additional layer of security was added since the keychain items themselves can be stored in the secure enclave (ECC keys only) but also using biometrics instead of passwords to authenticate the use of items reduces the risk of accidental exposure....

Asynchronous Testing

Writing concurrent code has many pitfalls and because of the inherit complexity, testing that code may also prove difficult. By leveraging XCTest, the test cases default to synchronous tests (i.e. when the test hits the last line in scope, it ends). Now, some developers may try to solve this by adding sleeps or manipulating the run loop, but those methods are unreliable or can cause side effects. To properly handle parallel scenarios, XCTest provides an API that allows you to create expectations for the outcome of an asynchronous operation by adhering to the XCTWaiterDelegate protocol....