Ad

Our DNA is written in Swift
Jump

DTFoundation 1.5.1

This is a mostly a clean-up release for DTFoundation with a few interesting additions.

Changes

  • ADDED: Ability to uncompress individual files in DTZipArchive
  • ADDED: DTFolderMonitor for watching a folder for changes
  • ADDED: DTZipArchive Demo demonstrating DTZipArchive and DTFolderMonitor on iOS
  • ADDED: DTLog logging hooks
  • CHANGED: DTHTMLParser now aggregates parsed characters into a single delegate call-back
  • CHANGED: Removed UIKit dependency for DTAsyncFileDeleter so that it can be moved to Core sub-spec

The DTZipArchive changes are the output of our colleague Stefan Gugarel’s recent lab project. The new DTZipArchive demo demonstrates a neat little iOS app that allows browsing the contents of a ZIP or GZ archive and previewing individual files from it with Quick Look. For this I also added DTFolderMonitor which allows for monitoring the app’s documents folder to changes.

The DTHTMLParser performance improvement was contributed by Jay Zhao. He discovered that libxml2’s HTML Parser would report way too many individual characters when parsing an HTML document with too many entities (i.e. encoded characters). His performance improvement aggregates all characters inside a tag and only reports the text contents of each tag only a single time.

It was long a painful thing to have to have UIKit as a dependency for DTAsyncFileDeleter. This was necessary because on iOS it uses background task completion to make sure that the file deletion goes on while in background. This dependency meant that other projects (like DTDownload) which needed DTAsyncFileDeleter would also need to add the UIKit sub-spec. I enclosed the offending sections in an #ifdef and thus was able to move it from the UIKit to the Core sub-spec.

Finally, DTLog is a block-based enhancement for NSLog where you can set your own log handler block which will only be called if a certain logging level is set. We will be replacing  NSLog statements in our frameworks with DTLog statements for different levels. This allows you to forward those log statements to a logging framework of your choosing.

Since appledoc recently added support for documenting enums, I also polished up the documentation to be without build warnings, using the latest stable version of appledoc. As usual the new release is tagged on GitHub and also available as CocoaPod.


Tagged as:

Categories: Updates

3 Comments »

  1. This version is broken. Using the cocoapod, with 0.23 cocoapods, it will not compile.
    DTSQLiteFunctions.m is missing a DTLog.h, as the DTLogError is not available.
    DTLog.h does not have sufficient includes to be compilable.