

AppsAmuck: iPhone development examples - podorozhny
http://appsamuck.com/

======
gavingmiller
I had looked at these tutorials initially when I started to develop for iPhone
and found them to be lacking in depth.

Personally I found the code examples that shipped with xcode (especially
iPhoneCoreDataRecipes
[http://developer.apple.com/iphone/library/samplecode/iPhoneC...](http://developer.apple.com/iphone/library/samplecode/iPhoneCoreDataRecipes/Introduction/Intro.html))
to be the most helpful when starting out.

------
gcanyon
I tried these several weeks ago and found that they're out of date -- is there
an easy way to update these examples to get them to work with iOS 4? Or
another set of examples already made for iOS 4?

~~~
Zev
_...is there an easy way to update these examples to get them to work with iOS
4?_

Apple probably doesn't ship the SDK it targets anymore. Double click on the
project name under "Groups & Files" and change the "Base SDK" setting from
whatever it is (probably 2.x-era) to the latest one that you have installed.

// edit: Yup, downloaded one project (WhatsMyIP) to look at and this was
exactly the problem/fix. There were other warnings, but those are non-fatal.
Or, at least, it still builds. I didn't actually run the app (my iOS device
and sim are both busy with other tests right now).

------
bbsabelli
These would be awesome on github. Please? :)

~~~
rbxbx
Especially with the community aspect, forking, improving, pushing back.

Maybe I'll feel ambitious tomorrow o_O

~~~
jf
The two projects I checked had "Copyright AppsAmuck.com 2008. All rights
reserved." in every file ...

~~~
wallflower
I don't think that was their intention. They might be open to github.

By default, when you create a new file, XCode adds a standard preamble header:

Copyright __MyCompanyName__ __Year__ . All rights reserved.

------
marknutter
Anyone know of anything similar for Rails apps? Or even Django, PHP, Sinatra,
etc apps?

~~~
hexidecimal0
Not quite _that_ but I love <http://guides.rubyonrails.org/>

------
hackermom
I took a look at a few of the apps, and many of them contain plenty of clunky
programming leading to severe performance inefficiencies (read: battery life
inefficiencies) that could lead to very bad habits being picked up by a
fledgling, but I still consider this resource a pretty good starting point.
Don't forget to update the Base SDK setting before playing around with the
projects, as the sources are a bit out-of-date and won't properly compile
against newer SDKs.

~~~
wallflower
I'm still very much learning about the "wizard behind the curtain" stuff that
makes apps run more smoothly - like NSOperation and background threads and
GCD, best practices for CoreData, memory optimization using Instruments.

Can you please recommend any code examples and/or resources to learn more
about iOS performance and code optimization? The WWDC 10 session videos on
performance that I saw (131, 137, 147) that I tried to understand were
enlightening.

~~~
hackermom
Sadly I am not aware of any specific resources on iOS performance tricks or
optimizations. You _might_ find something of use in Aaron Hillegass'
beginner's book on iPhone development (on <http://www.bignerdranch.com/>) -
his previous book on Cocoa has gotten a lot of praise, and there's a good
chance that his iPhone dev book holds the same quality.

The things I commented about in the code examples were mainly general cases of
bad programming; f.e., one of the applications did a frame rendering pass via
a loop that ran 100k times per frame, and as the first thing in each run of
the loop (instead of just once at the start of the application) it initialized
a few variables that end up having the same value through the entire run of
the application, resulting in the unnecessary addition of 200k function calls
with consequential variable declarations per frame, totalling 6 or 12 million
extra function calls PER SECOND, depending on if the application rendered in
30 fps or 60 fps. While it might not look like a big mistake, things like
these are easily picked up by people who might consider it sane, healthy and
clean programming from an "engineering" perspective, but even the smallest
mistakes can be the best recipees for killing handheld battery life and
producing lousy software.

