Tag Archives: debugging

Debugging in LLDB with command regex

Overview

Add the following to ~/.lldbinit and examine Swift objects in LLDB with “mp myobject” for both iOS and macOS, including those in NSView for macOS.

command regex mp 's/(.+)/expr Swift.print(%1)/'

Read on for more info

Goodbye po

I wanted to share a quick tip I discovered that allowed me to more easily examine objects.

Continue reading

Advertisements

Thinking outside the box to debug: Charles Proxy, push and a forced crash

An issue on just one device

A couple of weeks ago, one of my colleagues reported that she found an issue with the iOS app for AAFES EXTRA, an app that I had developed for BlueSoHo for their client The Army & Air Force Exchange Service.

The iOS app was not displaying the expected updated content.  The Android app was working fine.  To make things more difficult, the problem was only occurring on one specific device and could not be replicated on any other devices, even of the same model.

Continue reading

Crashlytics download issue and provisioning profile debug

Unable to Download App

I was asked to fix an issue with an existing  app called SmartPak wherein users on iOS 10.1+ would see a warning message about the app slowing down their phone if they were using a 64 bit device.   The fix itself was pretty straightforward – the architecture settings did not support 64 bit builds and a Digimarc library needed to be updated.

As I prepared to distribute the app for internal QA, I ran into a more difficult problem.  I was unable to download the Adhoc Crashlytics build to any of my test devices.

unable_to_download

Continue reading

Logging and bookmarks with Objective-C and Swift

Overview

This article discusses the techniques I use for bookmarking code and adding log statements for both Objective-C and Swift.

ObjC_Swift_logging

Temporary Bookmarks

When I develop code I often find a need to temporarily reference different sections that I’m working on, either within the same file or in many different files.   Prior to Xcode 4 there was apparently a means to set and jump to bookmarks with keyboard shortcuts as mentioned in the article Killer Xcode Tips and Tricks – Tips 1 to 10 (see tips 7 and 8).

Continue reading

Using a video composition to process certain videos causes an Xcode simulator hang

Video Export Project

I am working on a project that will process videos taken with the camera or pulled from the Photo Library and export them to MP4 format, reducing the dimensions and bit rate.

As part of this process I am using the code for SDAVAssetExportSession that is a AVAssetExportSession drop-in replacement with customizable audio and video settings.

Video Composition

I make use of an instance of AVAssetReaderVideoCompositionOutput that is added to AVAssetReader in SDAVAssetExportSession.m.  I set the videoComposition property of the former instance to a composition that allows me to set the render size and some appropriate transforms for scaling, etc. (CGAffineTransform).

Continue reading