

Sam Soffes open sources Cheddar for iOS - jamesjyu
https://github.com/nothingmagical/cheddar-ios

======
flyosity
For people learning iOS development, this is an awesome project to download
and tinker with. Learning how to use Core Data managed objects? It's in here.
Custom tableviews? Here, too. Custom fonts? Yup. Blocks? Yes. External RESTful
APIs? That, too.

~~~
blaines
This is _the best_ "learn by doing" iOS example around to date.

------
stevenbrianhall
Just saw this come across Twitter:

"What @samsoffes has built with @cheddar is amazing for a solo gig: website,
iOS app, API, open source, blog, store. Many startups do less." - @bb

After checking everything out and struggling with finishing up a thousand
little side projects myself, I really respect the thoroughness.

~~~
flightblog
Agreed. EVERYTHING is polished and complete. Amazing work for a single
developer.

------
carson
As much as I love seeing example apps like this I think beginners probably
need to be cautious looking at this code. Here are a couple things that
concern me:

* The UI is all hand coded. Not to start a religious war but interface builder makes supporting different devices a lot easier.

* There is some hairy concurrency stuff going on like this [https://github.com/nothingmagical/cheddar-ios/blob/master/Cl...](https://github.com/nothingmagical/cheddar-ios/blob/master/Classes/CDIListViewController.m#L414)

~~~
farmer_ted
That "hairy" stuff is a straightforward use of GCD semaphores to signal when
an animation has finished. I just spent 20 minutes reading up on GCD and
dispatch_semaphore_wait(). This technique is elegant rather than hairy.

~~~
carson
I just picked a line out of the area to point to. I'll pose a few questions
that go into more about why I believe this is code that isn't straightforward
and in general a bad reference point for a beginner:

* Can you tell me why that entire block of code gets dispatched to one queue then right into the main queue?

* Can you tell me what queue the animation completion blocks run on and why it might matter?

* Can you tell me what queue the network request runs on?

* Do you think the animation completes before the network request finishes? Can you tell me why/why not?

* What happens if the network request fails?

------
brackin
Cheddar's syncing is a bit hit-or-miss. On one hand you know that when you
post a task it's synced instantly and you know when it's finished but on the
other you have to have a constant internet connection.

I use these apps on the Underground to plan my day and always get errors when
trying to do anything in app. It's also a huge battery drain, after each small
change I see that my iPhone is connecting to the internet and using the app
for a few minutes can drain a large percentage.

Forgetting about those problems, it's a beautiful app and is very functional
although slightly limited. Which could be a selling point vs it's tedious
competition.

~~~
samsoffes
I'm adding offline in the next update. The current stuff totally sucks.
Shipping was more important than amazing tech.

~~~
wingfield
sweet! I had to abandon Cheddar when I went abroad for 2 weeks (no constant
data plan) due to no offline support.

------
davepeck
Neat.

After a quick poke around, this looks like a great codebase to learn from -- I
will certainly point aspiring iOS developers in its direction. All the basics
(CoreData, custom table views) are there, as are nice uses of more modern
features like blocks and APIs like in-app purchase.

Out of curiosity, what's the deal with the CDKHTTPClient? It looks like the
implementation is stubbed out for this release -- aka there is a back-end, but
none of the back-end code is made available (at least so far)? I only took a
quick look, so I might have missed something obvious.

~~~
rlwimi
It's a subclass of AFHTTPClient. See:

<https://github.com/AFNetworking/AFNetworking/>

~~~
davepeck
Ah, I hadn't run rake setup to pull in submodules. It's in CheddarKit -- makes
sense. Thanks.

------
mgurlitz
I'm surprised he included the app's resources (icon, etc.) under the BSD
license -- rewriting the data store to use iCloud instead of his service
(where Cheddar makes money, but also the source of many complaints in reviews)
while keeping the UI would make a quick (though somewhat seedy) buck on the
App Store.

~~~
dante_dev
It's not a big idea, because if you use iCloud, you can't have a webapp that
use Cheddar, you can use only on iOS devices and Mac OS X, that would be a
HUGE limit. I love the webapp, and I like the idea that multiplatforms clients
can be made in fucture (windows, wp7, android, etc...)

~~~
mgurlitz
There are plenty of todo apps for syncing to every device you own. Atleast I
would pay $1.99 for a gorgeous, dead-simple to use todo list just for my iOS
devices (that works offline too).

~~~
josephlord
Apologies for blatant plug but it feels on topic.

If you are willing to pass up on the gorgeous you could give my app a try
<http://iTunes.com/apps/fastlists>

Reusable tick able lists for things like shopping and packing. Functional
rather than beautiful and import/export by email (no syncing yet). No ads yet
(there will be a cheap no-ads in-app purchase when it does have ads).

------
farhanpatel
Thanks for this.

Even though I've made a few apps It still is really hard to get an idea of how
big projects come together. It can be hard to organize everything so it isn't
one big mess!

As a solo developer I dont have a superior telling me "this is how the code is
organized" or "when doing this. use this pattern instead". This is going to
help me a LOT I'm not about to rewrite months of code but now I'll have a
frame of reference of how things should be.

------
natep
Excellent! I've been meaning to get into Emacs Lisp, so maybe I'll use the API
to create an extension or lightweight alternative to org-mobile, with this
client as inspiration. I've been meaning to do the same for Google Tasks
(which I use) but their product and API is much more complicated and
intimidating.

------
marknutter
When I was learning iOS development I found it hard to find full, modern
example applications out there in the wild like this to learn from. Does
anybody know of any more?

------
veyron
Who produces the high quality photos and video on the site?

------
dillera
the app reviews in iTunes store seem to hilight some deficiencies

~~~
Skywing
I'm sure he'd accept pull requests.

~~~
samsoffes
:)

