• This repository has been archived on 05/Dec/2019
  • Stars
    star
    860
  • Rank 53,022 (Top 2 %)
  • Language
    Objective-C
  • License
    Other
  • Created almost 11 years ago
  • Updated about 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

iPhone grocery list app, synchronized using GitHub 🍌

GroceryList Build Status

GroceryList is a simple iPhone application built to serve two basic needs:

  1. Creating and managing a grocery list
  2. Synchronizing that grocery list between multiple people

The app also serves as an example project for a few different frameworks. It is not meant to be feature-complete, polished, or worth any kind of payment.

If you're only interested in using the app, you can jump straight to getting it built.

App icon

(Icon created by @brender.)

Synchronization

The app stores and synchronizes its grocery list using a GitHub repository, since it's easier than writing a synchronization service, and because Git and the GitHub API already support atomic changes. This also means the list is editable from the web, without any need to build a custom web app.

List Format

The grocery list repository follows a fairly simple structure. Each grocery store is represented by a text file of the same name, and those files contain newline-separated lists of grocery items.

For example, the repository could be comprised of these files:

Costco
Safeway
Target

Each file will contain items like this:

Bread
~Crackers~
Peanut butter

Item names with a tilde on either side (~Crackers~ in the above example) have been "crossed off" of the list, but not yet deleted.

The same item name may appear in multiple store files. Those separate entries will be collapsed into one visible item within the app.

Frameworks

The GroceryList app was built partly as a "real world" demonstration of several frameworks, including:

Specific libraries aside, the app also serves as a general example of functional reactive programming (FRP) and Model-View-ViewModel (MVVM) in Cocoa.

Using the App

GroceryList is a personal project, not an App Store-quality download. To actually use it, and share your list with specific people, there are a few hoops you'll need to jump through first.

Before anything else, make sure to run script/bootstrap in your local copy of the repository. This will automatically clone all submodules used in the project.

Starting the List

Since the app is built on GitHub, it requires a GitHub repository that all users (you, and anyone you want to share the list with) will have permission to push to.

First, create the repository. It can be public or private—just keep in mind the privacy setting when adding grocery items or stores.

Due to a known bug in the app, you must have at least one file in the repository before using it. You can choose to initialize it with a README, or create the file by hand (following the list format), just as long as the repository is not empty.

Finally, add anyone with whom you want to share the list as collaborators on the repository.

Creating an OAuth Application

To be able to log in through the app, it must be configured as a GitHub OAuth application. Simply register a new application, making sure to enter grocery-list://auth as the "Authorization callback URL."

After registration, you'll have to add the client ID and secret to the project's build settings.

Required Build Settings

Because the author is lazy, the project won't build until (effectively) hardcoded with certain settings. This is accomplished with a custom Xcode configuration file that is specifically ignored by Git.

In your local clone of the repository, inside the Configuration folder, create a file named UserSettings.xcconfig. In it, add a line like the following:

GCC_PREPROCESSOR_DEFINITIONS=$(inherited) GCY_LIST_REPOSITORY=username/grocery-lists GCY_CLIENT_ID= GCY_CLIENT_SECRET=

Replace the value of GCY_LIST_REPOSITORY with the actual full name of the repository containing the list you created. Fill in GCY_CLIENT_ID and GCY_CLIENT_SECRET with the details from the OAuth application you registered.

After the configuration file has been saved, you should be able to open the project and build.

Distribution

The most straightforward way to get up and running with your customized version of the app is to build it directly to the device of anyone interested in sharing your grocery list.

However, it may be easier over the long term to use a (totally optional) service like HockeyApp or TestFlight for distributing builds.

License

This project is released under the MIT license.

More Repositories

1

libextobjc

A Cocoa library to extend the Objective-C programming language.
Objective-C
4,527
star
2

RxSwift

Proof-of-concept for implementing Rx primitives in Swift
Swift
600
star
3

objc-build-scripts

Bootstrap and CI scripts for Objective-C projects.
Shell
255
star
4

enemy-of-the-state

My talk explaining what state is and why it's so harmful
Swift
208
star
5

Crust

Reimagining Mantle in Swift (experimental)
Swift
197
star
6

adt

Algebraic data types for Python (experimental, not actively maintained)
Python
172
star
7

Microverse

macOS virtualization app for M1/Apple Silicon
Swift
126
star
8

ObjectiveHaskell

Tools for making it easier to integrate Haskell and Objective-C.
Haskell
92
star
9

the-future-of-reactivecocoa

Presentation for RACDC 2014
75
star
10

effective-code-review

Presentation about my process for making code reviews as effective as possible
65
star
11

Clairvoyant

Append-only key-value database
Swift
61
star
12

library-oriented-programming

Talk about the how/why of separating concerns into libraries
57
star
13

libextc

A fully C99-compliant library to extend the C programming language itself.
Shell
57
star
14

haskell-cocoa-clojure

Clojure to Cocoa, built with Haskell (abandoned).
Objective-C
48
star
15

Notifications

Demo iPhone app for viewing your GitHub notifications
Swift
43
star
16

SafeDispatch

A Cocoa framework to make Grand Central Dispatch safer (deprecated).
Objective-C
40
star
17

carthage-talk

Ruthlessly Simple Dependency Management with Carthage
Objective-C
36
star
18

RxHaskell

Reactive Extensions for Haskell (experimental)
Haskell
35
star
19

objective-clojure

Clojure to Objective-C compiler (abandoned).
Clojure
28
star
20

documentalist

A multi-language, extensible documentation generator
C++
27
star
21

has-tags

Command line utility for testing Mavericks tags
C
17
star
22

ScrumBut

Scrum, but with GitHub Issues (experimental)
Haskell
16
star
23

sandboxing-guide

Suggestions for sandboxing Mac and Windows applications and workflows to improve security, while balancing usability
16
star
24

luac-llvm

A Lua front-end for LLVM to translate code into calls to the Lua C API.
Haskell
16
star
25

correct-behavior-through-type-safety

Talk about using types to prove correctness
Swift
15
star
26

designing-for-graphql

Presentation about the mindset shift that GraphQL requires, and best practices to adapt to it
14
star
27

dotfiles

My personal configuration files.
Vim Script
12
star
28

pure-lua

Pure functional programming for Lua
Lua
9
star
29

MoonlitCocoa

A framework to build Cocoa applications with a purely functional Lua model.
Objective-C
9
star
30

shell-scripts

Miscellaneous useful shell scripts.
Shell
8
star
31

Merc

Space sim inspired by Escape Velocity
GDScript
7
star
32

ibdatastream

Microservice to connect to Interactive Brokers and stream market data elsewhere
Python
5
star
33

statelessness-of-the-union

Presentation for RACDC 2015
5
star
34

homebrew-haskell

Haskell formulae for the Homebrew package manager
Ruby
3
star
35

norn

Embeddable blockchain library for low-latency P2P multiplayer games (proof of concept)
Lua
3
star
36

objective-d

Automatically exported from code.google.com/p/objective-d
D
3
star
37

mercury-playground

Learning the Mercury programming language
Mercury
2
star
38

rxhaskell-talk

Proposal for Strange Loop 2013 (rejected)
2
star
39

git-dsl

An embedded DSL for Git operations
Haskell
1
star
40

reactive-python

Reactive programming abstractions for asyncio and the Python standard library (proof-of-concept)
Python
1
star
41

atom-language-swift

Swift language support for the Atom editor
CoffeeScript
1
star
42

jspahrsummers

GitHub profile README
1
star
43

python-build-scripts

Bootstrap and CI scripts for [my] Python projects
Shell
1
star