Awesome
<img height='175' src="https://static.openfoodfacts.org/images/svg/openfoodfacts-logo-en.svg" align="left" hspace="1" vspace="1">Open Food Facts iOS app
Note: Xcode's limited Markdown support means this file is best viewed on GitHub. Not seeing this as a formatted file in Xcode? Check out the Build section of the project wiki on GitHub for troubleshooting tips.
<a href="https://apps.apple.com/app/open-food-facts/id588797948"><img height="75" src="https://user-images.githubusercontent.com/7317008/43209852-4ca39622-904b-11e8-8ce1-cdc3aee76ae9.png" align="left" hspace="1" vspace="1"></a>
What is Open Food Facts?
Open Food Facts is a food products database made by everyone, for everyone.
Help translate Open Food Facts in your language
You can help translate Open Food Facts and the app at (no technical knowledge required, takes a minute to signup): translate.openfoodfacts.org
Features
- Offline barcode scanning
- Product search
- Allergen alert
- Product details
- Image upload
- Handle multilingual products (view)
- Handle multilingual products (data addition)
- On-the-fly OCR of ingredients and labels for new product addition
- Internationalised user interface
- Native editing
- Product addition
- Night mode
What can I work on ?
Open Food Facts on iPhone and iPad has 0,5M users and 1M products. Each contribution you make will have a large impact on food transparency worldwide. Finding the right issue or feature will help you have even more more impact. Feel free to ask for feedback on the #android channel before you start work, and to document what you intend to code.
Priority roadmap
- Additives evaluation (already ready server side and on Android) issue #173
- Compare Mode issue #153
- Product lists (to buy, eaten…)
Secondary roadmap
- On-device Product cache
- Add a food category browser
- Add support for the new JSON taxonomy system (multilingual, and data augmentation from Wikipedia/Wikidata)
- Support for Open Beauty Facts, Open Pet Food Facts and Open Product Facts
Issues
Here are issues and feature requests you can work on:
Search issues
Scan issues
History issues
Product editing issues
Refactoring issues
Onboarding new users
Viewing products
Images
Building
Automatic setup
The easiest way to setup the dependencies of the project and generate the Xcode project is to run sh scripts/setup.sh
from the top of the repository.
Manual setup
If you prefer to not use the sh scripts/setup.sh
script and install the dependencies yourself, follow the instructions below.
We use Carthage for dependency management.
Run carthage bootstrap --platform iOS --cache-builds
before opening the project in Xcode.
You can install Carthage with Homebrew:
brew install carthage
To generate the Xcode project run sh scripts/create-project.sh
.
In order to generate the Xcode project we use XcodeGen.
Carthage resources
New to Carthage? Others have found the following resources helpful:
Fastlane
Currently there are two lanes, one for running the tests (fastlane test
) and one for uploading a new beta to TestFlight (fastlane beta
).
You can install Fastlane with Homebrew:
brew cask install fastlane
Generating screenshots
fastlane snapshot
Roadmap on automatic screenshot generation:
- fixing the non translatable scan product button so that the screenshot and the app are fully translated
- fixing the Scan screenshot generation, and adding a way to set the background of the barcode scanner with an arbitrary image, per country
- fixing History screenshot population with products
- Adding the proposed fix to clean the top bar with 100% battery, and a fixed time
- Adding
fastlane frameit
to the Fastlane file, so that we can get versions wrapped in physical devices - fixing Chinese screenshot generation
- Ensure we can generate for 1 of (iPhone 11 Pro Max, iPhone 11, iPhone XS Max, iPhone XR), 1 of (iPhone 6s Plus, iPhone 7 Plus, iPhone 8 Plus), 1 of (3rd generation iPad Pro)
- Extra: For debugging purposes, it would be great to have other screen resolutions (iPhone 11 Pro, iPhone X, iPhone XS) (iPhone 6, iPhone 6s, iPhone 7, iPhone 8) (iPhone SE) (iPhone 4s)
SwiftLint
We have a script that runs when building the app, it executes SwiftLint to enforce a style and conventions to the code.
You can install SwiftLint with Homebrew:
brew install swiftlint
Support
OpenFoodFacts has a Slack team where we chat, discuss and support each other, join the #iOS and #iOS-alerts channels. Click here to join.