Universal Binaries are a wonderful thing, and not just if you are still writing Mac Power PC code, they are just as useful in the iOS development world.
If you do any amount of iOS development, chances are you have used (in one way or another) a static library.
Usually when you use a static library you get (or compile) 2 versions.
One for the device, and one for the simulator.
This is fine until you want to add the library to your app.
If you are using the simulator and the device for testing you have to play a swapping game with the corresponding library version.
Wouldn’t it be easier if you could just have 1 version of the library and it worked on the device or the simulator without you having to make any changes?
Sounds nice? I would say so, and luckily it is pretty easy.
The first thing you need to do is open a Terminal window (don’t worry, its just 1 command)
Use the following command (replacing the library path and name, with your libraries information):
lipo -output <StaticLibraryUniversal>.a -create <StaticLibraryDevice>.a -arch i386 <StaticLibrarySimulator>.a
Thats it!
Just use the new static library file in your project and you can move between the device and the simulator without worry about anything!
Have fun.
Tags: iOS, Lipo, Mac, Static Library, Universal
Posted by Dallas
on January 01, 2011
Apple,
iDeskCal,
Mac,
Mac App Store,
Programs /
No Comments
iDeskCal has officially been approved for the Mac App Store!
Look for it when the Mac App Store is released on January 6th.
Tags: iDeskCal, Mac, Mac App Store
Posted by Dallas
on December 17, 2010
Apple,
Fanboy,
General,
HashBang Ind,
iDeskCal,
iOS,
iPhone,
Mac,
Personal,
Programming,
Programs /
No Comments
Inspired by a similar post I saw today, I thought I would take a snap of my computer setup at work and share it with all of you.
I have uploaded it to Flickr with notes on what everything is, but I will attach the basics to this post.

This is my setup at work – Moki Networks – mokinetworks.com
All Displays powered by the iMac.
27″ iMac – 2.8 GHz Intel Core i7. 8GB RAM – Running Xcode
Samsung 27″ Monitor – Running my Mac app ‘iDeskCal’ www.HashBangInd.com/iDeskCal and Safari viewing www.philhendrieshow.com
Dell 24″ Monitor – Powered via EVGA UV Plus+ 16 (USB Display Adapter) Running iPhone 4 Simulator and Xcode Console
iPad running as a monitor using the app Air Display. Using for Mac OS Dock, Twitter (Echofon), and IM (Adium)
iPhone 4 running Safari, viewing personal Mac and iOS company HashBang Industries. HashBangInd.com
iPhone 3GS
iPhone 3G (broken screen but working)
iPod Touch – 2nd Generation
iPhone – 1st Generation
Bose QuietComfort 15 Noise Canceling Headphones
Dr Pepper!
Tags: iOS, Mac, Work
Posted by Dallas
on June 17, 2010
Apple /
No Comments
Those are the words that come to mind when I see Apple’s latest revision of the Mac Mini.
It’s amazing how few pieces are needed.


