iOS

Manually Creating Universal Binaries for iOS

Posted by Dallas on January 13, 2012
Apple, Cocoa, Cocoa Touch, iOS, Mac, Objective-C, Programming / No Comments

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: , , , ,

The Complete Friday Q&A by Mike Ash

Posted by Dallas on January 27, 2011
Apple, Cocoa, Cocoa Touch, iOS, Mac, Objective-C, Programming, SDK / No Comments

Mike Ash has turned his famous Friday Question and Answer series into a book, available in either iBooks or Kindle versions.

Mike is an amazingly smart guy, who knows more about programming then you could ever imagine.

If you work with Objective-C you owe it to yourself to check out his book and his site.

Tags: , , , , ,

XMLRPC-iOS

Posted by Dallas on January 07, 2011
Cocoa, Cocoa Touch, iOS, Mac, Mercurial, Objective-C, Programming, XMLRPC / No Comments

I am working on a project where I need to make a XMLRPC connection to an API in Objective-C, and someone pointed me to:
Eric Czarny’s XMLRPC project on GitHub.

While this is great, it was done as a framework for Cocoa and since the project I am working on is for iOS 3rd party frameworks are not allowed. Instead they have to built as a Static Library.

So I started a new iOS Static Library project and converted over Eric’s code.
I now have a XMLRPC iOS Static Library ready for SDK 4.0 and greater.

You can find my iOS version on my BitBucket account.
Specifically: https://bitbucket.org/kdbdallas/xmlrpc-ios

My Mac/iOS Setup at Work

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.

Work Setup

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: , ,