修改firebase配置

This commit is contained in:
fengshengxiong 2024-05-31 01:34:37 -07:00
parent af8d93a809
commit 4b6121e15e
7 changed files with 47 additions and 41 deletions

View File

@ -1 +1 @@
{"flutter":{"platforms":{"android":{"default":{"projectId":"nowwallpaper","appId":"1:318284530945:android:c7dd2abf520a9840250700","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"nowwallpaper","appId":"1:318284530945:ios:754fb4ceebd09514250700","uploadDebugSymbols":true,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"nowwallpaper","configurations":{"android":"1:318284530945:android:c7dd2abf520a9840250700","ios":"1:318284530945:ios:754fb4ceebd09514250700"}}}}}}
{"flutter":{"platforms":{"android":{"default":{"projectId":"nowwallpaper","appId":"1:318284530945:android:c7dd2abf520a9840250700","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"nowwallpaper","appId":"1:318284530945:ios:7bacbc490f39d820250700","uploadDebugSymbols":true,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"nowwallpaper","configurations":{"android":"1:318284530945:android:c7dd2abf520a9840250700","ios":"1:318284530945:ios:7bacbc490f39d820250700"}}}}}}

View File

@ -202,7 +202,7 @@
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
39CCEDF39CF579238AE308F0 /* [CP] Embed Pods Frameworks */,
405E88F0300BCE9602B4DA07 /* [CP] Copy Pods Resources */,
A619BA3878CFD24C03A25DF3 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,
456CF4E894A8BC296C35D84E /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,
);
buildRules = (
);
@ -347,6 +347,24 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
456CF4E894A8BC296C35D84E /* 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;
@ -384,24 +402,6 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
A619BA3878CFD24C03A25DF3 /* 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";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@ -511,16 +511,19 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = SXL2QAUF62;
DEVELOPMENT_TEAM = T93S37G27F;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.now.wallpaper;
PRODUCT_BUNDLE_IDENTIFIER = com.lux.now.wallpaper;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
@ -696,16 +699,19 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = SXL2QAUF62;
DEVELOPMENT_TEAM = T93S37G27F;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.now.wallpaper;
PRODUCT_BUNDLE_IDENTIFIER = com.lux.now.wallpaper;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
@ -719,16 +725,19 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = SXL2QAUF62;
DEVELOPMENT_TEAM = T93S37G27F;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.now.wallpaper;
PRODUCT_BUNDLE_IDENTIFIER = com.lux.now.wallpaper;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";

View File

@ -9,7 +9,7 @@
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.now.wallpaper</string>
<string>com.lux.now.wallpaper</string>
<key>PROJECT_ID</key>
<string>nowwallpaper</string>
<key>STORAGE_BUCKET</key>
@ -25,6 +25,6 @@
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:318284530945:ios:754fb4ceebd09514250700</string>
<string>1:318284530945:ios:7bacbc490f39d820250700</string>
</dict>
</plist>

View File

@ -27,7 +27,7 @@ class PermissionUtil {
switch (permissionStatus) {
//
case PermissionStatus.denied:
_showFailedDialog(newPermissionList);
showFailedDialog(newPermissionList);
return false;
//
case PermissionStatus.granted:
@ -37,7 +37,7 @@ class PermissionUtil {
//
case PermissionStatus.restricted:
case PermissionStatus.permanentlyDenied:
_showFailedDialog(newPermissionList, isPermanentlyDenied: true);
showFailedDialog(newPermissionList, isPermanentlyDenied: true);
break;
}
} else {
@ -79,10 +79,10 @@ class PermissionUtil {
//
} else if (status.isDenied || status2.isDenied) {
_showFailedDialog(
showFailedDialog(
[Permission.locationWhenInUse, Permission.locationAlways]);
} else {
_showFailedDialog(
showFailedDialog(
[Permission.locationWhenInUse, Permission.locationAlways],
isPermanentlyDenied: true,
);
@ -105,7 +105,7 @@ class PermissionUtil {
}
///
static _showFailedDialog(List<Permission> permissionList, {bool isPermanentlyDenied = false}) async {
static showFailedDialog(List<Permission> permissionList, {bool isPermanentlyDenied = false}) async {
Get.dialog(
barrierDismissible: false,
RemindDialog(
@ -137,7 +137,7 @@ class PermissionUtil {
}
}
String explain = '';
if (failedPermission == Permission.storage) {
if (failedPermission == Permission.storage || failedPermission == Permission.photosAddOnly) {
explain = 'To save wallpapers to gallery, we need this permission';
}
return explain;

View File

@ -59,11 +59,11 @@ class DefaultFirebaseOptions {
static const FirebaseOptions ios = FirebaseOptions(
apiKey: 'AIzaSyBAVP2-PNvC07OPHepWpCCb6QzVTRk1cMM',
appId: '1:318284530945:ios:754fb4ceebd09514250700',
appId: '1:318284530945:ios:7bacbc490f39d820250700',
messagingSenderId: '318284530945',
projectId: 'nowwallpaper',
storageBucket: 'nowwallpaper.appspot.com',
iosBundleId: 'com.now.wallpaper',
iosBundleId: 'com.lux.now.wallpaper',
);
}

View File

@ -74,8 +74,7 @@ class WallpaperDetController extends GetxController {
// Android 10
int sdkVersion = await DeviceInfoUtil.getAndroidSystemVersion();
if (sdkVersion < 29) {
bool status = await PermissionUtil.checkPermission([Permission.storage]);
canSave = status;
canSave = await PermissionUtil.checkPermission([Permission.storage]);
}
}
if (canSave) {
@ -147,7 +146,7 @@ class WallpaperDetController extends GetxController {
await imageFile.writeAsBytes(pngBytes);
filePath = imagePath;
final result = await ImageGallerySaver.saveImage(pngBytes);
final result = await ImageGallerySaver.saveImage(pngBytes, quality: 100);
if (result['isSuccess']) {
toast('Saved to album');
} else {

View File

@ -136,8 +136,6 @@ flutter:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
- assets/images/
- assets/images/2.0x/
- assets/images/3.0x/
- assets/icon/
- assets/json/