SaveTheBite is an iOS application designed to help users manage their grocery items more efficiently by making sure that the food does not expire. It features barcode scanning, text recognition for expiration dates, and a user-friendly interface for organizing items by date. This was my first application I made using Swift as a part of a project course during my bachelor's studies fall 2023, where I chose to learn Swift programming.
- Barcode Scanning: Users can scan both the barcode and expiration date using the device's camera.
- Manual Entry: For items without a barcode or with unreadable barcodes, users can input the barcode number and expiration date manually.
- CoreData integration for persistent storage of item data.
- Custom user interface for managing and displaying items.
- Navigation and UI customization with dynamic color themes depending on the expiration date.
- Sheet View & Multiple Views: The app supports a sheet view for adding items via camera and manual input, along with multiple views for product fetching and entry.
- Supporting animations for enhanced user experience.
- XCode 12 or later
- iOS 14 or later
- Swift 5
- Clone the repository from GitLab.
- Open the project in XCode.
- Install any required dependencies.
- Build and run the application on a compatible iOS device or simulator.
- Ensure that your Apple ID is configured to support app installation.
- Lottie: Lottie iOS (can be installed using Package Manager or CocoaPods).
- SwiftGif: (included in the repository).
- Use the 'Add Item' button to open the camera and scan the barcode of an item.
- For items without a barcode or with unreadable barcodes, use the 'Add Manually' option.
- Items are displayed in a table view, organized by their expiration dates.
- Expired items are highlighted for easy identification.
- Swipe to delete items as needed.
- AppDelegate: Manages core application lifecycle events.
- ItemManager: Handles creation, addition, and deletion operations for item data using CoreData, ensuring data persistence.
- DetectTextManager: Implements text recognition to extract expiration dates from product packaging.
- DetectBarcodeManager: Provides barcode scanning functionality.
- ProductFetcher: Fetches product data from the OpenFoodFacts API.
- TableViewController: The main interface for displaying and managing items.
- CustomSheetViewController: Manages the UI for barcode and expiration date scanning.
- Modify
ColoursManager
to change the application’s color theme. - Update
CustomTableViewCell
for custom cell layouts.
- Fix deletion method: Currently, deleting the first item removes the last item due to CoreData indexing issues.
- Fix date method: Currently, sometimes depending on the format of the input date the date might be incorrect.
- Add an animation when manually adding items (currently only appears for barcode scanning).
- Implement notification functionality.
- Display more item information when pressed (e.g., allergens, nutritional information).
- Add more interactive elements.
- Support light and dark modes (currently, both modes use the same colors).
- Clean up the
Controls
folder and organize methods into theModels
andViews
folders.
- Icons provided by Icons8.
- Illustrations by Elisabet Guba from Ouch!.
- OpenFoodFacts API used for product data: OpenFoodFacts.
- SwiftGif: SwiftGif.