Skip to content

Commit

Permalink
Add first working draft of Crashlytics
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobkoerber committed Dec 7, 2023
1 parent d6d6e2f commit a061b36
Show file tree
Hide file tree
Showing 14 changed files with 383 additions and 37 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ protoc --dart_out=grpc:lib/base/networking/apis -I./protos google/protobuf/times

To ensure that Campus-Flutter runs on every supported platform, we need to make some modifications to packages.

| Package | Reason | Link |
|-------------------------|------------------------------------------|----------------------------------------------|
| gRPC | Caching | https://github.com/jakobkoerber/grpc-dart |
| Google Maps Flutter iOS | Enable usage of SDK in ARM iOS Siulators | https://github.com/jakobkoerber/packages |
| Xml2Json | Fix Parsing of XML to JSON | https://github.com/jakobkoerber/xml2json |
| Package | Reason | Link |
|-------------------------|-------------------------------------------|----------------------------------------------|
| gRPC | Caching | https://github.com/jakobkoerber/grpc-dart |
| Google Maps Flutter iOS | Enable usage of SDK in ARM iOS Simulators | https://github.com/jakobkoerber/packages |
| Xml2Json | Fix Parsing of XML to JSON | https://github.com/jakobkoerber/xml2json |



4 changes: 4 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ if (flutterVersionName == null) {
}

apply plugin: 'com.android.application'
// START: FlutterFire Configuration
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
// END: FlutterFire Configuration
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

