Skip to content

Commit

Permalink
feat :: firebase 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
withJihyuk committed Jan 10, 2025
1 parent aa66d8f commit f25a0ed
Show file tree
Hide file tree
Showing 10 changed files with 329 additions and 0 deletions.
3 changes: 3 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
166 changes: 166 additions & 0 deletions android/app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
{
"project_info": {
"project_number": "292349774898",
"project_id": "mayo-app-280d4",
"storage_bucket": "mayo-app-280d4.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:292349774898:android:65f9207b0adfa97efbc02b",
"android_client_info": {
"package_name": "com.mayo.flutter.user"
}
},
"oauth_client": [
{
"client_id": "292349774898-ek0h49c6l0ulvt39g507v84vhah4dsql.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBLaZwZ9Bm3J3Zr7cwOoY7UOy6F1xCXpAk"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "292349774898-ek0h49c6l0ulvt39g507v84vhah4dsql.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "292349774898-14kug5hr8fr84kt44e36b61q4ddvlkv6.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.example.mayoFlutter"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:292349774898:android:82a124d6d577728cfbc02b",
"android_client_info": {
"package_name": "com.mayo.mayoapp"
}
},
"oauth_client": [
{
"client_id": "292349774898-21rdegphp613mokklskps4o538jnq4cu.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.mayo.mayoapp",
"certificate_hash": "9bbb3186b2189ef16d8f272bdab59362c395cbb4"
}
},
{
"client_id": "292349774898-2lc18vo3nbm3143kr3spq70heba7sif7.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.mayo.mayoapp",
"certificate_hash": "ba3ff220403594d3c6fc8647c9651b0c34e14fe2"
}
},
{
"client_id": "292349774898-6138qqe5knf19cleh9778b2r7vaqrrg0.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.mayo.mayoapp",
"certificate_hash": "635ceb0949ca1761a30553d1065e1ad7e64a43ae"
}
},
{
"client_id": "292349774898-6m7gptim2j0p37r80ok4ihp5s3n6i1e1.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.mayo.mayoapp",
"certificate_hash": "ed154e3f77eddc55e35800002276efd8eeb6ba82"
}
},
{
"client_id": "292349774898-j1vk607v91uv7hog43t0nkovvk7eeipv.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.mayo.mayoapp",
"certificate_hash": "f23b371a817d37b3b9fbfd040def14a5206d9ab8"
}
},
{
"client_id": "292349774898-sshpko1r5qhf65g362f576j72pj2eurp.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.mayo.mayoapp",
"certificate_hash": "6ac4a17c273b50c57dd79301d6b71b26a1a8e213"
}
},
{
"client_id": "292349774898-ek0h49c6l0ulvt39g507v84vhah4dsql.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBLaZwZ9Bm3J3Zr7cwOoY7UOy6F1xCXpAk"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "292349774898-ek0h49c6l0ulvt39g507v84vhah4dsql.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "292349774898-14kug5hr8fr84kt44e36b61q4ddvlkv6.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.example.mayoFlutter"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:292349774898:android:227686fe24ecb2a7fbc02b",
"android_client_info": {
"package_name": "com.mayo.user.flutter"
}
},
"oauth_client": [
{
"client_id": "292349774898-ek0h49c6l0ulvt39g507v84vhah4dsql.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBLaZwZ9Bm3J3Zr7cwOoY7UOy6F1xCXpAk"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "292349774898-ek0h49c6l0ulvt39g507v84vhah4dsql.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "292349774898-14kug5hr8fr84kt44e36b61q4ddvlkv6.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.example.mayoFlutter"
}
}
]
}
}
}
],
"configuration_version": "1"
}
3 changes: 3 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ pluginManagement {
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.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
}

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":"mayo-app-280d4","appId":"1:292349774898:android:227686fe24ecb2a7fbc02b","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"mayo-app-280d4","appId":"1:292349774898:ios:8665d768d9818f19fbc02b","uploadDebugSymbols":false,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"mayo-app-280d4","configurations":{"android":"1:292349774898:android:227686fe24ecb2a7fbc02b","ios":"1:292349774898:ios:8665d768d9818f19fbc02b"}}}}}}
1 change: 1 addition & 0 deletions ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
1 change: 1 addition & 0 deletions ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
44 changes: 44 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
4 changes: 4 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
144B50344491E52C6D96E145 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2503BD37944B4B437B917641 /* GoogleService-Info.plist */; };
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
Expand Down Expand Up @@ -42,6 +43,7 @@
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
2503BD37944B4B437B917641 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = "<group>"; };
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
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 = "<group>"; };
Expand Down Expand Up @@ -94,6 +96,7 @@
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
331C8082294A63A400263BE5 /* RunnerTests */,
2503BD37944B4B437B917641 /* 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 */,
144B50344491E52C6D96E145 /* GoogleService-Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
36 changes: 36 additions & 0 deletions ios/Runner/GoogleService-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?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>CLIENT_ID</key>
<string>292349774898-14kug5hr8fr84kt44e36b61q4ddvlkv6.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.292349774898-14kug5hr8fr84kt44e36b61q4ddvlkv6</string>
<key>ANDROID_CLIENT_ID</key>
<string>292349774898-21rdegphp613mokklskps4o538jnq4cu.apps.googleusercontent.com</string>
<key>API_KEY</key>
<string>AIzaSyCRtqcvOjs7bfttAy6h0QMB0AkhXfu7r7A</string>
<key>GCM_SENDER_ID</key>
<string>292349774898</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.example.mayoFlutter</string>
<key>PROJECT_ID</key>
<string>mayo-app-280d4</string>
<key>STORAGE_BUCKET</key>
<string>mayo-app-280d4.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:292349774898:ios:8665d768d9818f19fbc02b</string>
</dict>
</plist>
70 changes: 70 additions & 0 deletions lib/firebase_options.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// 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: 'AIzaSyBLaZwZ9Bm3J3Zr7cwOoY7UOy6F1xCXpAk',
appId: '1:292349774898:android:227686fe24ecb2a7fbc02b',
messagingSenderId: '292349774898',
projectId: 'mayo-app-280d4',
storageBucket: 'mayo-app-280d4.appspot.com',
);

static const FirebaseOptions ios = FirebaseOptions(
apiKey: 'AIzaSyCRtqcvOjs7bfttAy6h0QMB0AkhXfu7r7A',
appId: '1:292349774898:ios:8665d768d9818f19fbc02b',
messagingSenderId: '292349774898',
projectId: 'mayo-app-280d4',
storageBucket: 'mayo-app-280d4.appspot.com',
androidClientId: '292349774898-21rdegphp613mokklskps4o538jnq4cu.apps.googleusercontent.com',
iosClientId: '292349774898-14kug5hr8fr84kt44e36b61q4ddvlkv6.apps.googleusercontent.com',
iosBundleId: 'com.example.mayoFlutter',
);
}

0 comments on commit f25a0ed

Please sign in to comment.