• Thinking about Memory: Converting UIImage to Data in Swift

    How often do you convert a UIImage into a Data object? Seems like a relatively straight forward task, just use UIImageJPEGRepresentation and your done. After doing this I started seeing memory spikes and leaks appear which got me thinking on how I can better profile different options for performing this… Read more ⇢

  • Stopping Tap Gesture from bubbling to child controls

    The default behavior is for your tap or other gestures to bubble up to their child controls. This avoids the need to add a recognizer on all of your child controls. But this isn’t always the behavior you are looking for. For example imagine you create the below modal view.… Read more ⇢

  • Swift excluding files from iCloud backup

    Having your device automatically back-up to iCloud is one of the better services Apple provides. Although not new, iCloud (introduced in June of 2011) back-up is one of the better services Apple has rolled out. If used right this removes a whole class of end user data lose fears. However… Read more ⇢

  • Forcing iCloud logout on your Mac

    I think everyone, at least developers, have at least one iCloud account which is linked to an old email address.  To address this I’ve been migrating mine over to another domain.  The process is extremely easy, just visit appleid.apple.com and change your Apple ID email address. Although easy, this can… Read more ⇢

  • Check if GestureRecognizer added

    One of my new projects dynamically generates a UI based on a DSL entered by the user. This leads to a host of defensive coding challenges since there is multiple code paths that can add controls and their associated gesture recognizers. I found it helpful to add guard statements that… Read more ⇢

  • Removing CGPDFDocument Passwords

    Working with PDFs on mobile is a pain. On the bright side at least Apple provides us CGPDFDocument On the bright side Apple does provide CGPDFDocument. If you’re on Android you are left to 3rd party alternatives such as iText and PDFBox. However examples on how to use CGPDFDocument are limited… Read more ⇢

  • Checking if device Passcode is enabled using Swift

    If you spent any time building apps for the Enterprise or business space odds are you have turn into the requirement to check if the device has a passcode enabled. Mobile Device Management (MDM) Solutions are full of tools that handle this for you.  More often I’m finding that organizations are… Read more ⇢

  • Simplifying using Keychain Access Groups

    Keychain sharing is an easy and secure way to share information between apps on the same device. This is even more useful when you think about sharing information between an app and it’s extensions. In my opinion Keychain is just as easy as using NSUserDefaults but provides a greater level of… Read more ⇢

  • Solving Appcelerator Studio’s “Invalid Request” when Compiling

    I use Titanium for many of my projects and have found it a great framework. Just like with any tools every once and awhile you run into some interesting errors. I am often switching networks and every once and awhile I get the below error in the Appcelerator Studio console… Read more ⇢