Kyle Levin


// Exploring the world one line of code at a time.


  1. Cast well or get a Swift kick in the. . .

    Introduction In the olden days, if you wanted to retrieve a random object from an NSArray, you had to NSArray *array = @[@"One", @"Two", @"Three"]; NSInteger index = arc4random_uniform(array.count); NSString *randomString = array[index]; Enter Swift To accomplish the same thing in Swift, however, one must: var array = ["One", "Two…


  2. Bypassing a Disabled iPad

    Introduction A few days ago, I pulled my iPad out of my bag after a few hours and saw this lovely screen less than an hour before physics review: The Problem I'd left my bluetooth keyboard turned on and connected to the iPad after putting them both in my backpack…


  3. Listening to a server heartbeat using Node.js, iOS, and Socket.IO (Part 2)

    Introduction At this point, after following the first part of the tutorial, your iOS app should already be set up with the server located at sch.kylelevin.com. In this part, I'll cover how to use Node.js and Socket.IO to recreate this functionality on your own server! Setup…


  4. Listening to a server heartbeat using Node.js, iOS, and Socket.IO (Part 1)

    Introduction This two-part blog post will cover setting up and connecting to a server that's sending out a "heartbeat" at a regular interval. This is a common functionality when a client relies on up-to-date information. This example will cover cycling through a list of four colors, in sychronization with all…


  5. Security Vulnerabilities in Paper App

    Introduction A common pitfall for iOS developers, both new and experienced, is application security. Apple provides a generally solid and secure environment, but that doesn't mean developers can (or ever should!) disregard secure coding. There are plenty of relatively simple ways to improve the security of your app, so there…