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.

Changes

ADDED: Coverage Monitoring via Coveralls

ADDED: DTBlockFunctions

FIXED: DTZipArchive: completion block would be called twice if uncompressing has error

FIXED: Warning in minizip

CHANGED: Removed shadow from PieProgressIndicator to fit iOS7 style

The block functions are a convenience for scenarios where you prefer to execute a call synchronously on the main thread if you already are on it, or else dispatch it asynchronously on the next run loop. I have some situations where you don’t want to wait until the next run look (i.e. always do a dispatch_async) because sometimes this causes some problems with animations.

Another scenario might be that you want to avoid a superfluous layoutSubviews and drawing pass if you already know that you want to change some view model values. This way you get the changes in as early as possible and they will get picked up by the subsequent pass through the run loop.

To avoid having to write all this code every time, I’m just adding a C function for it:

The warning in minizip – or more precisely ioapi.c – is a result of Xcode enabling 64-vs-32-bit warnings due to the advent of arm64. This C-function is part of the open source zLib, which you can also see in Apple’s open source browser. zLib has the beginnings of some 64 bit support, but this is incomplete. This particular warning is a result of using a 32-bit fseek with a potentially 64-bit offset. I have my doubts that this would ever get fixed, so we just squashed the warning with a typecast.

Apparently the author – Mathias Svensson if I am reading the header correctly – has a static define in place to always use 32-bit file API. This replaces 3 64-bit file methods with their 32-bit counterparts and so there is this warning. Interesting things you are finding in somebody else’s C-code from several years ago if you’re compiling with more warnings enabled …