Tags: Apple, Mac, Mac Mini
Posted by Dallas
on January 24, 2010
Apple,
Mac,
Personal /
1 Comment
On January 24th, 1984, Steve Jobs pulled a 128K Mac out of its case in front of a crowd of reporters, turned it on, and let the computer introduce itself to the world. The rest, as they say, is history.
On January 25th, 1982, I was born.
It’s kind of sad that I am only 2 years older then the Mac.
Tags: Apple, Birthday, Dallas, Mac
Posted by Dallas
on August 24, 2009
Apple,
iDeskCal,
Mac /
No Comments
AppleĀ® announced today that Mac OS X 10.6 (aka Snow Leopard) will be released on Friday August 28, 2009!
I have been using developer preview versions of Snow Leopard and I can say with all honesty that Snow Leopard is a wonderful update to the already amazing 10.5 (Leopard).
The speed and performance updates in 10.6 make this a release that all eligible users should upgrade too, and at only $29 USD for the single computer upgrade and $49 USD for the Family upgrade, you should not need to even give it a second thought.
The main thing to know with 10.6 is that it will only work on Intel machines, so unfortunately you are out of luck if you are still using a Power PC computer.
The second main thing to know about 10.6 is that iDeskCal runs great on Snow Leopard!
I have been running it full time on Snow Leopard without any problems.
If however you do run into any issues with running iDeskCal on Snow Leopard, come Friday, Snow Leopard has special additions behind-the-scenes that make it even easier for us to track down reported bugs.
Unfortunately this is all I can say right now as my NDA with Apple is still in effect.
I have included links to pre-order Snow Leopard today!
Currently (Monday 24th) if you order from Apple, your upgrade DVD will be delivered the day Snow Leopard is released (Friday). I am not sure how long that will be the case, so I recommend you pre-order now!
Apple Online Store 10.6 Upgrade (Single computer & Family versions)
Amazon.com 10.6 Upgrade (Single computer version)
Amazon.com 10.6 Upgrade (Family version)
Tags: 10.6, Mac, Snow Leopard
I am VERY happy to announce that iDeskCal version 2.0 is now in private beta!
If you don’t already know, iDeskCal was formally called Desktop Remind.
Version 2.0 was such a dramatic change, taking the application from a useful little tool, to a full fledged desktop calendar solution.
With such a dramatic change I felt it was also time to give the product a real name.
A new icon should be coming soon as well.
You can learn more about iDeskCal at: http://hashbangind.com/ideskcal.php
If you are interested in joining the beta make sure you match the following criteria and then email support [at] hashbangind.com
Beta testers MUST meet the following criteria:
1. Have a Macintosh computer running OS X 10.5 Leopard
2. Must use iCal or a iCal compatible program, or be willing to start using iCal
3. Must be willing to give feedback, submit bugs, and be willing to answer questions about submitted feedback/bugs.
Tags: Calendar, iDeskCal, Mac
Posted by Dallas
on December 27, 2008
iPhone,
Mac,
Objective-C,
Programming /
7 Comments
If you have an application that allows users to upload content to the app, you might want to show the user how much space is available for them to use.
This is especially true on the iPhone where it is not as easy for the user to quickly check if they have enough room to upload a given file.
You may also want to check if there is enough space before you start the upload, so you can inform them that the file wont fit.
That brings you to the task of figuring out how much free space there is, and more importantly how much free space is left that you as an unprivileged program can access.
The following code is based towards the iPhone, however all that would be needed to change it to be used on the Mac is the location you are checking for free space, and the setting of the label.
NOTE: The below “shown” code is old. The updated code is in the zip file at the bottom
#include <sys/param.h>
#include <sys/mount.h> |
NSString *sizeType;
float availableDisk;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
struct statfs tStats;
statfs([[paths lastObject] cString], &tStats);
availableDisk = (float)(tStats.f_bavail * tStats.f_bsize);
if (availableDisk > 1024)
{
//Kilobytes
availableDisk = availableDisk / 1024;
sizeType = @" KB";
}
if (availableDisk > 1024)
{
//Megabytes
availableDisk = availableDisk / 1024;
sizeType = @" MB";
}
if (availableDisk > 1024)
{
//Gigabytes
availableDisk = availableDisk / 1024;
sizeType = @" GB";
}
diskSpaceLbl.text = [[@"Available Disk Space: " stringByAppendingFormat:@"%.2f", availableDisk] stringByAppendingString:sizeType]; |
This will give you something like the following:

UPDATE:
I have gone a step further and made this into an easy to use class, that works out of the box with the iPhone and the Mac.
FSStats.zip
Tags: Cocoa, iPhone, Mac, Objective-C, Programming
Posted by Dallas
on September 15, 2008
Desktop Remind,
Mac,
Programs /
No Comments
I am happy to announce a new Mac product called, Desktop Remind!
Desktop Remind embeds your calendar on your desktop, above your wallpaper but below your desktop items.
With Desktop Remind you can quickly and effortlessly now exactly what is on your calendar for the current day, and beyond.
Desktop Remind is user configurable, so you can place it exactly where you want on your desktop, and configure the font and font color to match your taste and/or wallpaper.
Desktop Remind also works with multi-monitor setups.
Feel free to give it a try for 14 days before a registration is required. A registration can be purchased for $4.99. Purchase here

Tags: Apple, Calendar, Desktop, Desktop Remind, Mac
Posted by Dallas
on August 31, 2008
Apple,
Fanboy,
Mac /
No Comments
I saw this in MacWorld and if you saw my post when I got my Mac Pro you will know that I think is SO true.
The Mac Pro is so sexy inside, unlike all other computers I have made or owned.

Tags: Apple, Mac, Mac Pro