Expand Down
29 changes: 29 additions & 0 deletions android/app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "37463514185",
"project_id": "tum-campus-app-test",
"storage_bucket": "tum-campus-app-test.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:37463514185:android:95c93d35f8e62cfd0f3398",
"android_client_info": {
"package_name": "de.tum.tca_flutter"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyCLk6HAS9VnZ5M6lQvMAZrfKjrPwihPC-g"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}
4 changes: 4 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ buildscript {

dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
// START: FlutterFire Configuration
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
// END: FlutterFire Configuration
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
96 changes: 94 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,47 @@ PODS:
- ReachabilitySwift
- device_info_plus (0.0.1):
- Flutter
- Firebase/CoreOnly (10.18.0):
- FirebaseCore (= 10.18.0)
- Firebase/Crashlytics (10.18.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 10.18.0)
- firebase_core (2.24.0):
- Firebase/CoreOnly (= 10.18.0)
- Flutter
- firebase_crashlytics (3.4.6):
- Firebase/Crashlytics (= 10.18.0)
- firebase_core
- Flutter
- FirebaseCore (10.18.0):
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.12)
- GoogleUtilities/Logger (~> 7.12)
- FirebaseCoreExtension (10.19.0):
- FirebaseCore (~> 10.0)
- FirebaseCoreInternal (10.18.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- FirebaseCrashlytics (10.18.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)
- FirebaseInstallations (10.18.0):
- FirebaseCore (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- PromisesObjC (~> 2.1)
- FirebaseSessions (10.19.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)
- Flutter (1.0.0)
- flutter_native_splash (0.0.1):
- Flutter
Expand All @@ -16,19 +57,38 @@ PODS:
- Flutter
- google_maps_flutter_ios (0.0.1):
- Flutter
- GoogleMaps (> 8.0)
- GoogleMaps (< 9.0)
- GoogleDataTransport (9.3.0):
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- GoogleMaps (8.3.0):
- GoogleMaps/Maps (= 8.3.0)
- GoogleMaps/Base (8.3.0)
- GoogleMaps/Maps (8.3.0):
- GoogleMaps/Base
- GoogleUtilities/Environment (7.12.0):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.12.0):
- GoogleUtilities/Environment
- "GoogleUtilities/NSData+zlib (7.12.0)"
- GoogleUtilities/UserDefaults (7.12.0):
- GoogleUtilities/Logger
- map_launcher (0.0.1):
- Flutter
- nanopb (2.30909.1):
- nanopb/decode (= 2.30909.1)
- nanopb/encode (= 2.30909.1)
- nanopb/decode (2.30909.1)
- nanopb/encode (2.30909.1)
- package_info_plus (0.4.5):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- PromisesObjC (2.3.1)
- PromisesSwift (2.3.1):
- PromisesObjC (= 2.3.1)
- ReachabilitySwift (5.0.0)
- shared_preferences_foundation (0.0.1):
- Flutter
Expand Down Expand Up @@ -67,6 +127,8 @@ PODS:
DEPENDENCIES:
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_crashlytics (from `.symlinks/plugins/firebase_crashlytics/ios`)
- Flutter (from `Flutter`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
Expand All @@ -83,8 +145,20 @@ DEPENDENCIES:

SPEC REPOS:
trunk:
- Firebase
- FirebaseCore
- FirebaseCoreExtension
- FirebaseCoreInternal
- FirebaseCrashlytics
- FirebaseInstallations
- FirebaseSessions
- FMDB
- GoogleDataTransport
- GoogleMaps
- GoogleUtilities
- nanopb
- PromisesObjC
- PromisesSwift
- ReachabilitySwift
- TensorFlowLiteC
- TensorFlowLiteSwift
Expand All @@ -94,6 +168,10 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/connectivity_plus/ios"
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
firebase_crashlytics:
:path: ".symlinks/plugins/firebase_crashlytics/ios"
Flutter:
:path: Flutter
flutter_native_splash:
Expand Down Expand Up @@ -124,16 +202,30 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
Firebase: 414ad272f8d02dfbf12662a9d43f4bba9bec2a06
firebase_core: f802c5c1f6caff9b8d38b591a36e7b25f8878936
firebase_crashlytics: 0db78a5b6badc630f21a833d0c9ab20ab5d81948
FirebaseCore: 2322423314d92f946219c8791674d2f3345b598f
FirebaseCoreExtension: c08d14c7b22e07994e876d837e6f58642f340087
FirebaseCoreInternal: 8eb002e564b533bdcf1ba011f33f2b5c10e2ed4a
FirebaseCrashlytics: 86d5bce01f42fa1db265f87ff1d591f04db610ec
FirebaseInstallations: e842042ec6ac1fd2e37d7706363ebe7f662afea4
FirebaseSessions: e5f4caa188dc8bc6142abc974355be75b042215e
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401
google_maps_flutter_ios: 0d3ed43aa0a264a87f614b9f92729026c56947ef
google_maps_flutter_ios: a831c6f6a127f58333ec7654217c067f02cb5da9
GoogleDataTransport: 57c22343ab29bc686febbf7cbb13bad167c2d8fe
GoogleMaps: 54762190c9741867d03e4e4218672ab5a0a8096b
GoogleUtilities: 0759d1a57ebb953965c2dfe0ba4c82e95ccc2e34
map_launcher: e325db1261d029ff33e08e03baccffe09593ffea
nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
PromisesSwift: 28dca69a9c40779916ac2d6985a0192a5cb4a265
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
Expand Down
46 changes: 46 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
2817D9442B20F31E00ACB7B9 /* firebase_app_id_file.json in Resources */ = {isa = PBXBuildFile; fileRef = 2817D9432B20F31E00ACB7B9 /* firebase_app_id_file.json */; };
2817D9462B21299500ACB7B9 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2817D9452B21299500ACB7B9 /* GoogleService-Info.plist */; };
28E2CD692AAF62A50086E2B0 /* GoogleMaps.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 28E2CD682AAF62A50086E2B0 /* GoogleMaps.bundle */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
Expand All @@ -34,6 +36,8 @@
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>"; };
25B8373D2186E81784BFE72E /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
2817D9432B20F31E00ACB7B9 /* firebase_app_id_file.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = firebase_app_id_file.json; sourceTree = SOURCE_ROOT; };
2817D9452B21299500ACB7B9 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = SOURCE_ROOT; };
28C9AFB1C4C5E6CF8F927C7E /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
28CBEFE12ACB1A25002DCDEC /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
28E2CD682AAF62A50086E2B0 /* GoogleMaps.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = GoogleMaps.bundle; sourceTree = "<group>"; };
Expand Down Expand Up @@ -108,6 +112,8 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
2817D9452B21299500ACB7B9 /* GoogleService-Info.plist */,
2817D9432B20F31E00ACB7B9 /* firebase_app_id_file.json */,
28CBEFE12ACB1A25002DCDEC /* Runner.entitlements */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
Expand Down Expand Up @@ -137,6 +143,7 @@
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
73FE2B1E75F536B08A1CD21D /* [CP] Check Pods Manifest.lock */,
2812AFD02B21E4E400306CC7 /* [Crashlytics] Clear dSYM */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
Expand All @@ -145,6 +152,7 @@
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
55BF757094FC56328E425673 /* [CP] Embed Pods Frameworks */,
DFB152C87E79B8D526A08EA7 /* [CP] Copy Pods Resources */,
2812AFD12B21E52F00306CC7 /* [Crashlytics] Upload dSYM */,
);
buildRules = (
);
Expand Down Expand Up @@ -196,14 +204,52 @@
28E2CD692AAF62A50086E2B0 /* GoogleMaps.bundle in Resources */,
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
2817D9442B20F31E00ACB7B9 /* firebase_app_id_file.json in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
2817D9462B21299500ACB7B9 /* GoogleService-Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
2812AFD02B21E4E400306CC7 /* [Crashlytics] Clear dSYM */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "[Crashlytics] Clear dSYM";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nrm -rf $DWARF_DSYM_FOLDER_PATH/$DWARF_DSYM_FILE_NAME\n";
};
2812AFD12B21E52F00306CC7 /* [Crashlytics] Upload dSYM */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "[Crashlytics] Upload dSYM";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nsleep 1 # Without this, there seems a chance that the script runs before dSYM generation is finished \n$PODS_ROOT/FirebaseCrashlytics/upload-symbols -gsp $PROJECT_DIR/Runner/GoogleService-Info.plist -p ios $DWARF_DSYM_FOLDER_PATH/$DWARF_DSYM_FILE_NAME\n";
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
Expand Down
30 changes: 30 additions & 0 deletions ios/Runner/GoogleService-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?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>AIzaSyAoZH1Kk11jRrvzzKgncc3vYoA6UOGhUyA</string>
<key>GCM_SENDER_ID</key>
<string>37463514185</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>de.tum.tca-flutter</string>
<key>PROJECT_ID</key>
<string>tum-campus-app-test</string>
<key>STORAGE_BUCKET</key>
<string>tum-campus-app-test.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:37463514185:ios:24e365da3f11ea9c0f3398</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/build/.last_build_id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4988aa35441b901c4e8c4b76a3fe883f
a519a7d998a5edb95fe7f5ad83a79eac
7 changes: 7 additions & 0 deletions ios/firebase_app_id_file.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"file_generated_by": "FlutterFire CLI",
"purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory",
"GOOGLE_APP_ID": "1:37463514185:ios:24e365da3f11ea9c0f3398",
"FIREBASE_PROJECT_ID": "tum-campus-app-test",
"GCM_SENDER_ID": "37463514185"
}
Loading

0 comments on commit a061b36

Please sign in to comment.