openfoodfacts / openfoodfacts-ios

Native (Swift) version of Open Food Facts for iOS. Coders & Decoders welcome 🤳🥫 😊
https://ios.openfoodfacts.org
Apache License 2.0
361 stars 159 forks source link
crowdsourcing food food-additives food-products foodtracker hacktoberfest ios iphone openfoodfacts swift xcode

(Old) Open Food Facts iPhone and iPad app

The new app is located at https://github.com/openfoodfacts/smooth-app. We would like to use some part of this to create a Swift SDK for Open Food Facts. Will you help us ?

Build Status Project Status Crowdin TestFlight release

What is Open Food Facts? What can I work on ?

Open Food Facts is a food products database made by everyone, for everyone. Open Food Facts on iPhone and iPad has 0,5M users and 1,6M 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.

Features you can work on

Join the team !

OpenFoodFacts has a Slack chat room where we discuss and support each other, join the #iOS and #iOS-alerts channels.

Current features

Code documentation

Automatically generated code documentation on the wiki

Building

Quick & 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, before opening the project in Xcode.

Dependency Management - Carthage

We currently use Carthage for dependency management. New to Carthage? Others have found the following resources helpful:

Before opening the project in Xcode, run brew install carthage

carthage bootstrap --platform iOS --cache-builds

To generate the Xcode project run sh scripts/create-project.sh. In order to generate the Xcode project we use XcodeGen.

Fastlane

See the fastlane/README.md for a list and description of all lanes.

To launch a lane, you must have several env variable set. This can be done by creating a .env file in the fastlane folder, and fill it (see .env.example)

You can install Fastlane with Homebrew:

brew cask install fastlane

Generating screenshots

fastlane snapshot 
Roadmap on automatic screenshot generation:

Style and conventions - SwiftLint

A script runs when building the app that executes SwiftLint to enforce style & conventions to the code.

You can install SwiftLint with Homebrew:

brew install swiftlint

Error reporting - Sentry

Track crashes

Translations

You can help translate Open Food Facts (no technical knowledge required, takes a minute to signup).