Jan 30, 2011
One of the things that people know me for is for continuing to develop on MyAppSales, my favorite tool to download and keep those elusive sales report from iTunes Connect. It’s always been a hobby and until now I’ve allowed people to access the source in exchange for a mandatory donation. This went on for almost two years now.
Those donations never made sufficient money for me to pay for professional development. But I felt that I had to ask the approx. 500 people on the google group about their opinion as they might see their donation as a purchase and not like the idea of this software now being available for free. Boy was I wrong. Resoundingly people voted “+1″ for going OpenSource.
So here it is. It’s Open. Read on for how I moved the repo from my SVN server to GitHub, including the entire revision history.
Jan 29, 2011
Ever since the iPad came out I’ve been giving the occasional thought as to how I could universalize my existing iPhone apps. Generally the problem is that you have view controllers that work well on the resolution of the iPhone, but if you simply display them full screen on iPad they look weird.
So I’ve started to work on a view controller that would allow me to reuse my iPhone view controllers by displaying them not in full screen but as distinct cards. The idea is that you would use the same DTCardsViewController as root in your app and then depending on which device it runs on will either show the cards filling the iPhone screen or by laying them out to better fill the iPad screen.
In this article I want to give you a brief demo of where my R&D stands so far.
Jan 25, 2011
For the past few days you’ve see me go on and on about this Open Source Project of mine. Sorry if this got a bit annoying to you but I am very passionate about bringing this functionality to a broad audience because I feel that UIWebView should not be used as much as it is. With the DTAttributedTextView from the GitHub project you can replace most of these and have way more control over the outcome.
Apple might finally add support for Rich Text Editing in iOS 5, coming Summer 2011. I suspect that the Pages app on the iPad might be a glorified test case for Apple for that. But even if that indeed comes to our Xcode, it will be end of 2011 that customers will have widely deployed iOS 5
Today I want to show you something completely different that is using the aforementioned project as a base and extends it to provide Rich Text Editing capability.
Jan 21, 2011
Almost always when we iOS developers want to display some rich text we are using UIWebView. That’s not by choice, since traditionally Apple did not provide any classes to us being able to show formatted text.
That changed slightly with the iPad, because in 3.2 we got CoreText as well as CATextLayer. CoreText gives us NSAttributedString which is basically a string that can have different attributes for ranges of characters. Those attributes can either be standard ones, like to describe the font, color, size and paragraph format. Or they can be your own arbitrary attributes.
I’ve shown how to programmatically construct these in my previous article on CoreText. The one thing though that is still missing from making CoreText really useful are ways to create attributed strings. Clearly doing it all in code is not feasable.
In this article I am introducing an Open Source project that aims to provide the missing functionality to iOS developers.
Jan 18, 2011
Similar to the previous article on decoding HTML colors we also need to decode HTML entities like ". So I found an authoritative list on the web, courtesy of Wikipedia and in this article I will demonstrate how to use quickly hacked up command line tool to convert it into Objective-C.
This shall serve as an example as to how quickly you can leverage your objC knowledge to build a useful tool for such a one-off operation. If you know how to reuse your skills from iOS development on command line tools then you can always quickly whip up a one-off tool to do some work that otherwise you would have needed to do manually with a text editor.
Jan 16, 2011
The previous version of iWoman has a severe problem if you have an existing database that needs to get migrated. Turns out that old iPhone might take too long doing that. And if it takes longer than a couple of seconds for an app to start then there is a watchdog timer in iOS that will outright kill the app.
Also there was a graphics glitch on the list view which has been remedied. I am really sorry for all these glitches. I promise you that they have not been intentional and I am quite embarrassed by them.
The Update has been submitted to Apple and should become available soon.
- Fixed: Graphics glitch on list view on 3.x devices
- Fixed: DB Migration is now done after app startup – instead of during startup – to prevent app termination by iOS.
Hopefully with this patch migration and usage should be smooth on 3.x and 4.x alike. If so then I can concentrate on additional features. The app is doing pretty well in Russia and so I will add localization as a “Thank you!” for the Russian ladies. Also I am thinking about adding Japanese to see how this might affect sales there.
Jan 10, 2011
The Mac App Store causes several developer’s nerves to meltdown. And we have an interview with Kris Harris from Improbably Sciences about his Mac App Store Experience.
Podcast: Download (39.4MB)
Jan 10, 2011
In my article on CoreText I mentioned that Apple left out some very useful methods from NSAttributedString, namely the ones that would allow you to create an attributed string from HTML. Now you would probably not want to create attributed strings from complex HTML documents, but use that for simple tasks like displaying one word in a different color or bold.
My first thought was that maybe I should make it a sellable component, but I dismissed this idea for two reasons:
- there is a certain likelyhood that Apple will implement the missing functions in the next major SDK refresh
- if I would get help from people who are more experienced in dealing with HTML parsing then this would benefit everybody involved
So I posted the question on Twitter as to where to put the shared code. The response was a resounding GitHub (one mention of Mercurial and Assembla each). So far I had put off dealing with GitHub, because – in contrast with many other iOS developers – I happen to very much like Subversion integration in Xcode.
Read on to learn how to get started.
Jan 09, 2011
I am building a category for NSAttributedString that will allow me to make attributed strings from HTML code. For coloring the text there are two methods in HTML, via the deprecated font tag and via style. Both use color names or hex to describe the color.
The W3C knows 147 color names, clearly too many to type in manually. So I used a bit of shell script magic to hammer this into Objective-C. Then I also needed an elegant method to make regular UIColor objects from a hex string.
Both I am sharing in this article. These methods are invaluable if you are dealing with web people who are used to specifying colors this way. Also it might be more intuitive if you can specify colors in hex format yourself. That is, if you are a geek who is used to thinking in the hexadecimal system.