Showing posts with label apple. Show all posts
Showing posts with label apple. Show all posts

Tuesday, August 17, 2010

Universal iOS apps

I'm still developing my first iPhone app (iOS app as of version 4.0 of the OS) and have been coming to the conclusion that XCode makes many, many things easy to do, but it isn't always easy to do these things right.

Example: universal apps - having one app that runs on both iPhone/iPod Touch and the iPad. When you create an application, you have the choice of making it Universal. Basically the .xib files (XML version of the .nib files) that define your user interface will have an iPad version and an iPod/iPhone version and the application will load the correct one at launch time.

The downside: if you want ANYTHING to be different besides the user interface between the iPhone/iPod and iPad, you must write special code to handle those cases.

Monday, January 21, 2008

X11 on MacOS/X 10.5 (aka Leopard)

Being a Linux geek who moved to Mac for a desktop, I still do run X11 applications on occasion and wanted to get some of the applications available in Linux working on my Mac. There are two ways to do this:

MacPorts (previously known as Darwin Ports).


Fink

Mac Ports is based on the FreeBSD "ports" package management system that installs software by fetching the source and compiling it.

Fink is a system based on the Debian package management tools (apt-get) and will feel quite familiar to anyone who has used Debian-based Linux distributions such as Ubuntu.

I've had better luck with Mac Ports and installed a light-weight X11 window manager, blackbox, with the following command:


port install blackbox


I then tried to make it run by creating the following file in my home directory as the file ".xinitrc" and running X11 from the /Applications/Utilities/ folder:


exec blackbox


This resulted in X11 starting up and immediately quitting. I investigated using the Console.app and saw the following error message:

1/21/08 3:32:33 PM org.x.X11[88661] blackbox: another window manager is already running on display ':0.0'

A little searching online and I found this article on X11 on the Fink project site. So - Apple runs their own window manager and you have to tell it not to run if you want to run something else. If you're not using Fink, you'll have to leave out the Fink-specific parts (anything that starts with /sw/).

Here's the .xinitrc file that successfully starts up the blackbox window manager on Leopard:

PATH="$PATH:/opt/local/bin"
quartz-wm --only-proxy &
exec blackbox