Ad

Our DNA is written in Swift
Jump

-fobj-arc is not supported on platforms using the legacy runtime

The Cocoanaut asked on Twitter:

“Does anybody know what this error means? (compiled on a white MacBook with 10.7.5 and Xcode 4.6.3)”

He attached this screenshot:

-fobjc-arc not supported

I’ve been seeing this error quite often lately and so I’d like to document my answer for posteriority.

Read more

DTRichTextEditor 1.6.4

This is a maintenance update for DTRichTextEditor which includes several fixes for iOS 7. It also brings all the improvements from DTCoreText 1.6.8 into our commercial editing component.

Read more

Radar Double Feature: Xcode Crash and Unit Test with UIFont

While working on unit tests for DTCoreText I stumbled upon an issue that has two aspects, one for how you set up unit tests and the other is a crash that is new as of Xcode 5.0.1.

Consider this simple unit test:

- (void)testExample
{
   UIFont *font = [UIFont fontWithName:@"Helvetica"
                                  size:20];
   STAssertNotNil(font, @"font should not be nil");
}

I consider it esoteric knowledge that you have to have a test host in place if you want to instantiate a UIFont inside a unit test. This is why I am filing it as a bug report, since it “might lead to developer confusion”.

In the least this should be documented somewhere. You will also find a description of a minimalistic workaround for both issues.

Read more

DTCoreText 1.6.8

This update for DTCoreText is our most error-free release ever! We added tons of new unit tests and added code coverage monitoring via Coveralls. And in doing so we found a plethora of little bugs creeping around in little untested (“uncovered”) code.

Read more

DTFoundation 1.5.4

This update to to DTFoundation is a maintenance release. It adds code coverage monitoring via Coveralls and fixes some very minor issues.

Read more

BarCodeKit 1.2.0

This update to BarCodeKit establishes full compatibility for iOS and Mac. You can now use BarCodeKit to generate images of bar codes for display and print on both platforms with identical features.

Read more

Radar: Enumerating NSAttributedString Attributes on Multiple Threads causes EXC_BAD_ACCESS

This bug has been causing me grief for the last month or so, as it was hard to pin down without a concrete use case that can reliably reproduce it. GitHub user brovador finally was able to narrow it down to be able to repro it every time.

There appears to be a bug in NSAttributedString that causes an EXC_BAD_ACCESS if you try to enumerate certain attributes over a longer range on two separate attributed strings from two background threads.

I filed it as rdar://15139980 and on Open Radar. The sample is the DTCoreTextExceptionExample on our Radar Samples GitHub repo.

Read more

Xcode Coverage

Code Coverage is described on Wikipedia as:

… a measure used to describe the degree to which the source code of a program is tested by a particular test suite. A program with high code coverage has been more thoroughly tested and has a lower chance of containing software bugs than a program with low code coverage.

Less bugs? Yes, please!

Read more

TopLayoutGuide 97 Pixels?!

When implementing iOS 7 support for a client’s app I got a result that might stump even seasoned Cocoa programmers.

On iOS 7 views generally go behind translucent bars. To still get your views aligned correctly – when creating them in code – you have to get the responsible view controller’s top and bottom layout guides.

Those get set sometime before viewWillLayoutSubviews and I found it useful to add a viewInset property to the view controller’s base view. Setting this would setNeedsLayout and then you can rearrange the subviews according to the new insets in layoutSubviews.

Read more

Radar: Xcode 5 unable to configure inline Unit Tests for iOS and Mac in parallel

The following issue is a head scratcher if you are trying to add unit tests to your project that both run on Mac and iOS. And if you like to use the new inline buttons for executing individual tests.

Filed as rdar://15085316 and Open Radar. The mentioned sample project is the UnitTestTest sample on our Radar Samples GitHub repo.

Read more