Skip to content

Commit

Permalink
Set up firebase
Browse files Browse the repository at this point in the history
Firebase configure
  • Loading branch information
minhtri2k3 committed Sep 10, 2024
1 parent e152030 commit be2cbc5
Show file tree
Hide file tree
Showing 8 changed files with 203 additions and 18 deletions.
19 changes: 19 additions & 0 deletions android/app/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,25 @@
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:469747224129:android:b59e4d339c6a45f3b080c0",
"android_client_info": {
"package_name": "com.smartspending.app"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyBE5-6I6oUgEmOSIPFS23uabPTeJVPsuKA"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
Expand Down
1 change: 1 addition & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"flutter":{"platforms":{"android":{"default":{"projectId":"anchoitieudung","appId":"1:469747224129:android:b59e4d339c6a45f3b080c0","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"anchoitieudung","appId":"1:469747224129:ios:4a2575b8e676b460b080c0","uploadDebugSymbols":false,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"macos":{"default":{"projectId":"anchoitieudung","appId":"1:469747224129:ios:4a2575b8e676b460b080c0","uploadDebugSymbols":false,"fileOutput":"macos/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"anchoitieudung","configurations":{"android":"1:469747224129:android:b59e4d339c6a45f3b080c0","ios":"1:469747224129:ios:4a2575b8e676b460b080c0","macos":"1:469747224129:ios:4a2575b8e676b460b080c0","web":"1:469747224129:web:e7bb9c03509f1dd8b080c0","windows":"1:469747224129:web:b1427acd5f100b97b080c0"}}}}}}
4 changes: 4 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
2D5CFADD3D574E5CD514F27D /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C6C75D2C17F24D2772607122 /* GoogleService-Info.plist */; };
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
Expand Down Expand Up @@ -55,6 +56,7 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C6C75D2C17F24D2772607122 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -94,6 +96,7 @@
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
331C8082294A63A400263BE5 /* RunnerTests */,
C6C75D2C17F24D2772607122 /* GoogleService-Info.plist */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -216,6 +219,7 @@
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
2D5CFADD3D574E5CD514F27D /* GoogleService-Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
32 changes: 32 additions & 0 deletions ios/Runner/GoogleService-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>API_KEY</key>
<string>AIzaSyCcW-WKcXu_WsBgPeaukrWdhvx3GrN0Nco</string>
<key>GCM_SENDER_ID</key>
<string>469747224129</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.example.anchoitieudung</string>
<key>PROJECT_ID</key>
<string>anchoitieudung</string>
<key>STORAGE_BUCKET</key>
<string>anchoitieudung.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:469747224129:ios:4a2575b8e676b460b080c0</string>
<key>DATABASE_URL</key>
<string>https://anchoitieudung-default-rtdb.asia-southeast1.firebasedatabase.app</string>
</dict>
</plist>
93 changes: 93 additions & 0 deletions lib/firebase_options.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
// 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) {
return web;
}
switch (defaultTargetPlatform) {
case TargetPlatform.android:
return android;
case TargetPlatform.iOS:
return ios;
case TargetPlatform.macOS:
return macos;
case TargetPlatform.windows:
return windows;
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 web = FirebaseOptions(
apiKey: 'AIzaSyCm1MliO-i-acvpZ_7ET8OqMFakR-aZ_yM',
appId: '1:469747224129:web:e7bb9c03509f1dd8b080c0',
messagingSenderId: '469747224129',
projectId: 'anchoitieudung',
authDomain: 'anchoitieudung.firebaseapp.com',
databaseURL: 'https://anchoitieudung-default-rtdb.asia-southeast1.firebasedatabase.app',
storageBucket: 'anchoitieudung.appspot.com',
measurementId: 'G-G3TLH8ZRZ2',
);

static const FirebaseOptions android = FirebaseOptions(
apiKey: 'AIzaSyBE5-6I6oUgEmOSIPFS23uabPTeJVPsuKA',
appId: '1:469747224129:android:b59e4d339c6a45f3b080c0',
messagingSenderId: '469747224129',
projectId: 'anchoitieudung',
databaseURL: 'https://anchoitieudung-default-rtdb.asia-southeast1.firebasedatabase.app',
storageBucket: 'anchoitieudung.appspot.com',
);

static const FirebaseOptions ios = FirebaseOptions(
apiKey: 'AIzaSyCcW-WKcXu_WsBgPeaukrWdhvx3GrN0Nco',
appId: '1:469747224129:ios:4a2575b8e676b460b080c0',
messagingSenderId: '469747224129',
projectId: 'anchoitieudung',
databaseURL: 'https://anchoitieudung-default-rtdb.asia-southeast1.firebasedatabase.app',
storageBucket: 'anchoitieudung.appspot.com',
iosBundleId: 'com.example.anchoitieudung',
);

static const FirebaseOptions macos = FirebaseOptions(
apiKey: 'AIzaSyCcW-WKcXu_WsBgPeaukrWdhvx3GrN0Nco',
appId: '1:469747224129:ios:4a2575b8e676b460b080c0',
messagingSenderId: '469747224129',
projectId: 'anchoitieudung',
databaseURL: 'https://anchoitieudung-default-rtdb.asia-southeast1.firebasedatabase.app',
storageBucket: 'anchoitieudung.appspot.com',
iosBundleId: 'com.example.anchoitieudung',
);

static const FirebaseOptions windows = FirebaseOptions(
apiKey: 'AIzaSyCm1MliO-i-acvpZ_7ET8OqMFakR-aZ_yM',
appId: '1:469747224129:web:b1427acd5f100b97b080c0',
messagingSenderId: '469747224129',
projectId: 'anchoitieudung',
authDomain: 'anchoitieudung.firebaseapp.com',
databaseURL: 'https://anchoitieudung-default-rtdb.asia-southeast1.firebasedatabase.app',
storageBucket: 'anchoitieudung.appspot.com',
measurementId: 'G-Q34W847PXT',
);
}
6 changes: 5 additions & 1 deletion macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
371A24A2C423B1FCB7F8BB29 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4AC293490E6E1EDE8CA17554 /* GoogleService-Info.plist */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -64,7 +65,7 @@
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
33CC10ED2044A3C60003C045 /* anchoitieudung.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "anchoitieudung.app"; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10ED2044A3C60003C045 /* anchoitieudung.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = anchoitieudung.app; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
Expand All @@ -76,6 +77,7 @@
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
4AC293490E6E1EDE8CA17554 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -125,6 +127,7 @@
331C80D6294CF71000263BE5 /* RunnerTests */,
33CC10EE2044A3C60003C045 /* Products */,
D73912EC22F37F3D000D13A0 /* Frameworks */,
4AC293490E6E1EDE8CA17554 /* GoogleService-Info.plist */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -285,6 +288,7 @@
files = (
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
371A24A2C423B1FCB7F8BB29 /* GoogleService-Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
32 changes: 32 additions & 0 deletions macos/Runner/GoogleService-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>API_KEY</key>
<string>AIzaSyCcW-WKcXu_WsBgPeaukrWdhvx3GrN0Nco</string>
<key>GCM_SENDER_ID</key>
<string>469747224129</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.example.anchoitieudung</string>
<key>PROJECT_ID</key>
<string>anchoitieudung</string>
<key>STORAGE_BUCKET</key>
<string>anchoitieudung.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:469747224129:ios:4a2575b8e676b460b080c0</string>
<key>DATABASE_URL</key>
<string>https://anchoitieudung-default-rtdb.asia-southeast1.firebasedatabase.app</string>
</dict>
</plist>
34 changes: 17 additions & 17 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ packages:
dependency: transitive
description:
name: _flutterfire_internals
sha256: b1595874fbc8f7a50da90f5d8f327bb0bfd6a95dc906c390efe991540c3b54aa
sha256: "9371d13b8ee442e3bfc08a24e3a1b3742c839abbfaf5eef11b79c4b862c89bf7"
url: "https://pub.dev"
source: hosted
version: "1.3.40"
version: "1.3.41"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -85,50 +85,50 @@ packages:
dependency: "direct main"
description:
name: firebase_auth
sha256: "2457ac6cbc152fa464aad3fb35f98039b0c4ab8e9bedf476672508b291bdbc3a"
sha256: "6f5792bdc208416bfdfbfe3363b78ce01667b6ebc4c5cb47cfa891f2fca45ab7"
url: "https://pub.dev"
source: hosted
version: "5.1.4"
version: "5.2.0"
firebase_auth_platform_interface:
dependency: transitive
description:
name: firebase_auth_platform_interface
sha256: "0408e2ed74b1afa0490a93aa041fe90d7573af7ffc59a641edc6c5b5c1b8d2a4"
sha256: "80237bb8a92bb0a5e3b40de1c8dbc80254e49ac9e3907b4b47b8e95ac3dd3fad"
url: "https://pub.dev"
source: hosted
version: "7.4.3"
version: "7.4.4"
firebase_auth_web:
dependency: transitive
description:
name: firebase_auth_web
sha256: "7e0c6d0fa8c5c1b2ae126a78f2d1a206a77a913f78d20f155487bf746162dccc"
sha256: "9d315491a6be65ea83511cb0e078544a309c39dd54c0ee355c51dbd6d8c03cc8"
url: "https://pub.dev"
source: hosted
version: "5.12.5"
version: "5.12.6"
firebase_core:
dependency: "direct main"
description:
name: firebase_core
sha256: "3187f4f8e49968573fd7403011dca67ba95aae419bc0d8131500fae160d94f92"
sha256: "06537da27db981947fa535bb91ca120b4e9cb59cb87278dbdde718558cafc9ff"
url: "https://pub.dev"
source: hosted
version: "3.3.0"
version: "3.4.0"
firebase_core_platform_interface:
dependency: transitive
description:
name: firebase_core_platform_interface
sha256: "3c3a1e92d6f4916c32deea79c4a7587aa0e9dbbe5889c7a16afcf005a485ee02"
sha256: f7d7180c7f99babd4b4c517754d41a09a4943a0f7a69b65c894ca5c68ba66315
url: "https://pub.dev"
source: hosted
version: "5.2.0"
version: "5.2.1"
firebase_core_web:
dependency: transitive
description:
name: firebase_core_web
sha256: e8d1e22de72cb21cdcfc5eed7acddab3e99cd83f3b317f54f7a96c32f25fd11e
sha256: "362e52457ed2b7b180964769c1e04d1e0ea0259fdf7025fdfedd019d4ae2bd88"
url: "https://pub.dev"
source: hosted
version: "2.17.4"
version: "2.17.5"
flutter:
dependency: "direct main"
description: flutter
Expand Down Expand Up @@ -164,10 +164,10 @@ packages:
dependency: "direct main"
description:
name: go_router
sha256: ddc16d34b0d74cb313986918c0f0885a7ba2fc24d8fb8419de75f0015144ccfe
sha256: "2ddb88e9ad56ae15ee144ed10e33886777eb5ca2509a914850a5faa7b52ff459"
url: "https://pub.dev"
source: hosted
version: "14.2.3"
version: "14.2.7"
http_parser:
dependency: transitive
description:
Expand Down Expand Up @@ -359,4 +359,4 @@ packages:
version: "0.5.1"
sdks:
dart: ">=3.4.3 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"
flutter: ">=3.19.0"

0 comments on commit be2cbc5

Please sign in to comment.