diff --git a/android/app/build.gradle b/android/app/build.gradle index d1aaf9ba..9dbf54af 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,5 +1,9 @@ plugins { id "com.android.application" + // START: FlutterFire Configuration + id 'com.google.gms.google-services' + id 'com.google.firebase.crashlytics' + // END: FlutterFire Configuration id "kotlin-android" id "dev.flutter.flutter-gradle-plugin" } @@ -29,8 +33,8 @@ keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) android { compileSdk flutter.compileSdkVersion // TODO: revert if it compiles - // ndkVersion flutter.ndkVersion - ndkVersion "23.1.7779620" + ndkVersion flutter.ndkVersion + // ndkVersion "23.1.7779620" compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 diff --git a/android/app/google-services.json b/android/app/google-services.json new file mode 100644 index 00000000..896456ba --- /dev/null +++ b/android/app/google-services.json @@ -0,0 +1,48 @@ +{ + "project_info": { + "project_number": "155003412918", + "project_id": "project-anni-firebase", + "storage_bucket": "project-anni-firebase.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:155003412918:android:a74c0164cad2e2ac376117", + "android_client_info": { + "package_name": "rs.anni.annix" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyDGdDybX7Nt1dABMJTMNWxYCyya5m0MVqY" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:155003412918:android:a74c0164cad2e2ac376117", + "android_client_info": { + "package_name": "rs.anni.annix.beta" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyDGdDybX7Nt1dABMJTMNWxYCyya5m0MVqY" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} diff --git a/android/settings.gradle b/android/settings.gradle index 745cfa37..c50c9361 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -20,6 +20,8 @@ plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "com.android.application" version '8.4.1' apply false id "org.jetbrains.kotlin.android" version "1.9.22" apply false + id 'com.google.gms.google-services' version '4.4.2' apply false + id 'com.google.firebase.crashlytics' version '3.0.2' apply false } include ":app" \ No newline at end of file diff --git a/firebase.json b/firebase.json new file mode 100644 index 00000000..d9270f9d --- /dev/null +++ b/firebase.json @@ -0,0 +1 @@ +{"flutter":{"platforms":{"android":{"default":{"projectId":"project-anni-firebase","appId":"1:155003412918:android:a74c0164cad2e2ac376117","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"project-anni-firebase","appId":"1:155003412918:ios:015e4bb181171702376117","uploadDebugSymbols":false,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"macos":{"default":{"projectId":"project-anni-firebase","appId":"1:155003412918:ios:997285e685ed1b22376117","uploadDebugSymbols":false,"fileOutput":"macos/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"project-anni-firebase","configurations":{"android":"1:155003412918:android:a74c0164cad2e2ac376117","ios":"1:155003412918:ios:015e4bb181171702376117","macos":"1:155003412918:ios:997285e685ed1b22376117","windows":"1:155003412918:web:0ef56365e8434cd4376117"}}}}}} \ No newline at end of file diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 91283bb9..dc9396fa 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -8,14 +8,148 @@ PODS: - FlutterMacOS - file_picker (0.0.1): - Flutter + - Firebase/Analytics (11.0.0): + - Firebase/Core + - Firebase/Core (11.0.0): + - Firebase/CoreOnly + - FirebaseAnalytics (~> 11.0.0) + - Firebase/CoreOnly (11.0.0): + - FirebaseCore (= 11.0.0) + - Firebase/Crashlytics (11.0.0): + - Firebase/CoreOnly + - FirebaseCrashlytics (~> 11.0.0) + - firebase_analytics (11.3.2): + - Firebase/Analytics (= 11.0.0) + - firebase_core + - Flutter + - firebase_core (3.5.0): + - Firebase/CoreOnly (= 11.0.0) + - Flutter + - firebase_crashlytics (4.1.2): + - Firebase/Crashlytics (= 11.0.0) + - firebase_core + - Flutter + - FirebaseAnalytics (11.0.0): + - FirebaseAnalytics/AdIdSupport (= 11.0.0) + - FirebaseCore (~> 11.0) + - FirebaseInstallations (~> 11.0) + - GoogleUtilities/AppDelegateSwizzler (~> 8.0) + - GoogleUtilities/MethodSwizzler (~> 8.0) + - GoogleUtilities/Network (~> 8.0) + - "GoogleUtilities/NSData+zlib (~> 8.0)" + - nanopb (~> 3.30910.0) + - FirebaseAnalytics/AdIdSupport (11.0.0): + - FirebaseCore (~> 11.0) + - FirebaseInstallations (~> 11.0) + - GoogleAppMeasurement (= 11.0.0) + - GoogleUtilities/AppDelegateSwizzler (~> 8.0) + - GoogleUtilities/MethodSwizzler (~> 8.0) + - GoogleUtilities/Network (~> 8.0) + - "GoogleUtilities/NSData+zlib (~> 8.0)" + - nanopb (~> 3.30910.0) + - FirebaseCore (11.0.0): + - FirebaseCoreInternal (~> 11.0) + - GoogleUtilities/Environment (~> 8.0) + - GoogleUtilities/Logger (~> 8.0) + - FirebaseCoreExtension (11.2.0): + - FirebaseCore (~> 11.0) + - FirebaseCoreInternal (11.2.0): + - "GoogleUtilities/NSData+zlib (~> 8.0)" + - FirebaseCrashlytics (11.0.0): + - FirebaseCore (~> 11.0) + - FirebaseInstallations (~> 11.0) + - FirebaseRemoteConfigInterop (~> 11.0) + - FirebaseSessions (~> 11.0) + - GoogleDataTransport (~> 10.0) + - GoogleUtilities/Environment (~> 8.0) + - nanopb (~> 3.30910.0) + - PromisesObjC (~> 2.4) + - FirebaseInstallations (11.2.0): + - FirebaseCore (~> 11.0) + - GoogleUtilities/Environment (~> 8.0) + - GoogleUtilities/UserDefaults (~> 8.0) + - PromisesObjC (~> 2.4) + - FirebaseRemoteConfigInterop (11.2.0) + - FirebaseSessions (11.2.0): + - FirebaseCore (~> 11.0) + - FirebaseCoreExtension (~> 11.0) + - FirebaseInstallations (~> 11.0) + - GoogleDataTransport (~> 10.0) + - GoogleUtilities/Environment (~> 8.0) + - GoogleUtilities/UserDefaults (~> 8.0) + - nanopb (~> 3.30910.0) + - PromisesSwift (~> 2.1) - Flutter (1.0.0) + - flutter_keyboard_visibility (0.0.1): + - Flutter + - GoogleAppMeasurement (11.0.0): + - GoogleAppMeasurement/AdIdSupport (= 11.0.0) + - GoogleUtilities/AppDelegateSwizzler (~> 8.0) + - GoogleUtilities/MethodSwizzler (~> 8.0) + - GoogleUtilities/Network (~> 8.0) + - "GoogleUtilities/NSData+zlib (~> 8.0)" + - nanopb (~> 3.30910.0) + - GoogleAppMeasurement/AdIdSupport (11.0.0): + - GoogleAppMeasurement/WithoutAdIdSupport (= 11.0.0) + - GoogleUtilities/AppDelegateSwizzler (~> 8.0) + - GoogleUtilities/MethodSwizzler (~> 8.0) + - GoogleUtilities/Network (~> 8.0) + - "GoogleUtilities/NSData+zlib (~> 8.0)" + - nanopb (~> 3.30910.0) + - GoogleAppMeasurement/WithoutAdIdSupport (11.0.0): + - GoogleUtilities/AppDelegateSwizzler (~> 8.0) + - GoogleUtilities/MethodSwizzler (~> 8.0) + - GoogleUtilities/Network (~> 8.0) + - "GoogleUtilities/NSData+zlib (~> 8.0)" + - nanopb (~> 3.30910.0) + - GoogleDataTransport (10.1.0): + - nanopb (~> 3.30910.0) + - PromisesObjC (~> 2.4) + - GoogleUtilities/AppDelegateSwizzler (8.0.2): + - GoogleUtilities/Environment + - GoogleUtilities/Logger + - GoogleUtilities/Network + - GoogleUtilities/Privacy + - GoogleUtilities/Environment (8.0.2): + - GoogleUtilities/Privacy + - GoogleUtilities/Logger (8.0.2): + - GoogleUtilities/Environment + - GoogleUtilities/Privacy + - GoogleUtilities/MethodSwizzler (8.0.2): + - GoogleUtilities/Logger + - GoogleUtilities/Privacy + - GoogleUtilities/Network (8.0.2): + - GoogleUtilities/Logger + - "GoogleUtilities/NSData+zlib" + - GoogleUtilities/Privacy + - GoogleUtilities/Reachability + - "GoogleUtilities/NSData+zlib (8.0.2)": + - GoogleUtilities/Privacy + - GoogleUtilities/Privacy (8.0.2) + - GoogleUtilities/Reachability (8.0.2): + - GoogleUtilities/Logger + - GoogleUtilities/Privacy + - GoogleUtilities/UserDefaults (8.0.2): + - GoogleUtilities/Logger + - GoogleUtilities/Privacy + - nanopb (3.30910.0): + - nanopb/decode (= 3.30910.0) + - nanopb/encode (= 3.30910.0) + - nanopb/decode (3.30910.0) + - nanopb/encode (3.30910.0) - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS + - PromisesObjC (2.4.0) + - PromisesSwift (2.4.0): + - PromisesObjC (= 2.4.0) - rust_lib_annix (0.0.1): - Flutter - share_plus (0.0.1): - Flutter + - sqflite (0.0.3): + - Flutter + - FlutterMacOS - "sqlite3 (3.46.0+1)": - "sqlite3/common (= 3.46.0+1)" - "sqlite3/common (3.46.0+1)" @@ -42,15 +176,35 @@ DEPENDENCIES: - audio_session (from `.symlinks/plugins/audio_session/ios`) - connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`) - file_picker (from `.symlinks/plugins/file_picker/ios`) + - firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`) + - firebase_core (from `.symlinks/plugins/firebase_core/ios`) + - firebase_crashlytics (from `.symlinks/plugins/firebase_crashlytics/ios`) - Flutter (from `Flutter`) + - flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - rust_lib_annix (from `.symlinks/plugins/rust_lib_annix/ios`) - share_plus (from `.symlinks/plugins/share_plus/ios`) + - sqflite (from `.symlinks/plugins/sqflite/darwin`) - sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/ios`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) SPEC REPOS: trunk: + - Firebase + - FirebaseAnalytics + - FirebaseCore + - FirebaseCoreExtension + - FirebaseCoreInternal + - FirebaseCrashlytics + - FirebaseInstallations + - FirebaseRemoteConfigInterop + - FirebaseSessions + - GoogleAppMeasurement + - GoogleDataTransport + - GoogleUtilities + - nanopb + - PromisesObjC + - PromisesSwift - sqlite3 EXTERNAL SOURCES: @@ -62,14 +216,24 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/connectivity_plus/darwin" file_picker: :path: ".symlinks/plugins/file_picker/ios" + firebase_analytics: + :path: ".symlinks/plugins/firebase_analytics/ios" + firebase_core: + :path: ".symlinks/plugins/firebase_core/ios" + firebase_crashlytics: + :path: ".symlinks/plugins/firebase_crashlytics/ios" Flutter: :path: Flutter + flutter_keyboard_visibility: + :path: ".symlinks/plugins/flutter_keyboard_visibility/ios" path_provider_foundation: :path: ".symlinks/plugins/path_provider_foundation/darwin" rust_lib_annix: :path: ".symlinks/plugins/rust_lib_annix/ios" share_plus: :path: ".symlinks/plugins/share_plus/ios" + sqflite: + :path: ".symlinks/plugins/sqflite/darwin" sqlite3_flutter_libs: :path: ".symlinks/plugins/sqlite3_flutter_libs/ios" url_launcher_ios: @@ -80,13 +244,33 @@ SPEC CHECKSUMS: audio_session: 088d2483ebd1dc43f51d253d4a1c517d9a2e7207 connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db file_picker: c79185e70b9b45728cde2a8d8da454e0cb43f287 + Firebase: 9f574c08c2396885b5e7e100ed4293d956218af9 + firebase_analytics: 4fd10182fd08bb8358f26ac8aca8dad7b6d0f592 + firebase_core: 2ec6b789859c7c24766344ec71fdf78639402d56 + firebase_crashlytics: 60630a0f91ee432275fa1660fd8593079761448a + FirebaseAnalytics: 27eb78b97880ea4a004839b9bac0b58880f5a92a + FirebaseCore: 3cf438f431f18c12cdf2aaf64434648b63f7e383 + FirebaseCoreExtension: cda74ddfb001224bd8fd1d6e74698b4ed07803de + FirebaseCoreInternal: 0c569513412da9f3b31bd0b340013bbee8f295c5 + FirebaseCrashlytics: 745d8f0221fe49c62865391d1bf56f5a12eeec0b + FirebaseInstallations: 771177d89d6c451dc6e50085ec82e2fc77ed0a4a + FirebaseRemoteConfigInterop: 477b26fdeb8fb5fbaf22fa9db5343b42289dc7db + FirebaseSessions: adcec8b72d0066a385e3affcd1bcb1ebb3908ce6 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069 + GoogleAppMeasurement: 6e49ffac7d3f2c3ded9cc663f912a13b67bbd0de + GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7 + GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d + nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 + PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 + PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851 rust_lib_annix: 6036557defd8d37cacb5d64de186ed4724533108 share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad + sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec sqlite3: 292c3e1bfe89f64e51ea7fc7dab9182a017c8630 sqlite3_flutter_libs: c00457ebd31e59fa6bb830380ddba24d44fbcd3b - url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 + url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe PODFILE CHECKSUM: 37b372fb31ad5339ef45b5ed71e6f5e2257c62bb diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 6b443004..10cff24a 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + CD29BD00607E79C7842CE932 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9E42743E4C65AE4A0F0FCAB9 /* GoogleService-Info.plist */; }; DDF2F9DCBC938069101C6BAD /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D56321345F875A946175CCBC /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ @@ -49,6 +50,7 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info-Debug.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-Debug.plist"; sourceTree = ""; }; + 9E42743E4C65AE4A0F0FCAB9 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = ""; }; C39A741CB394EE0A876AE4E1 /* 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 = ""; }; D56321345F875A946175CCBC /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F027121827659079008E18C6 /* Info-Release.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info-Release.plist"; sourceTree = ""; }; @@ -97,6 +99,7 @@ 97C146EF1CF9000F007C117D /* Products */, 62D4A03682C7B23115400221 /* Pods */, B0E44C7032A976189A87C2A8 /* Frameworks */, + 9E42743E4C65AE4A0F0FCAB9 /* GoogleService-Info.plist */, ); sourceTree = ""; usesTabs = 0; @@ -158,6 +161,7 @@ 97C146EC1CF9000F007C117D /* Resources */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 19E6797CC1809C006E0F4FD3 /* [CP] Embed Pods Frameworks */, + 8CCE6E0BD32DAEF5386D25B7 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */, ); buildRules = ( ); @@ -233,6 +237,7 @@ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + CD29BD00607E79C7842CE932 /* GoogleService-Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -272,6 +277,24 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; + 8CCE6E0BD32DAEF5386D25B7 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\""; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --platform=ios --apple-project-path=${SRCROOT} --env-platform-name=${PLATFORM_NAME} --env-configuration=${CONFIGURATION} --env-project-dir=${PROJECT_DIR} --env-built-products-dir=${BUILT_PRODUCTS_DIR} --env-dwarf-dsym-folder-path=${DWARF_DSYM_FOLDER_PATH} --env-dwarf-dsym-file-name=${DWARF_DSYM_FILE_NAME} --env-infoplist-path=${INFOPLIST_PATH} --default-config=default\n"; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -347,6 +370,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -412,6 +436,7 @@ INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; INFOPLIST_KEY_CFBundleDisplayName = Annix; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.music"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -430,6 +455,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -490,6 +516,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -557,6 +584,7 @@ INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; INFOPLIST_KEY_CFBundleDisplayName = Annix; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.music"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -588,6 +616,7 @@ INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; INFOPLIST_KEY_CFBundleDisplayName = Annix; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.music"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/ios/Runner/GoogleService-Info.plist b/ios/Runner/GoogleService-Info.plist new file mode 100644 index 00000000..18a7611f --- /dev/null +++ b/ios/Runner/GoogleService-Info.plist @@ -0,0 +1,30 @@ + + + + + API_KEY + AIzaSyBPtL7sXBERbvkfpyzpFsEoVPeTZemEWnA + GCM_SENDER_ID + 155003412918 + PLIST_VERSION + 1 + BUNDLE_ID + rs.anni.annix.debug + PROJECT_ID + project-anni-firebase + STORAGE_BUCKET + project-anni-firebase.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:155003412918:ios:015e4bb181171702376117 + + \ No newline at end of file diff --git a/lib/firebase_options.dart b/lib/firebase_options.dart new file mode 100644 index 00000000..f46d51c0 --- /dev/null +++ b/lib/firebase_options.dart @@ -0,0 +1,82 @@ +// 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: + 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 android = FirebaseOptions( + apiKey: 'AIzaSyDGdDybX7Nt1dABMJTMNWxYCyya5m0MVqY', + appId: '1:155003412918:android:a74c0164cad2e2ac376117', + messagingSenderId: '155003412918', + projectId: 'project-anni-firebase', + storageBucket: 'project-anni-firebase.appspot.com', + ); + + static const FirebaseOptions ios = FirebaseOptions( + apiKey: 'AIzaSyBPtL7sXBERbvkfpyzpFsEoVPeTZemEWnA', + appId: '1:155003412918:ios:015e4bb181171702376117', + messagingSenderId: '155003412918', + projectId: 'project-anni-firebase', + storageBucket: 'project-anni-firebase.appspot.com', + iosBundleId: 'rs.anni.annix.debug', + ); + + static const FirebaseOptions macos = FirebaseOptions( + apiKey: 'AIzaSyBPtL7sXBERbvkfpyzpFsEoVPeTZemEWnA', + appId: '1:155003412918:ios:997285e685ed1b22376117', + messagingSenderId: '155003412918', + projectId: 'project-anni-firebase', + storageBucket: 'project-anni-firebase.appspot.com', + iosBundleId: 'rs.anni.annix', + ); + + static const FirebaseOptions windows = FirebaseOptions( + apiKey: 'AIzaSyBvdR-i0SHai-suzw3NhmMz7PEV0YlynpA', + appId: '1:155003412918:web:0ef56365e8434cd4376117', + messagingSenderId: '155003412918', + projectId: 'project-anni-firebase', + authDomain: 'project-anni-firebase.firebaseapp.com', + storageBucket: 'project-anni-firebase.appspot.com', + measurementId: 'G-TCHGH4GL6F', + ); + +} \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 3b261f7f..0a04ec52 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -3,16 +3,42 @@ import 'package:annix/i18n/strings.g.dart'; import 'package:annix/providers.dart'; import 'package:annix/services/logger.dart'; import 'package:annix/services/path.dart'; +import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:annix/native/frb_generated.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:firebase_core/firebase_core.dart'; +import 'package:annix/firebase_options.dart'; Future main() async { - await RustLib.init(); - WidgetsFlutterBinding.ensureInitialized(); + // try to initialize firebase, but don't crash if it fails as linux is not supported + bool firebaseInitialized = false; + try { + await Firebase.initializeApp( + options: DefaultFirebaseOptions.currentPlatform, + ); + firebaseInitialized = true; + } catch (_) {} + FlutterError.onError = (final details) { + if (firebaseInitialized) { + // Pass all uncaught "fatal" errors from the framework to Crashlytics + FirebaseCrashlytics.instance.recordFlutterFatalError(details); + } + + Logger.error( + 'Flutter error', + className: details.library, + exception: details.exception, + stacktrace: details.stack, + ); + + FlutterError.presentError(details); + }; + + await RustLib.init(); await PathService.init(); // logger requires path service, and is required by all other services Logger.init(); @@ -25,16 +51,6 @@ Future main() async { LocaleSettings.useDeviceLocale(); - FlutterError.onError = (final details) { - Logger.error( - 'Flutter error', - className: details.library, - exception: details.exception, - stacktrace: details.stack, - ); - - FlutterError.presentError(details); - }; PlatformDispatcher.instance.onError = (final error, final stack) { Logger.error('Root isolate error', exception: error, stacktrace: stack); return true; diff --git a/lib/services/logger.dart b/lib/services/logger.dart index 0c9ac4fb..9245aa73 100644 --- a/lib/services/logger.dart +++ b/lib/services/logger.dart @@ -3,8 +3,11 @@ import 'package:annix/services/path.dart'; import 'package:flutter/foundation.dart'; class Logger { + static bool initialized = false; + static void init() { initLogger(path: logPath()); + initialized = true; } static void error( @@ -81,13 +84,15 @@ class Logger { } } - logNative( - level: level, - message: message, - file: className, - module: methodName, - exception: exception.toString(), - stacktace: stacktrace.toString(), - ); + if (initialized) { + logNative( + level: level, + message: message, + file: className, + module: methodName, + exception: exception.toString(), + stacktace: stacktrace.toString(), + ); + } } } diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index ea264ac1..6baa06b1 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -8,6 +8,9 @@ import Foundation import audio_service import audio_session import connectivity_plus +import firebase_analytics +import firebase_core +import firebase_crashlytics import path_provider_foundation import share_plus import sqflite @@ -18,6 +21,9 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { AudioServicePlugin.register(with: registry.registrar(forPlugin: "AudioServicePlugin")) AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin")) ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin")) + FLTFirebaseAnalyticsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAnalyticsPlugin")) + FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) + FLTFirebaseCrashlyticsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCrashlyticsPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 75e03c5b..92e2e0e4 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -21,6 +21,7 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ + 05C845F86F479DF34D1A7180 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 90DE7474BFCAD6A6916F26B9 /* GoogleService-Info.plist */; }; 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; @@ -86,6 +87,7 @@ 69865596C3E7F40A99E8B706 /* 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 = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; 7B70645B30ED9D08AE6AC747 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 90DE7474BFCAD6A6916F26B9 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; F06F68312765FD4F00494820 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; F0FE9B442987E5FB006DEF0A /* annix-native.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "annix-native.xcodeproj"; path = "../../annix/annix-native.xcodeproj"; sourceTree = ""; }; @@ -122,6 +124,7 @@ 33CC10EE2044A3C60003C045 /* Products */, D73912EC22F37F3D000D13A0 /* Frameworks */, 493EB9C89E900875928C2410 /* Pods */, + 90DE7474BFCAD6A6916F26B9 /* GoogleService-Info.plist */, ); sourceTree = ""; }; @@ -211,6 +214,7 @@ 33CC110E2044A8840003C045 /* Bundle Framework */, 3399D490228B24CF009A79C7 /* ShellScript */, 05078C6300455887C852D925 /* [CP] Embed Pods Frameworks */, + 5019320FE447B7288354242B /* FlutterFire: "flutterfire upload-crashlytics-symbols" */, ); buildRules = ( ); @@ -297,6 +301,7 @@ files = ( 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + 05C845F86F479DF34D1A7180 /* GoogleService-Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -358,6 +363,24 @@ shellPath = /bin/sh; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire\n"; }; + 5019320FE447B7288354242B /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\""; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --platform=macos --apple-project-path=${SRCROOT} --env-platform-name=${PLATFORM_NAME} --env-configuration=${CONFIGURATION} --env-project-dir=${PROJECT_DIR} --env-built-products-dir=${BUILT_PRODUCTS_DIR} --env-dwarf-dsym-folder-path=${DWARF_DSYM_FOLDER_PATH} --env-dwarf-dsym-file-name=${DWARF_DSYM_FILE_NAME} --env-infoplist-path=${INFOPLIST_PATH} --default-config=default\n"; + }; E86FFA24825C457293DE6238 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/macos/Runner/GoogleService-Info.plist b/macos/Runner/GoogleService-Info.plist new file mode 100644 index 00000000..c49bd062 --- /dev/null +++ b/macos/Runner/GoogleService-Info.plist @@ -0,0 +1,30 @@ + + + + + API_KEY + AIzaSyBPtL7sXBERbvkfpyzpFsEoVPeTZemEWnA + GCM_SENDER_ID + 155003412918 + PLIST_VERSION + 1 + BUNDLE_ID + rs.anni.annix + PROJECT_ID + project-anni-firebase + STORAGE_BUCKET + project-anni-firebase.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:155003412918:ios:997285e685ed1b22376117 + + \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index 0b116002..5931e282 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -9,6 +9,14 @@ packages: url: "https://pub.dev" source: hosted version: "73.0.0" + _flutterfire_internals: + dependency: transitive + description: + name: _flutterfire_internals + sha256: "5fdcea390499dd26c808a3c662df5f4208d6bbc0643072eee94f1476249e2818" + url: "https://pub.dev" + source: hosted + version: "1.3.43" _macros: dependency: transitive description: dart @@ -478,6 +486,30 @@ packages: url: "https://pub.dev" source: hosted version: "8.1.2" + firebase_analytics: + dependency: "direct main" + description: + name: firebase_analytics + sha256: "9c52c099e9cbb852c7f1d2302c7eb34a15758834eca1877f7a779e6082f9882d" + url: "https://pub.dev" + source: hosted + version: "11.3.2" + firebase_analytics_platform_interface: + dependency: transitive + description: + name: firebase_analytics_platform_interface + sha256: "4ec57aee951832fdbf10ca722bbb83fe0001d6168d6c4cfea9ccee0df6afb1e0" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + firebase_analytics_web: + dependency: transitive + description: + name: firebase_analytics_web + sha256: "95c594fb1e8960992a607b135459e2f9ea3683dd8d01e6b845cace7c6665ec7e" + url: "https://pub.dev" + source: hosted + version: "0.5.10+1" firebase_core: dependency: "direct main" description: @@ -502,6 +534,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.18.1" + firebase_crashlytics: + dependency: "direct main" + description: + name: firebase_crashlytics + sha256: "7821f9d8373b91f2a5ca8214226891d5870e196a7376f66350f65204387e9c15" + url: "https://pub.dev" + source: hosted + version: "4.1.2" + firebase_crashlytics_platform_interface: + dependency: transitive + description: + name: firebase_crashlytics_platform_interface + sha256: "8ed539fd9e9b6c07905f9f44c5f6d4785ac841a5a8195bd35586c8b1d54ec26d" + url: "https://pub.dev" + source: hosted + version: "3.6.43" fixnum: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index ebce8b2f..31a9f19e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -90,6 +90,8 @@ dependencies: path: rust_builder firebase_core: ^3.5.0 + firebase_crashlytics: ^4.1.2 + firebase_analytics: ^11.3.2 dev_dependencies: flutter_lints: ^2.0.2 diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index c5e95fb1..f076417c 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -7,6 +7,7 @@ #include "generated_plugin_registrant.h" #include +#include #include #include #include @@ -14,6 +15,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { ConnectivityPlusWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); + FirebaseCorePluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); SharePlusWindowsPluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); Sqlite3FlutterLibsPluginRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 8fca6e58..266ad3eb 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -4,6 +4,7 @@ list(APPEND FLUTTER_PLUGIN_LIST connectivity_plus + firebase_core share_plus sqlite3_flutter_libs url_launcher_windows