A harmless Database update
I was debugging a Swift Mac app that I’m developing that uses Realm for a database. The version of RealmSwift I was currently using was 2.10.0 as specified in my Podfile.
I opened Realm Browser to inspect a record in my database. Having been recently updated to version 3.0.1, it alerted me that my database was using an older file format and offered to upgrade it. I accepted without thinking much of it.
An unexpected error
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
I wanted to share a quick tip I discovered that allowed me to more easily examine objects.
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.
This article discusses the techniques I use for bookmarking code and adding log statements for both Objective-C and Swift.
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).
Posted in Objective-C, Swift
Tagged bookmark, debugging, downcast, iOS, logging, macro, objective c, pragma, preprocessor, Swift, Xcode