Our DNA is written in Objective-C

Jump

Introducing the POEditor.com API and Tool

If you want to be successful in international markets you need to localize your app in as many languages as you can. For iWoman we use POEditor.com. As the number of localization grows it becomes increasingly time-consuming to update all localizations in your Xcode project, let alone deal with plurals which are not supported in the XLIFF format.

Today I am showing off, how I got the update process to be a matter of seconds. I achieved this by writing a POEditor.com API and building a command line tool – I call POET (for POEditor Tool) which greatly simplifies the update process.

Read more

BSA Banner

DTCoreText 1.6.19

Hot on the heels of the previous release for DTCoreText this update hot-fixes several issues which were introduced in the previous release.

Read more

DTCoreText 1.6.18

Since the prior release of DTCoreText, 9 months ago, a few issues became apparent with Xcode 8. Some people contributed cool stuff like support for use in app extensions as well as tvOS support.

Read more

Bug: NSCollectionView Move Sections Crash

We are so foolhardy that we are using NSCollectionView in an internal project that gets widely used by an enterprise client of ours. We found this latest crashing bug while updating the application for macOS 10.12 wich is where the issue first appeared.

The only workaround at this time is to remove animation via animator() and replace it with a reloadData. Thus we vote NSCollectionView for worst Apple API on macOS.

This bug is filed as rdar://28337446 and on Open Radar.

Read more

DTFoundation 1.7.11

With the prior update to DTFoundation having been 5 months ago, there were two main areas where some tweaks were necessary: support for tvOS and fixing a build error on Xcode 8.

Read more

LLVM Crash

I found this LLVM compiler crash when updating a project for building with Xcode 8. At first I thought it had to do with #if DEBUG because the crash didn’t occur when I removed the conditional compiling block. But further experimentation showed that it is a specific line in this block that is causing the issue.

It is filed as rdar://28318984 and on Open Radar.

Read more

Missing TestFlight Builds

I could have sworn, that I uploaded build 1.0.6 (28) of a client’s app to his iTunes Connect before leaving the keyboard for the night. The next morning it still showed build 15. Turns out TestFlight makes some builds disappear, here’s what I learned, why.

Read more

Enhancement: Make NSTextList Public

Whenever I am tasked with adding a rich text editor to an app, I check if Apple has since done something in UIKit to support lists. Since they revamped the text system in iOS 7, unifying large portions with how they are dealing with text on macOS, I am getting my hopes up for every new release of iOS.

macOS is using the NSTextList class to represent lists and the code below is provides proof that this class also exists on iOS. So this Radar requests – probably not for for the first time – for NSTextList to be made public. It is filed as rdar://28254852 and on Open Radar.

Read more

Asynchronous NSTextAttachments (2/2)

In the first part of this two-part blog post, you saw how NSAttributedString works with remote images when parsing HTML, namely synchronously downloading them. I teased that I found a way to have NSTextAttachment also work asynchronously. In this second part I will walk you through how this is achieved.

Read more

Asynchronous NSTextAttachments (1/2)

In iOS 7, Apple introduced the NSTextAttachment class for embedding images into attributed strings. OS X, pardon macOS, did have this feature much earlier, already as early as 2001 in version 10.0 “Cheetah”. I suspect that they needed 7 years to migrate because the first needed to revamp the inner workings of UITextView and UITextField to natively work with attributed text, as well as modernize CoreText into what is nowadays referred to as TextKit.

With iOS 10 being released, we now have 3 major iOS releases supporting text attachment in standard UIKit views. About time, that we start using text attachments for displaying inline images in rich text.

Read more