vinnycoyne.com
Magical adventures in nerdery.

Send Jawbone UP sleep data to Runkeeper

I'm a big fan of Runkeeper and the Jawbone UP, so I was delighted when they announced that both companies were providing compatibility with each others' services. Unfortunately, the data sharing seems to only go from Runkeeper to Jawbone's network.

I regularly run with Runkeeper anyway, so that's not a problem, but I prefer using the UP to track my sleep (over the various sleep apps).

Given that the UP also integrates with IFTTT, and Runkeeper has a pretty sweet API, I figured there must be a way to get my sleep data out of UP and into Runkeeper.

Read More →


iOS - Simulate on-device memory warnings

The iOS Simulator has a handy feature that lets you simulate low-memory conditions, which is great for making sure your 'didReceiveMemoryWarning' code works as expected.

Unfortunately, this feature isn't available on-device (as far as I can tell). It is possible to trigger the low-memory notification by calling a private method, and so I've put together a small code snippet that does just that when you press either volume button on your iOS device.

Note: this code uses private, undocumented methods and will be rejected by the App Store review team. Do not ship this code in your app!

  1. In your Xcode project, link against MediaPlayer.framework
  1. include the following code in your app delegate:

#if DEBUG #import #endif - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { #if DEBUG // Debug code that lets us simulate memory warnings by pressing the device's volume buttons. // Don't ever ship this code, as it will be rejected by Apple. MPVolumeView *volume = [[MPVolumeView alloc] initWithFrame:CGRectZero]; [self.window addSubview:volume]; // Register to receive the button-press notifications __block id volumeObserver; volumeObserver = [[NSNotificationCenter defaultCenter] addObserverForName:@"AVSystemController_SystemVolumeDidChangeNotification" object:nil queue:nil usingBlock:^(NSNotification *note) { NSLog(@"Manually simulating a memory warning."); [[UIApplication sharedApplication] performSelector:@selector(_performMemoryWarning)]; }]; #endif } [https://gist.github.com/appsandwich/6007702](https://gist.github.com/appsandwich/6007702)


MKMapView and Zoom Levels: A Visual Guide

https://troybrant.net/blog/2010/01/mkmapview-and-zoom-levels-a-visual-guide/

An oldie, but interesting all the same. Ever wondered how MKMapView works? What exactly is the zoom level and how is it calculated? Read on.


Get Rid of the App Store's "Top" Lists — Marco.org

https://www.marco.org/2013/06/17/app-store-top-lists

Hmm, I don't think getting rid of the "Top" lists is the answer. I'd be all for making the charts "smarter", by taking into account things like regular usage and an install-delete ratio.

Having Apple become the sole curator of the App Store charts would hurt indie devs a lot more than the current setup. Not all of us have inside connections at Apple, so getting our apps on their editorial radar would be extremely difficult.

If we want Apple to level the playing field, then it's the ranking algorithms that need to be improved. It's not the listings themselves that are the problem, it's the mechanics behind how they're generated.


25 iOS App Performance Tips & Tricks

https://www.raywenderlich.com/31166/25-ios-app-performance-tips-tricks

This article gathers together 25 tips and tricks that you can use toimprove the performance of your apps, in the form of a handychecklist.

There are some real gems listed here. Perfect for squeezing every last drop of performance out of your app.


Speeding up OHAttributedLabel drawing

If you're using OHAttributedLabel in an iOS project and don't care about your labels auto-detecting standard links like URLs and phone numbers, set:

myLabel.automaticallyAddLinksForType = 0;

for each label. I've seen a reduction of over 30% in drawing time, which has made scrolling much smoother!


Debugging exceptions in Xcode 4.2

https://ijoshsmith.com/2011/11/28/debugging-exceptions-in-xcode-4-2/

Instead of relying on a brief error message in the Output pane, whichdoesn't contain much more than the type of exception and its errormessage, you get to see exactly where the problem is!

I didn't know this existed - super useful!


xScope

xScope

Created specifically for designers & developers, xScope is a powerfulset of tools that are ideal for measuring, inspecting & testingon-screen graphics and layouts.

Really awesome tool — can't believe it took me this long to try it. Highly recommended!

Download xScope from the Mac App Store.


MSDN Blogs

https://blogs.msdn.com/b/jw_on_tech/archive/2012/03/13/why-i-left-google.aspx

"Google was the rich kid who, after having discovered he wasn't invited to the party, built his own party in retaliation."


iTC: App sandbox not enabled

Protip: If you're getting an "App sandbox not enabled" error after uploading your Mac binary to iTunes Connect, and your app definitely has sandboxing enabled, be sure to check that Code Sign Application is ticked under your app target's Summary tab.