My favorite screensaver of all times is Electropaint. It has its origins in the IRIX OS. The word “mesmerize” was always one of the things I connected with this screensaver. Electropaint™ is a US Trademark of Tristram Visual, www.tristram.com. But since IRIX is gone for good, Electropaint was on the same route …
Fortunatly, there is a good clone of Electropaint for Mac OS X. An older release can be found in Lloyd’s Lounge. Some time later a universal binary of the screensaver for Intel Macs was made available by Alexander von Below.
Since the release of Mac OS X 10.6 “Snow Leopard” all screensavers need to be 64 bit and use Garbage Collection. Apple posted a TN about the requirement and how to adjust the build settings. Otherwise Mac OS X will not allow the use of the older screensaver module.
So I took the source code and adjusted the build settings according to the TN. A few minutes later, a new build of ElectropaintOSX was ready. Another few minutes later the updated DMG file for easy download was assembled. As my contribution to the project was very small, I increased the version to 0.3.1 — indicating that this is the same codebase as in version 0.3 (Minor change: int and float were replaced by NSUInteger and CGFloat).
I do no longer have an 10.4 SDK on my computer, so I built ElectropaintOSX only for Mac OS X 10.5 and 10.6. And I do no longer have any computer with Mac OS X 10.5, so I could not test the build on Leopard. But it should be OK. If not, try the built supplied by Alexander von Below.
So, here is the link to the DMG file that contains the screensaver and the source code. Happy screensaving.
I had some trouble to put the iPhone OS 3.0 beta5 on my first generation iPhone. Without going to much into details, I thought that I had bricked my phone.
Fortunatly, there are some usefull hints in the Apple iPhone Developer Forum. One recommendation was using iTunes’ restore function instead of the Xcode organizer. I guessed the difference lies in using a simple update (Xcode) or a full restore (iTunes) which possibly includes some DFU-Mode access.
So, I wanted to know, what exactly is happening and took a look at the Console log. Look what I found:
iTunes uses Jedi mind tricks to … to trick my MobileDevice. Amazing. Someone at the iPhone/iTunes team at Apple seems to be a huge star wars fan.
CUDA is the Compute Unified Device Architecture from NVIDIA. It’s an environment for using the massive parallel capabilities of your video card for general purpose computing. If this sounds strange to you, just check out the description at the wikipedia.
In April version 2.2 of CUDA was made available at the CUDA Zone. I was eager to try this on my new MacBook Pro — since it is my first x86 Macintosh that uses an NVIDIA GPU. The installation of CUDA is described in the “CUDA SDK Getting Started” document. Here is one pitfall you might want to avoid.
There was no previous installation of CUDA on my system (Mac OS X 10.5.7). The default setting did not install the CUDA kernel extension to /System/Library/Extensions/CUDA.kext. I had to select custom install and check mark the CUDA Extension in the installer dialogue.
Without the extension, the examples to verify the correct installation run only in the emulator. So check the installation settings and make sure that the CUDA extension is installed, too. Oh, and don’t forget to update your .bash_profile as shown in the ”getting started“ PDF from NVIDIA.
Once you have everything up and running, try the smokeParticles application. It’s really awesome. I didn’t find a video of the smokeParticles demo, so I created one. BTW, it uses all three mouse buttons — so check your system setting for your mouse.
Before the availibility of Objective-C 2.0 the usage of Key-Value Coding accessors required some boiler plate code. Objective-C 2.0 introduced the @property and @synthesize directives and reduced a lot of boiler plate code into two simple statements. Which is kind of nice.
Nevertheless there might be circumstances that force you to implement KVC accessors manually. But you do not have to type all the accessor methods code by yourself. Xcode can take care of this task. Here is how to do this.
Within you .h file, create the property you need for your application. Let us assume you need an array like this:
…
NSArray *someArray;
…
Select the whole line where you just defined your NSArray instance variable and go to the script menu (it is the one with the ancient scroll icon). Select the command
Script Menu > Code > Place Accessor Decls on Clipboard
Next, paste the declarations to your .h file. Select the whole line with your NSArray instance variable again, this time select the command
Script Menu > Code > Place Accessor Defs on Clipboard
and paste the content of the clipboard to your .m file in the @implementation part of your code.
While this is only a minor help for properties of the NSArray class, try the same for the NSMutableArray class. Now we are talking about time saving. Thanks, Xcode team!
Due to my day job, I’m a little bit late with my announcement — ColorRef 1.0.1 has changed to “Your application status is Ready for Sale” on March, 2nd 2009. At least this is what the e-mail from Apple claimed. To be closer to the truth, ColorRef is still priced at zero $, so there isn’t much of a sale. The changes and added features are described in my previous post, just in case you want to look at it.
Some of you might have been a little bit confused last week because the screenshots and description at the App Store showed the 1.0.1 release while the actual binary was still the 1.0 release.
I don’t know if I made a mistake within iTunes Connect, but the description and the screenshots have been updated nearly immediatly, while the binary took some time for the review. Only the text describing the changes was updated at the same time as the release of the binary. This happened although I entered all information into the sections for “update”. Well, you live, you learn.
So my advise for using iTunes Connect and updating your app: Change the images and the description not before the release of your updated binary. It might confuse your customer if the sceenshots and description don’t match your application.
ColorRef 1.0.1 was submitted to the App Store today. Usually it takes it takes Apple only a few days to review an app. You can expect to get the update via iTunes by the end of the week.
What has changed from the initial release? A brief run down:
Themes can be renamed.
Themes can be reordered.
Colors can be edited.
Colors can be reordered.
The color picker has a new RGB/Hex control.
No more built in themes.
To be honest, I gave ColorRef 1.0.1 the codename “Missing Feature Release”. The omission of editing controls — reordering, editing names or colors — was quite obvious. Adding these features got high priority on my to do list for ColorRef.
In order to implement these features, controls are required to activate the editing mode. The natural place for this is a toolbar at the bottom of the screen. So I dumped the idea of the tab bar — which actually brought ColorRef closer to the recommendations of the HIG.
A tab bar gives users the ability to switch among different modes or views in an application.
For my understanding emphasis should be placed on “modes”. If you look at the iPod application on your iPhone, the black tab bar switches not only between views but between play modes. The clock application uses the tab bar to switch between different modes – not between different data sets.
The tab bar is gone, the toolbar takes it place and there is the space for additional controls. Like — for now — the edit button. From this button features like reordering, deleting and editing of tables and their entries can be accessed. All these features have been implemented as standard controls — this should reduce the amount of learning to use the controls to zero. One of the benefits of using standards.
So, I hope you like the “Missing Feature Release”. Actually the screenshots at the App Store have already been updated. The binary file … well, soonish. You can preview the ColorRef 1.0.1 release at the App Store. If you encounter any errors or unexpected behaviour please send me an e-mail or leave a comment.
First things first – because my target audience is international I use the english language from now on in the blog entries.
OK, next up: I succeded on the second part of Aaron Hillegass’ Challenge No. 35. Feeling kind of proud – and very motivated.
Finally: Thanks for the feedback on ColorRef. There are some valid issues I’m going to address in a upcoming release.
An option for editing theme names and editing colors will be added.
The reordering of entries will be implemented.
Adding colors in hexadecimal format — should be possible.
Moving the EM/SE-Theme to the favorites — very likely.
About the EM/SE-Theme: These are from my employer and originally I used ColorRef only for the purpose of having a handy “digital color reference” app. It evolved into a little more usage scenarios. This evolution left some traces, like the Tab-Bar at the lower section. This will very likely change soon.
Again, thanks to everyone who took her/his valuable time and supplied me with feedback. Your help is very appreciated.
P.S.
You can delete a theme name or a color with a horizontal swipe. I expected this to be obvious — but in fact I was wrong on this. I added a note to the description in the App Store.
Meine erste iPhone Anwendung hat es in den App Store geschafft: ColorRef. Hier ist der Direktlink zum App Store.
ColorRef ist ein kleines Programm zum verwalten von Farbpaletten. Es können Farbpaletten – sogenannte Themes – angelegt werden. Einem Theme können Farben hinzugefügt werden. Der eigentliche Nutzen ist, dass zu den Farben die entsprechenden RGB-Werte angezeigt werden können. Über einen Klick auf eine Farbe wird die Anzeige des RGB-Wertes zwischen Dezimal-, Hexadezimal- und CoreGraphics-Format umgeschaltet.
Warum das Ganze, wenn doch alle Programme von Adobe ein gutes Farbpalettenmanagement mitbringen und Mac OS X die Farbpalette sogar Systemweit bei Cocoa Anwendungen anbietet? Die triviale Antwort: Die ganzen anderen Anwendungen. Es ist leichter, die Farbwerte schnell auf dem iPhone nachzusehen, als erst Anwendung A zu starten, dort Farbwerte herauszusuchen, Fenster passend auf dem Monitor verschieben oder sich Notizen zu machen, um diese Farben in Anwendung B zu verwenden. ColorRef ist der digitale Notizzettel für Farbwerte.
Daher hoffe ich, dass dem einen oder anderen ColorRef gefällt. Verbesserungsvorschläge und Hinweise zu Bugs sind gerne gesehen … ein paar Ideen habe ich auch schon.
P.S.
Chapter 35 – Challenge: Teil I habe ich geschafft, Teil II wird die Download Statistik zeigen.
Jede Anwendung für das iPhone ist signiert. Egal ob es sich um das fertige Produkt für den AppStore oder eine adhoc Version aus der laufenden Entwicklung handelt. Manchmal will Xcode nicht so, wie sich der Entwickler das wünscht – das Programm läßt sich verf%&#! nochmal nicht auf dem iPhone installieren. In diesem Falle ist zu prüfen (Stand Xcode 3.1.2, iPhone OS 2.2):
In der Info.plist den Bundle Identifier richtig setzen. Dabei beachten, dass Sonderzeichen nicht verwendet werden. Ich trage an dieser Stelle net.CrimsonMagic.${PRODUCT_NAME:identifier} ein.
Targets > theAppName > Info > Code Signing > Code Signing Identity > Any iPhone OS Device > iPhone Developer: Vorname Nachname auswählen.
Vorausgesetzt ist natürlich, dass ein Provisioning Profile im Organizer von Xcode hinterlegt ist und der dazu passende Private Key im Mac OS X Schlüsselbund liegt. Eigentlich ganz einfach … wenn alle drei Punkte beachtet werden.
Heute bin ich bei Kapitel 35 von Aaron Hillegass Buch »Cocoa Programming for Mac OS X« angekommen. Nachdem ich die zweite Ausgabe wegen eines freizeitraubenden Projekts im (bezahlten) Job nie bis zum Ende erarbeitete, habe ich das bei der dritten Ausgabe des Buches endlich geschafft.
Das Buch ist die Empfehlung für alle, die sich mit Cocoa beschäftigen wollen. Kenntnisse in C und ein solides Englisch sind als Voraussetzung empfehlenswert. Thematisch wird das meiste abgedeckt, was von einer Mac Anwendung an Funktionalität erwartet wird. Grundlegende Konzepte werden soweit erklärt, dass verständlich wird, wie Cocoa funktioniert. Auch CoreData, CoreAnimation und OpenGL werden kurz angesprochen. Beispiele und Aufgaben vertiefen das Wissen.
Besonders gefällt die ständige Motivation durch Aaron, weitergehende Informationen zu suchen, um alle Details zu verstehen oder Varianten auszuprobieren. Infos findet man auf den Developer Seiten bei Apple und in der umfangreichen Dokumentation, die Xcode begleitet. Aaron Hillegass bringt den Leser auf den richtigen Weg, um die Einstiegshürde in Cocoa zu nehmen.
Nachdem ich also das Buch durchgearbeitet habe, verbleibt die letzte Challenge aus Chapter 35:
Challenge
Write a Cocoa application and get someone (not yourself) to use it.
Wenn es soweit ist, werde ich das Programm hier auf Crimson-Magic zur Verfügung stellen. CU soon.