Building a Hackintosh (HW). • From $300 - $2000. – but about half of what the
equivalent. Mac costs. • Intel based PC. – Asus or Gigabyte motherboards most.
iPhone Application Development in .NET with MonoTouch
Scott Reed Brain Hz Software
[email protected] (760) 845-3320
Things you need • An Intel based Mac – running 10.5 or 10.6 • iPhone SDK (3.0 or higher) • Mono for OSX • MonoTouch • MonoDevelop (2.2 RC)
How to get a Mac • Buy a Macintosh • Build a Hackintosh • Virtualize a Hackintosh
Buying a Macintosh • Already have a monitor? – Mac Mini (from $600-$800) • Desktop – iMac (from $1200 - $2000) • Laptop – MacBook ($1000) – MacBook Pro ($1200-$2500) •
Prices as of Deember 1st 2009 as stated on Apples website
Building a Hackintosh (HW) • From $300 - $2000 – but about half of what the equivalent Mac costs
• Intel based PC – Asus or Gigabyte motherboards most common
– http://www.insanelymac.com/foru m/index.php?showtopic=114834 • SATA AHCI supported hard drive
Building a Hackintosh (SW) • Darwin kernel Boot CD allows Mac OS X install – such as boot-132 from above link
• Bootloader (such as Chameleon) enables boot without CD • A good guide – http://lifehacker.com/5351485/ho w-to-build-a-hackintosh-withsnow-leopard-start-to-finish
Virtualize a Hackintosh • VMWare Workstation • Mac OSX Guest package instructions – http://www.insanelymac.com/forum/ index.php?showtopic=172474
Demo • The Virtual Hackintosh
iPhone SDK (History) • • • •
Originally announced March 2008 2.0 released July 2008 3.0 released June 2009 3.1.2 release October 2009
• $99 annual fee to deploy to AppStore
iPhone SDK (Content) • • • •
Core OS CoreServices Media CocoaTouch
• In Objective C (language) • Using XCode (the IDE) • and Interface Builder (?like Blend?)
Objective C • Combination of Smalltalk and C • Messaging syntax obj->method(parameter); // in C++ [obj method: parameter]; // in Objective C
• Named parameters -(returnType) method1: (paramType1)paramName1; -(returnType)method2WithParam:(paramType1)paramName1 andOtherParam:(paramType2)paramName2; [obj method2WithParam:p1 andOtherParam:p2];
• Header files and implementation files (.h and .m)
Other Objective C differences • Allows nil messaging • BOOL is YES and NO • Reference counting Person * person = [[Person alloc] init] [person release] – also a retain and dealloc
Terminology OO/.NET
iPhone
Definition
state / variables
outlet
variable holding state visible from Interface Builder
behavior / methods
action
method visible from Interface Builder
interface
protocol
Interface with optional methods typically used as a callback
???
delegate
class which implements a protocol
xaml?
xib (Nib)
NextStep XML-based Interface Builder file
Demo • XCode and Interface Builder in action
Mono Open Source .NET implementation Started July 2001 1.0 released June 2004 Current version 2.4.2, June 2009 Contains 2.0 and partial support for 3.0 (no WPF) • Also contains LINQ to Objects and XML • • • • •
MonoTouch • Wraps the iPhone CocoaTouch APIs with .NET • Current Version 1.2 • Free evaluation edition – Simulator only
• $399 personal edition – your phone or App Store
• $999 enterprise edition – phone, App Store, enterprise phones
MonoDevelop • IDE that targets .NET based languages • VisualStudio like • Supports refactoring, snippets, and intellisense
Caveats • Can’t simply port existing WinForms, WPF, or Silverlight apps over • Have to learn the iPhone way • All documentation for iPhone in Objective-C • MonoTouch documentation autogenerated at best
Model View Controller Notifications Model
View
Controller
Demo • MonoDevelop and MonoTouch
Demo • NavigationControllers and TabControllers
Thank You Scott Reed Brain Hz Software
[email protected] (760) 845-3320 www.brainhzsoftware.com