Development Platform
Probably the cheapest way to start developing is to buy a Mac Mini. It easily has enough power for xcode. I got mine from carbon computing (2.4GHz 2GB, 320GB, SuperDrive, AirPort, HDMI, GeForce 320M Video). It comes with a powercoard and an HDMI to DVI converter. You can plug in your existing DVI monitor and windows USB mouse/keyboard.
Setting up the MAC OS
Unboxing is easy. Plug it in and hit the power button on the back. It walks you through a friendly first-time-setup. Finder is the magnifing glass at the top-right of your screen. You can use it to search for applications by name, like "update" to find "Software Update". You'll want to run this a few times and update everything. Specifically your OS is probably too old for the latest xcode. Your mac came with some disks, but you don't need these. I also changed my desktop backround and customized the dock (the shortcut icons at the bottom of the screen). Just click and drag to remove them (a little dust-cloud icon appears). And drag from finder to the dock to add them.
Even if you're not using a windows keybard, the change in position of the control-command keys might drive you mad. You can get it to behave more like you're used to by downloading the latest version of doublecommand.
- [double-click] DoubleCommand-1.6.9.pkg
- Continue > Continue > Install > [password] OK > Close
- Eject the installer
- Finder "DoubleCommand" > System Preferences > DoubleCommand
- [uncheck] Enter Key acts as Command Key
- [check] Command Key acts as Control Key
- [check] Control Key acts as Command Key
- [check] PC sytle Home and End keys
- Click activate button
- Click system button (and provide password)
- Close double command
You need to download Xcode. It was free, but the latest version costs $5. If you're serious about development, you'll want to put stuff on the device which requires a $99/year subscription and gives you access to stuff like Xcode. So you might as well start out by enrolling in the Apple Developer Program. Then you download the latest Xcode (which is gigs, and takes a while). Note that Xcode 4 is considerably different than its predecessors, so if you buy any books, make sure they're the new enough. There are a bunch of tutorials and books out there. I'll probably end up posting some sample code here, but for now, I'll just give a list of resources that I found most helpful.
Absolutely Required Reading
iOS Technology Overview -- Cocoa Touch Layer
iOS Technology Overview -- Core Services Layer
Wikipedia on Objective-C
One thing that drove me crazy for a long time was the difference in function naming between C++ and Objective-C. I finally found a good explanation of this on wikipedia.
- (return_type)instanceMethod2WithParameter:(param1_type)param1_varName andOtherParameter:(param2_type)param2_varName;The named parameter article goes on to explain that function name is actually interleaved with the arguments. In other languages like Ada, this lets you supply arguments in an arbitrary order. Not so with Objective-C. The only purpose for this is to make the code "more readable". So in the above, andOtherParameter is actually part of the function name. Very weird.
Note that instanceMethod2WithParameter:andOtherParameter: demonstrates Objective-C's named parameter capability, for which there is no direct equivalent in C/C++.
Mac OS X Developer Library
iOS Developer Library
Other Good Stuff
Understanding iOS 4 Backgrounding and Delegate Messaging
This is absolutely essential to understanding your application's life cycle. Read this before you try writing anythign from scratch. When a text is guiding you through a sample, you're fine, but when you try to do something original, you'll die without this.
Basics (Note, I'm assuming you're using DoubleCommand, so I'm substituting CTRL for Command)
CTRL-Shift-3 = capture desktop as png
CTRL-Shift-4 = capture a cross-hair selected portion of the screen as png
CTRL-Shift-4 + Spacebar = capture an application windows as png

0 comments:
Post a Comment