diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index e733cf6..f2ea225 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -1,5 +1,8 @@ plugins { id("com.android.application") + // START: FlutterFire Configuration + id("com.google.gms.google-services") + // END: FlutterFire Configuration id("kotlin-android") // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id("dev.flutter.flutter-gradle-plugin") diff --git a/android/app/google-services.json b/android/app/google-services.json new file mode 100644 index 0000000..13055cd --- /dev/null +++ b/android/app/google-services.json @@ -0,0 +1,38 @@ +{ + "project_info": { + "project_number": "39016471396", + "firebase_url": "https://traccar-client-app.firebaseio.com", + "project_id": "traccar-client-app", + "storage_bucket": "traccar-client-app.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:39016471396:android:b1c7194c699bfa25", + "android_client_info": { + "package_name": "org.traccar.client" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyD5uSOXpbWkR8C3fqdNKQcI7BJrPObpeP4" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "39016471396-7mdutolor3h210bm9qmf60gp18lmmhnm.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "org.traccar.client.TraccarClient" + } + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index a439442..9e2d35c 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -19,6 +19,9 @@ pluginManagement { plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" id("com.android.application") version "8.7.0" apply false + // START: FlutterFire Configuration + id("com.google.gms.google-services") version("4.3.15") apply false + // END: FlutterFire Configuration id("org.jetbrains.kotlin.android") version "1.8.22" apply false } diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..b024418 --- /dev/null +++ b/firebase.json @@ -0,0 +1 @@ +{"flutter":{"platforms":{"android":{"default":{"projectId":"traccar-client-app","appId":"1:39016471396:android:b1c7194c699bfa25","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"traccar-client-app","appId":"1:39016471396:ios:78cbbf5775b43308","uploadDebugSymbols":false,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"traccar-client-app","configurations":{"android":"1:39016471396:android:b1c7194c699bfa25","ios":"1:39016471396:ios:78cbbf5775b43308"}}}}}} \ No newline at end of file diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 88a0687..b2238aa 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; F301A0628B4B67129B4EF6BC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF9CEA917E371A914E728FD9 /* Pods_Runner.framework */; }; F7404BADF18F0407F900F367 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C29E374AB4C3F885DE083543 /* Pods_RunnerTests.framework */; }; + F7C3033B72F10E5D400E8620 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 42DA49C4C866005273D03AF6 /* GoogleService-Info.plist */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -48,6 +49,7 @@ 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 42DA49C4C866005273D03AF6 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = ""; }; 50797FECAA48F3999E66543E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -118,6 +120,7 @@ 331C8082294A63A400263BE5 /* RunnerTests */, DC5B6CE5A1B7DC8E9FC89129 /* Pods */, F91A8C14E37051DCD5210011 /* Frameworks */, + 42DA49C4C866005273D03AF6 /* GoogleService-Info.plist */, ); sourceTree = ""; }; @@ -268,6 +271,7 @@ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 86ABD4FD2DCDB6B60041010B /* PrivacyInfo.xcprivacy in Resources */, 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + F7C3033B72F10E5D400E8620 /* GoogleService-Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/ios/Runner/GoogleService-Info.plist b/ios/Runner/GoogleService-Info.plist new file mode 100644 index 0000000..13fb44e --- /dev/null +++ b/ios/Runner/GoogleService-Info.plist @@ -0,0 +1,36 @@ + + + + + CLIENT_ID + 39016471396-7mdutolor3h210bm9qmf60gp18lmmhnm.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.39016471396-7mdutolor3h210bm9qmf60gp18lmmhnm + API_KEY + AIzaSyBEdxpKXTvJJfYDh28OLffAk4z7S7caf08 + GCM_SENDER_ID + 39016471396 + PLIST_VERSION + 1 + BUNDLE_ID + org.traccar.client.TraccarClient + PROJECT_ID + traccar-client-app + STORAGE_BUCKET + traccar-client-app.firebasestorage.app + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:39016471396:ios:78cbbf5775b43308 + DATABASE_URL + https://traccar-client-app.firebaseio.com + + \ No newline at end of file diff --git a/lib/firebase_options.dart b/lib/firebase_options.dart new file mode 100644 index 0000000..f52e668 --- /dev/null +++ b/lib/firebase_options.dart @@ -0,0 +1,71 @@ +// File generated by FlutterFire CLI. +// ignore_for_file: type=lint +import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; +import 'package:flutter/foundation.dart' + show defaultTargetPlatform, kIsWeb, TargetPlatform; + +/// Default [FirebaseOptions] for use with your Firebase apps. +/// +/// Example: +/// ```dart +/// import 'firebase_options.dart'; +/// // ... +/// await Firebase.initializeApp( +/// options: DefaultFirebaseOptions.currentPlatform, +/// ); +/// ``` +class DefaultFirebaseOptions { + static FirebaseOptions get currentPlatform { + if (kIsWeb) { + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for web - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + } + switch (defaultTargetPlatform) { + case TargetPlatform.android: + return android; + case TargetPlatform.iOS: + return ios; + case TargetPlatform.macOS: + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for macos - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + case TargetPlatform.windows: + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for windows - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + case TargetPlatform.linux: + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for linux - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + default: + throw UnsupportedError( + 'DefaultFirebaseOptions are not supported for this platform.', + ); + } + } + + static const FirebaseOptions android = FirebaseOptions( + apiKey: 'AIzaSyD5uSOXpbWkR8C3fqdNKQcI7BJrPObpeP4', + appId: '1:39016471396:android:b1c7194c699bfa25', + messagingSenderId: '39016471396', + projectId: 'traccar-client-app', + databaseURL: 'https://traccar-client-app.firebaseio.com', + storageBucket: 'traccar-client-app.firebasestorage.app', + ); + + static const FirebaseOptions ios = FirebaseOptions( + apiKey: 'AIzaSyBEdxpKXTvJJfYDh28OLffAk4z7S7caf08', + appId: '1:39016471396:ios:78cbbf5775b43308', + messagingSenderId: '39016471396', + projectId: 'traccar-client-app', + databaseURL: 'https://traccar-client-app.firebaseio.com', + storageBucket: 'traccar-client-app.firebasestorage.app', + iosClientId: '39016471396-7mdutolor3h210bm9qmf60gp18lmmhnm.apps.googleusercontent.com', + iosBundleId: 'org.traccar.client.TraccarClient', + ); +}