Tag Archives: code

Swift: println isn’t NSLog

After banging my head against this the last few days, I thought I might share a little insight as I delve deeper into Swift. As tempting as it may sound to believe it, println IS NOT NSLog.

If you’ve looking to use the Devices function in the iOS Simulator to test an application launching via a push notification, or perhaps via a location update, you’re stuck trying to race to connect the debugger or better yet rely on printed statements and watching them.

The magic trick here is to remember that println does not show up in the iOS Simulator Console, but NSLog does. Further NSLog also works on device so can play with app while disconnected from your dev machine, then plug it back in and pull the logs via the Devices tool in Xcode.

Some additional details are here, which I sadly found far after figuring this out myself.

Getting Maven to Work with Android 17

I just suffered through this for a good part of an afternoon, so figured I’d blog it for anybody else. Apparently a bunch of stuff moved around between some versions of Android, so make soft links to:

./sdk/tools/aapt to ./sdk/build-tools/17.0.0/aapt
./sdk/tools/dx to ./sdk/build-tools/17.0.0/dx
./sdk/tools/lib/dx.jar to ./sdk/build-tools/17.0.0/lib/dx.jar

So, if you’re in your ./sdk/tools directory, you can:

ln -s aapt ../build-tools/17.0.0/aapt
ln -s dx ../sdk/build-tools/17.0.0/dx
ln -s lib/dx.jar ../build-tools/17.0.0/lib/dx.jar