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.

Music Top 10 from 2014

Like last year and the year before, here’s the list of music I’ve listened to most as scrobbed to Last.fm.

Top Artists

  1. Above & Beyond – 120 listens
  2. Tensnake – 67 listens
  3. Brika – 57 listens
  4. Chromeo – 56 listens
  5. She & Him – 54 listens
  6. Pink Martini – 50 listens
  7. Phantogram – 45 listens
  8. Rise Against – 42 listens
  9. Porter Robinson – 39 listens
  10. Tycho – 38 listens

Top Songs

  1. Brika – Options – 27 plays
  2. Indifferent Guy – Danger – 15 plays
  3. Above & Beyond – We’re All We Need (feat. Zoë Johnston) – 13 plays
  4. Styles – Good Times – 12 plays
  5. Ed Sheeran – Sing – 12 plays
  6. Mystique – Brand New  – 12 plays
  7. Brika – Expectations – 11 plays
  8. Naughty Boy – La La La – 10 plays
  9. Kiesza – Hideaway – 10 plays
  10. Chromeo – Over Your Shoulder – 9 plays

Observations

  • While I’ve been continuing to listen to house and electronica, the style has changed quite a bit to be less four on the floor and dancey and more low key and mellow. Examples such as Mystique’s Brand New and Danger by Indifferent Guy.
  • There’s only one hip hop song this year and that’s quite a throw back with Style’s Good Times.
  • Brika was one of my favorite new artists last year and I’m excited that she just released a full album which includes two songs from the most played list: Expectations and Options.