Feb 08, 2012
You might have noticed – if you follow the DTCoreText project on GitHub – that I made many changes on this Open Source project. The most recent change was that somebody donated a CocoaPods spec for the project and thus forced me to give it a version number. The reason being that pods are usually pointing to a specific tag in a GitHub repository. This way people using the project via CocoaPods can be certain that they are getting a stable version.
So I stumbled into this, but when trying to think of a good version number I could only come up with “1.0.0”. DTCoreText has matured sufficiently to call it that. Hey, earlier versions made it into quite a few popular apps, including Float. There are tons of performance improvements, additional features and most importantly the parser has been replaced with libxml2. This makes it both faster and able to deal with any kind of HTML you throw at it.
DTCoreText has two parts: first it creates NSAttributedString instances from HTML, second it displays these properly. CATextLayer would be able to take attributed strings, but it ignores paragraph attributes and cannot draw images. DTCoreText has an ingenious mechanism where you can supply your own UIViews for each attachment.
Feb 06, 2012
We are lobbying since 2009 to get Apple to publish a proper API for downloading all kinds of reports.
The first reaction we got was prohibition of ITC scraping. The second reaction was that Apple created the Mobile ITC app which unfortunately lacks any kind of possibility to get the reports out or get monetary amounts. The third reaction was a half-harted publishing of a Java class that is able to download daily and weekly sales reports.
This changes today, at least if you are like me and feel uneasy to use Java for downloading reports.
Feb 05, 2012
We’re rebooting the Cocoanetics Podcast. The last episode had been over a year ago.
Happy New … February
Podcast: Download (20.7MB)
Please comment, tweet or mail your suggestions on topics that are of interested to iOS (and by extension Cocoa developers in general).
The new title song “Cocoa Cookin'” was composed and produced by Jamie Harper.
Feb 05, 2012
I finally got around to report an annoying bug in CoreText that has been bugging us in DTCoreText until I wrote a method to correct line origins as a workaround. rdar://10810114
The annoying thing about this bug is that it adds visual noise to otherwise pristinely rendered text. Especially on larger font sizes you see that additional space appears before each CTLine that ends with a paragraph break (\n).
UPDATE: This is a duplicate of rdar://9931615.
Feb 03, 2012
When I moved the default CSS rules into a separate file I was facing the old dilemma: how can I embed this in the static library but still be able to easily add contents to it via Xcode. I previously explained how you can turn any file into a c-Byte-array. But this still required manual work.
I did a bit of researching and found that on regular Linux systems people seem to have a tool named objcopy which can copy files as their are into an object file (.o) which can be linked together to the final binary by the linker. But unfortunately this tool does not come with Xcode. So it is out of the question because I want everybody to be able to build DTCoreText.
Xcode Build Rules come to the rescue. They can automate any kind of preprocessing you like and it turns out they are an easy solution for this very problem.
Feb 03, 2012
This is a maintenance update. There was a bug in DTAboutViewController which caused a crash under iOS 5.
- Fixed: Crash on iOS 5 when opening About Section
The update has been submitted to Apple for approval.
Update Feb 8th: Ready for Sale. It should be available shortly.
Feb 02, 2012
My iOS-related Podcast started out as “Dr. Touch Podcast” and later we rebranded ourselves to the more unique “Cocoanetics Podcast”. Though the topics always revolved around iOS development, Apple in general ans the people involved in our profession.
After an extended hiatus planning has begun to revive the podcast. I like to invite your comments, wishes and ideas as to what you would like to see – or more precisely hear – in a podcast that focusses on your daily bread and butter.
Feb 01, 2012
There’s a category of developers – probably coming from other Linux-based desktops – who are feeling at home in the console (aka terminal). Especially when working with SCM systems like Git or Subversion you’re often faster committing or updating doing that via short commands as compared to Xcode.
Unfortunately Apple did not think to make the console a nice thing to look at from the get go. Let me show you quickly how you can geek up your terminal as well. Your colleagues will be impressed.
Jan 26, 2012
In this post I will to demonstrate how you can contribute to an Open Source project hosted on GitHub. I previously blogged about how you can make and apply patches, which is certainly one way. But on GitHub there is an even cooler method, one that is also less work on the project maintainer.