A new release of the previous MoniCrop iOS application, but now connected to Firebase.
View interactive prototype on Figma
Before building, you need to add the following files (not included in the repository for security):
-
GoogleService-Info.plist - Firebase configuration file
- Obtain from Firebase Console for your project
- Place in:
MoniCrop/GoogleService-Info.plist
-
Config.swift - API credentials configuration
- Create at:
MoniCrop/Config.swift - Template:
struct Config { static let telegramBotToken = "YOUR_BOT_TOKEN" static let telegramChatID = "YOUR_CHAT_ID" }
- Create at:
- Xcode: 26.1+ (Build version 17B100)
- iOS Deployment Target: 16.1+
- Swift: Latest version included with Xcode
The project currently uses Firebase SDK 9.6.0, which has a compiler incompatibility with Xcode 26.1.
Problem: Build fails with error "An attribute list cannot appear here" in FIRFirestoreSettings.mm:33
Temporary Workaround (if build fails):
# Find the exact DerivedData path (check build logs or use this pattern)
find ~/Library/Developer/Xcode/DerivedData -name "FIRFirestoreSettings.mm" -path "*/firebase-ios-sdk/*" 2>/dev/null
# Apply the patch (replace the path with your actual DerivedData path)
sed -i.bak '33s/ABSL_CONST_INIT //' ~/Library/Developer/Xcode/DerivedData/MoniCrop-*/SourcePackages/checkouts/firebase-ios-sdk/Firestore/Source/API/FIRFirestoreSettings.mmImportant Notes:
- This patch is temporary and will be lost if you:
- Clean the build folder (Product → Clean Build Folder)
- Update Swift packages
- Delete DerivedData
- You'll need to re-apply the patch if any of the above occur
- Permanent solution: Update Firebase SDK to version 10.x or 11.x (compatible with Xcode 26)
- Requires updating
Package.swiftorPackage.resolved - May require code changes for API compatibility
- Requires updating
- Open
MoniCrop.xcodeprojin Xcode - Ensure
GoogleService-Info.plistandConfig.swiftare added to the project - Select your target device or simulator (iOS 16.1+)
- Build and run (⌘R)
- If build fails with Firebase error, apply the workaround above
- Models/: Data models (Items)
- Views/: SwiftUI views for UI
- Graph views: moisture, temperature, nitrogen, pH, phosphorus, potassium, conductivity, distance
- Auth views: SignIn, SignUp, ForgotPassword
- Main views: Home, Landing, Account, Customer, etc.
- ViewModels/: View models for data management
- Assets.xcassets/: Image assets (crop icons, app logo)
- Firebase Authentication (email/password)
- Firestore database integration for soil data and user management
- Real-time sensor data visualization with labeled graphs
- Plant monitoring by crop type and plant ID
- Account management
- Telegram bot integration for notifications
This website is part of the MoniCrop Smart Crop Monitoring System:
- MoniCrop Hardware - IoT sensors and hardware components
- MoniCrop Website - Functional Website
If you use this work, please cite:
@article{Afi2023,
author = "Eman Sarah Afi",
title = "{Development of a Smart Crop Monitoring System}",
year = "2023",
month = "10",
url = "https://aubh.figshare.com/articles/thesis/_b_Development_of_a_Smart_Crop_Monitoring_System_b_/30580751",
doi = "10.58014/aubh.24314056.v2"
}Published thesis: Development of a Smart Crop Monitoring System (DOI: 10.58014/aubh.24314056.v2)
