From 35a0228cbe0d85d2289e8c67ecbd589d0d07775c Mon Sep 17 00:00:00 2001 From: Vaibhav Surve Date: Tue, 26 Aug 2025 11:06:02 +0530 Subject: [PATCH] refactor: update package name and application ID to 'com.marco.aiot'; comment out Firebase-related code --- android/app/build.gradle | 4 ++-- android/app/google-services.json | 2 +- android/app/src/main/AndroidManifest.xml | 4 +--- .../kotlin/com/example/maxdash/MainActivity.kt | 2 +- ios/Runner.xcodeproj/project.pbxproj | 12 ++++++------ lib/controller/auth/login_controller.dart | 4 +++- lib/controller/auth/mpin_controller.dart | 9 +++++---- lib/helpers/services/api_endpoints.dart | 4 ++-- lib/helpers/services/app_initializer.dart | 14 ++++++++++---- lib/view/dashboard/dashboard_screen.dart | 5 ++++- linux/CMakeLists.txt | 2 +- macos/Runner.xcodeproj/project.pbxproj | 6 +++--- macos/Runner/Configs/AppInfo.xcconfig | 2 +- pubspec.yaml | 2 +- test/widget_test.dart | 2 +- 15 files changed, 42 insertions(+), 32 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 134dc2b..efbe5d9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -15,7 +15,7 @@ if (keystorePropertiesFile.exists()) { android { // Define the namespace for your Android application - namespace = "com.marco.aiotstage" + namespace = "com.marco.aiot" // Set the compile SDK version based on Flutter's configuration compileSdk = flutter.compileSdkVersion // Set the NDK version based on Flutter's configuration @@ -37,7 +37,7 @@ android { // Default configuration for your application defaultConfig { // Specify your unique Application ID. This identifies your app on Google Play. - applicationId = "com.marco.aiotstage" + applicationId = "com.marco.aiot" // Set minimum and target SDK versions based on Flutter's configuration minSdk = 23 targetSdk = flutter.targetSdkVersion diff --git a/android/app/google-services.json b/android/app/google-services.json index bc75b8b..e1ce769 100644 --- a/android/app/google-services.json +++ b/android/app/google-services.json @@ -9,7 +9,7 @@ "client_info": { "mobilesdk_app_id": "1:626581282477:android:8d3cf5009ff92ef67ff024", "android_client_info": { - "package_name": "com.marco.aiotstage" + "package_name": "com.marco.aiot" } }, "oauth_client": [], diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 1be2de2..6499e02 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -7,10 +7,8 @@ - - initializeApp() async { await Future.wait([ _setupUI(), - _setupFirebase(), + // _setupFirebase(), // ❌ Commented out Firebase init _setupLocalStorage(), ]); @@ -28,7 +28,7 @@ Future initializeApp() async { await _handleAuthTokens(); await _setupTheme(); await _setupControllers(); - await _setupFirebaseMessaging(); + // await _setupFirebaseMessaging(); // ❌ Commented out FCM init _finalizeAppStyle(); @@ -56,10 +56,13 @@ Future _setupUI() async { logSafe("💡 UI setup completed."); } +// ❌ Commented out Firebase setup +/* Future _setupFirebase() async { await Firebase.initializeApp(); logSafe("💡 Firebase initialized."); } +*/ Future _setupLocalStorage() async { await LocalStorage.init(); @@ -114,10 +117,13 @@ Future _setupControllers() async { ]); } +// ❌ Commented out Firebase Messaging setup +/* Future _setupFirebaseMessaging() async { await FirebaseNotificationService().initialize(); logSafe("💡 Firebase Messaging initialized."); } +*/ void _finalizeAppStyle() { AppStyle.init(); diff --git a/lib/view/dashboard/dashboard_screen.dart b/lib/view/dashboard/dashboard_screen.dart index 8eaa41d..e9570fa 100644 --- a/lib/view/dashboard/dashboard_screen.dart +++ b/lib/view/dashboard/dashboard_screen.dart @@ -11,7 +11,7 @@ import 'package:marco/helpers/widgets/my_spacing.dart'; import 'package:marco/helpers/widgets/my_text.dart'; import 'package:marco/view/dashboard/dashboard_chart.dart'; import 'package:marco/view/layouts/layout.dart'; -import 'package:marco/helpers/services/firebase/firebase_messaging_service.dart'; +// import 'package:marco/helpers/services/firebase/firebase_messaging_service.dart'; // ❌ Commented out class DashboardScreen extends StatefulWidget { const DashboardScreen({super.key}); @@ -55,6 +55,8 @@ class _DashboardScreenState extends State with UIMixin { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ + // ❌ Commented out FCM Test Button + /* ElevatedButton( onPressed: () async { final fcmService = FirebaseNotificationService(); @@ -66,6 +68,7 @@ class _DashboardScreenState extends State with UIMixin { child: const Text("Send Test Notification"), ), MySpacing.height(10), + */ _buildDashboardStats(context), MySpacing.height(24), _buildAttendanceChartSection(), diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 7809054..b0b5577 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -7,7 +7,7 @@ project(runner LANGUAGES CXX) set(BINARY_NAME "marco") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "com.marco.aiotstage") +set(APPLICATION_ID "com.marco.aiot") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 20ce3ed..cc7ae89 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -385,7 +385,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiotstage.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/marco.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/marco"; @@ -399,7 +399,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiotstage.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/marco.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/marco"; @@ -413,7 +413,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiotstage.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/marco.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/marco"; diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig index 7f80201..39359c4 100644 --- a/macos/Runner/Configs/AppInfo.xcconfig +++ b/macos/Runner/Configs/AppInfo.xcconfig @@ -8,7 +8,7 @@ PRODUCT_NAME = marco // The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiotstage +PRODUCT_BUNDLE_IDENTIFIER = com.marco.aiot // The copyright displayed in application information PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved. diff --git a/pubspec.yaml b/pubspec.yaml index aa4f0bc..b3485ee 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.0+6 +version: 1.0.0+7 environment: sdk: ^3.5.3 diff --git a/test/widget_test.dart b/test/widget_test.dart index 85ba5c7..50cec9b 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -13,7 +13,7 @@ import 'package:marco/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); + await tester.pumpWidget(const MainWrapper()); // Verify that our counter starts at 0. expect(find.text('0'), findsOneWidget);