Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase Crashlytics を導入 #193

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/mottai_flutter_app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

apply plugin: 'com.google.firebase.crashlytics'

task copySources(type: Copy) {
from "src/$flavor/res"
into 'src/main/res'
Expand Down
1 change: 1 addition & 0 deletions packages/mottai_flutter_app/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ buildscript {
classpath 'com.google.gms:google-services:4.3.10'
// END: FlutterFire Configuration
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
}
}

Expand Down
41 changes: 38 additions & 3 deletions packages/mottai_flutter_app/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ PODS:
- FirebaseAuth (~> 10.12.0)
- Firebase/CoreOnly (10.12.0):
- FirebaseCore (= 10.12.0)
- Firebase/Crashlytics (10.12.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 10.12.0)
- Firebase/DynamicLinks (10.12.0):
- Firebase/CoreOnly
- FirebaseDynamicLinks (~> 10.12.0)
Expand All @@ -40,9 +43,13 @@ PODS:
- Firebase/Auth (= 10.12.0)
- firebase_core
- Flutter
- firebase_core (2.15.0):
- firebase_core (2.15.1):
- Firebase/CoreOnly (= 10.12.0)
- Flutter
- firebase_crashlytics (3.3.5):
- Firebase/Crashlytics (= 10.12.0)
- firebase_core
- Flutter
- firebase_dynamic_links (5.3.4):
- Firebase/DynamicLinks (= 10.12.0)
- firebase_core
Expand Down Expand Up @@ -71,6 +78,14 @@ PODS:
- FirebaseCore (~> 10.0)
- FirebaseCoreInternal (10.14.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- FirebaseCrashlytics (10.12.0):
- FirebaseCore (~> 10.5)
- FirebaseInstallations (~> 10.0)
- FirebaseSessions (~> 10.5)
- GoogleDataTransport (~> 9.2)
- GoogleUtilities/Environment (~> 7.8)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (~> 2.1)
- FirebaseDynamicLinks (10.12.0):
- FirebaseCore (~> 10.0)
- FirebaseFirestore (10.12.0):
Expand Down Expand Up @@ -104,6 +119,14 @@ PODS:
- GoogleUtilities/UserDefaults (~> 7.8)
- nanopb (< 2.30910.0, >= 2.30908.0)
- FirebaseMessagingInterop (10.14.0)
- FirebaseSessions (10.15.0):
- FirebaseCore (~> 10.5)
- FirebaseCoreExtension (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleDataTransport (~> 9.2)
- GoogleUtilities/Environment (~> 7.10)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesSwift (~> 2.1)
- FirebaseSharedSwift (10.14.0)
- FirebaseStorage (10.12.0):
- FirebaseAppCheckInterop (~> 10.0)
Expand Down Expand Up @@ -200,6 +223,8 @@ PODS:
- permission_handler_apple (9.1.1):
- Flutter
- PromisesObjC (2.3.1)
- PromisesSwift (2.3.1):
- PromisesObjC (= 2.3.1)
- SDWebImage (5.17.0):
- SDWebImage/Core (= 5.17.0)
- SDWebImage/Core (5.17.0)
Expand All @@ -220,6 +245,7 @@ DEPENDENCIES:
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_crashlytics (from `.symlinks/plugins/firebase_crashlytics/ios`)
- firebase_dynamic_links (from `.symlinks/plugins/firebase_dynamic_links/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- firebase_storage (from `.symlinks/plugins/firebase_storage/ios`)
Expand Down Expand Up @@ -249,11 +275,13 @@ SPEC REPOS:
- FirebaseCore
- FirebaseCoreExtension
- FirebaseCoreInternal
- FirebaseCrashlytics
- FirebaseDynamicLinks
- FirebaseFunctions
- FirebaseInstallations
- FirebaseMessaging
- FirebaseMessagingInterop
- FirebaseSessions
- FirebaseSharedSwift
- FirebaseStorage
- FMDB
Expand All @@ -268,6 +296,7 @@ SPEC REPOS:
- Mantle
- nanopb
- PromisesObjC
- PromisesSwift
- SDWebImage
- SDWebImageWebPCoder

Expand All @@ -282,6 +311,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/firebase_auth/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
firebase_crashlytics:
:path: ".symlinks/plugins/firebase_crashlytics/ios"
firebase_dynamic_links:
:path: ".symlinks/plugins/firebase_dynamic_links/ios"
firebase_messaging:
Expand Down Expand Up @@ -332,7 +363,8 @@ SPEC CHECKSUMS:
device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea
Firebase: 07150e75d142fb9399f6777fa56a187b17f833a0
firebase_auth: 3f7820b22557dd4a1b024f4d86947d1a0ff8a10f
firebase_core: e477125798fc37cd4ab43ca6a8536bf7e0929c00
firebase_core: 4a3246a02f828a01c74a2c26427037786d90f17f
firebase_crashlytics: df144edf7d04ace42beb3a3e29d825bfa49dd04b
firebase_dynamic_links: d85cf455646322fd101c8a5a5942c3d47132fe80
firebase_messaging: 334d68c3a36b6d4d5cd91e4f42509e0d4ae49828
firebase_storage: d5c1b95383db1230d9fed88c76cb257d8d1ec1d6
Expand All @@ -342,12 +374,14 @@ SPEC CHECKSUMS:
FirebaseCore: f86a1394906b97ac445ae49c92552a9425831bed
FirebaseCoreExtension: 976638051b1a46b503afce7ec80277f9161f2040
FirebaseCoreInternal: d558159ee6cc4b823c2296ecc193de9f6d9a5bb3
FirebaseCrashlytics: c4d111b7430c49744c74bcc6346ea00868661ac8
FirebaseDynamicLinks: 1a387da899779e5ef34f4d6f8bdba882f90d0e67
FirebaseFirestore: 8d9dd05bb50e0891ebe4fdd9bd0f9b9d22ea5556
FirebaseFunctions: d49c7920b289d85029882927e4056ad04a906e19
FirebaseInstallations: f672b1eda64e6381c21d424a2f680a943fd83f3b
FirebaseMessaging: bb2c4f6422a753038fe137d90ae7c1af57251316
FirebaseMessagingInterop: 5f5ed52481b3956190bf9df2c231d1c72ad14f8d
FirebaseSessions: ee59a7811bef4c15f65ef6472f3210faa293f9c8
FirebaseSharedSwift: 0eec812f08b6ec9e03196fc27635739781513028
FirebaseStorage: 1d7ca8c8953fc61ccacaa7c612696b5402968a0d
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
Expand All @@ -373,6 +407,7 @@ SPEC CHECKSUMS:
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
PromisesSwift: 28dca69a9c40779916ac2d6985a0192a5cb4a265
SDWebImage: 750adf017a315a280c60fde706ab1e552a3ae4e9
SDWebImageWebPCoder: af09429398d99d524cae2fe00f6f0f6e491ed102
sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440
Expand All @@ -381,4 +416,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: e5e57377bd5fff00d6d1c5fa3559e4346fd8c03e

COCOAPODS: 1.12.0
COCOAPODS: 1.11.3
26 changes: 25 additions & 1 deletion packages/mottai_flutter_app/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
70FAA376FF7EFD99A114543D /* [CP] Embed Pods Frameworks */,
55206F1CC1D688606CC18F51 /* [CP] Copy Pods Resources */,
B1F8E85414E7294EBE916E10 /* [firebase_crashlytics] Crashlytics Upload Symbols */,
);
buildRules = (
);
Expand All @@ -165,7 +166,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -314,6 +315,29 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
B1F8E85414E7294EBE916E10 /* [firebase_crashlytics] Crashlytics Upload Symbols */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}\"",
"\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/\"",
"\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"",
"\"$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)\"",
"\"$(PROJECT_DIR)/firebase_app_id_file.json\"",
);
name = "[firebase_crashlytics] Crashlytics Upload Symbols";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"$PODS_ROOT/FirebaseCrashlytics/upload-symbols\" --flutter-project \"$PROJECT_DIR/firebase_app_id_file.json\" ";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import 'package:auto_route/auto_route.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/material.dart';

@RoutePage()
class CrashlyticsPage extends StatelessWidget {
const CrashlyticsPage({super.key});

/// [AutoRoute] で指定するパス文字列。
static const path = '/crashlyticsTest';

/// [CrashlyticsPage] に遷移する際に `context.router.pushNamed` で指定する文字列。
static const location = path;

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: Center(
child: ElevatedButton(
onPressed: () {
FirebaseCrashlytics.instance.crash();
},
child: const Text('クラッシュさせてみる'),
),
),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import '../../../job/ui/job_update.dart';
import '../../../map/ui/map.dart';
import '../../../worker/ui/worker.dart';
import '../../color/ui/color.dart';
import '../../crashlytics/ui/crashlytics.dart';
import '../../firebase_messaging/ui/firebase_messaging.dart';
import '../../firebase_storage/ui/firebase_storage.dart';
import '../../force_update/ui/force_update.dart';
Expand Down Expand Up @@ -91,9 +92,7 @@ class DevelopmentItemsPage extends ConsumerWidget {
await context.router.pushNamed(
ChatRoomPage.location(chatRoomId: chatRoomId),
);
await ref
.read(readStatusServiceProvider)
.setReadStatus(chatRoomId: chatRoomId, userId: userId);
await ref.read(readStatusServiceProvider).setReadStatus(chatRoomId: chatRoomId, userId: userId);
},
);
},
Expand Down Expand Up @@ -148,18 +147,15 @@ class DevelopmentItemsPage extends ConsumerWidget {
),
ListTile(
title: const Text('画像選択・圧縮(1 枚 or 複数)'),
onTap: () =>
context.router.pushNamed(ImagePickerSamplePage.location),
onTap: () => context.router.pushNamed(ImagePickerSamplePage.location),
),
ListTile(
title: const Text('画像アップロード'),
onTap: () =>
context.router.pushNamed(FirebaseStorageSamplePage.location),
onTap: () => context.router.pushNamed(FirebaseStorageSamplePage.location),
),
ListTile(
title: const Text('強制アップデート'),
onTap: () =>
context.router.pushNamed(ForceUpdateSamplePage.location),
onTap: () => context.router.pushNamed(ForceUpdateSamplePage.location),
),
ListTile(
title: const Text('レビュー中かどうか'),
Expand All @@ -171,8 +167,7 @@ class DevelopmentItemsPage extends ConsumerWidget {
),
ListTile(
title: const Text('ソーシャル認証連携 (Google, Apple)'),
onTap: () =>
context.router.pushNamed(UserSocialLoginSamplePage.location),
onTap: () => context.router.pushNamed(UserSocialLoginSamplePage.location),
),
ListTile(
title: const Text('UserFcmToken 確認ページ'),
Expand All @@ -182,8 +177,7 @@ class DevelopmentItemsPage extends ConsumerWidget {
title: const Text(
'通知 (firebase_messaging, local_notification, dynamic_links)',
),
onTap: () =>
context.router.pushNamed(FirebaseMessagingPage.location),
onTap: () => context.router.pushNamed(FirebaseMessagingPage.location),
),
ListTile(
title: const Text('汎用画像ウィジェット'),
Expand All @@ -193,8 +187,7 @@ class DevelopmentItemsPage extends ConsumerWidget {
title: const Text(
'画像の詳細拡大画面サンプル',
),
onTap: () =>
context.router.pushNamed(ImageDetailViewStubPage.location),
onTap: () => context.router.pushNamed(ImageDetailViewStubPage.location),
),
ListTile(
title: const Text(
Expand Down Expand Up @@ -244,6 +237,12 @@ class DevelopmentItemsPage extends ConsumerWidget {
),
),
),
ListTile(
title: const Text(
'Crashlytics のテスト',
),
onTap: () => context.router.pushNamed(CrashlyticsPage.location),
),
],
),
);
Expand Down
Loading