Today I learned that besides of using CocoaPods pod specs via the official repo, you can also use local clones of the source code as pods.
A client wanted to have a method for producing text that has a “cut out” effect, aka Text with “Inner Shadow”. Sort of like if you take a sheet of paper and then cut out the letters, then have light coming from up and slightly to the left so that it throws a shadow into the cut out letters.
For such a scenario you have to get a CGPath that is comprised of the glyphs that make up the text. Those are called glyphs because in some languages they are letters, but in some others they are not. Glyphs are the atomic element that any written language consists of.
Because it reasonably fits with the other work I have already done in DTCoreText I added such a method to both the classes for glyph runs as well as lines. These new methods will be released in the upcoming DTCoreText 1.5 release.
When we started with Source Code Management (SCM) – at the time – we still had a virtual Windows server running with QualityHosting.de. So a friend set up VisualSVN for us on this box. This got us started with Subversion.
Two years later we decided that was enough of procrastrinating. Finally the time had come to switch to git for good. Read more
It happens to the best: you add new features to an app localized in several languages. You are not the lazy type that names the NSLocalizedString key’s the same as the English-language strings. Instead you name the keys semantically, like DOWNLOAD_ALERT_MSG.
Then when it comes to shipping you send the client a note that there are some new strings and assume that he will be able to find out which are new and need to be translated. Which he would if he was using a tool like Linguan. Which he is not, because you might have forgotten to recommend it to him, or if he’s extremely unlucky then he’s a Windows user.
For the DTCertificateViewer component that I am presently working on I needed to have a list of all known OIDs. Those are the tags (Object Identifiers) that identify the meaning of information encoded in CER/DER/ASN.1 files.
For example OID 220.127.116.11 means “Country Name”. I was able to glean a few dozen such identifiers from looking at a variety of certificates, but I couldn’t find a complete – and localized – list of those names anywhere online. Also Apple has registered a boatload of their own OIDs like “1.2.840.113618.104.22.168.2” = “Apple Developer Certificate (Development)”.
Since I’m building this component for use on iOS and Mac it became clear that I needed to go straight to the horse’s mouth to get my strings. In this article I am going to explain how I got my list of OIDs, in all 30 languages that OS X is localized in.
You probably now how to add static test cases to a SenTestingKit-based unit test. You create a subclass of SenTestCase and add instance methods with their names prefixed with “test”.
When the unit test runs it builds the test classes and then introspects each one to dynamically find all such named instance methods. Those are then executed one after the other.
Usually you get by with this technique but there might be scenarios where you would want to be able to dynamically add test methods based on some external information, like a property list. Let me show you how.
I remember a long time ago when CPUs still had only a single core and the chip manufacturers where racing for getting the highest Gigahertz. Then some technical limit was reached they shifted their philosophy to increasing the number of CPU cores. The unfortunate side-effect of this approach is that we developers need to adapt our code to make use of these multiple cores or else our CPU-intensive code will find a bottle neck in being only able to max out one core.
The reason of this was mostly grounded in some smart using of multiple GCD queues. In this blog post I shall explore how we can get DTCoreText to also make use of all available CPU cores.
The worst thing you can do if you are using somebody else’s code is to complain to them via email about the shortcomings of their software. More often than not you can assume that the Open Source code this person put online is a labor of love. And complaining is as close as you can get to trampling on the other person’s feelings about their “baby”.
Hobbyists and Pros alike, you are a developer and if you have any interest in getting improvements for the other person’s software then you should adhere to these simple steps I am laying out for you to follow. This is specific to DTCoreText, but I am certain that the basic principles apply to any other project as well.
Apple keeps working on making Xcode more stable all the time. While Xcode 4.6 has much improved in terms of simply quitting on you, people report that more often now they see Xcode just hang.
One method to deal with race conditions in a highly parallelized application like Xcode is to add semaphores and locking. Unfortunately locking is not the end-all of all all Xcode problems, even with a liberal sprinkling. A blocked main thread is a blocked main thread.
Here is what you should do next time you encounter the beach ball of doom.