diff --git a/firebase.json b/firebase.json index 16fc042..663adbf 100644 --- a/firebase.json +++ b/firebase.json @@ -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:9ac1774ea498265e250700","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:9ac1774ea498265e250700"}}}}}} \ No newline at end of file +{"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"}}}}}} \ No newline at end of file diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 15d0e35..ee5173e 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -202,7 +202,7 @@ 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 39CCEDF39CF579238AE308F0 /* [CP] Embed Pods Frameworks */, 405E88F0300BCE9602B4DA07 /* [CP] Copy Pods Resources */, - 41D07400CAF8B16888A62377 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */, + A619BA3878CFD24C03A25DF3 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */, ); buildRules = ( ); @@ -347,24 +347,6 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 41D07400CAF8B16888A62377 /* 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; @@ -402,6 +384,24 @@ 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 */ @@ -519,7 +519,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.hello.wallpaper; + PRODUCT_BUNDLE_IDENTIFIER = com.now.wallpaper; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -704,7 +704,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.hello.wallpaper; + PRODUCT_BUNDLE_IDENTIFIER = com.now.wallpaper; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -727,7 +727,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.hello.wallpaper; + PRODUCT_BUNDLE_IDENTIFIER = com.now.wallpaper; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/ios/Runner/GoogleService-Info.plist b/ios/Runner/GoogleService-Info.plist index 2af7711..942b0f4 100644 --- a/ios/Runner/GoogleService-Info.plist +++ b/ios/Runner/GoogleService-Info.plist @@ -9,7 +9,7 @@ PLIST_VERSION 1 BUNDLE_ID - com.hello.wallpaper + com.now.wallpaper PROJECT_ID nowwallpaper STORAGE_BUCKET @@ -25,6 +25,6 @@ IS_SIGNIN_ENABLED GOOGLE_APP_ID - 1:318284530945:ios:9ac1774ea498265e250700 + 1:318284530945:ios:754fb4ceebd09514250700 \ No newline at end of file diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index fa85a5e..b7dd38d 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -7,7 +7,7 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Hello Wallpaper + Now Wallpaper CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier diff --git a/lib/applovin_max/applovin_manage.dart b/lib/applovin_max/applovin_manage.dart index 1b4ee83..e08f5ea 100644 --- a/lib/applovin_max/applovin_manage.dart +++ b/lib/applovin_max/applovin_manage.dart @@ -3,6 +3,7 @@ // Description: 广告管理 import 'dart:async'; +import 'dart:io'; import 'dart:math'; import 'package:applovin_max/applovin_max.dart'; @@ -20,9 +21,9 @@ class ApplovinManage { final String applovinKey = 'nEo4OHOhAZuAK9-IARuNaUfW-yDLBayq9FIGZs0L9XMNTByuDV6dsvMEIGnEAkQu-KR8D42QdKRlbniP910xnK'; /// 广告单元Id - final String adUnitId1 = 'a2ced77c3755055b'; - final String adUnitId2 = 'a3819ba97232d772'; - final String adUnitId3 = 'bb0bfc77dcfd1fc4'; + final String adUnitId1 = Platform.isAndroid ? 'a2ced77c3755055b' : 'a2ced77c3755055b'; + final String adUnitId2 = Platform.isAndroid ? 'a3819ba97232d772' : 'a3819ba97232d772'; + final String adUnitId3 = Platform.isAndroid ? 'bb0bfc77dcfd1fc4' : 'bb0bfc77dcfd1fc4'; /// 是否已初始化 bool isInitialized = false; diff --git a/lib/firebase_options.dart b/lib/firebase_options.dart index ed18442..7a22a82 100644 --- a/lib/firebase_options.dart +++ b/lib/firebase_options.dart @@ -59,11 +59,11 @@ class DefaultFirebaseOptions { static const FirebaseOptions ios = FirebaseOptions( apiKey: 'AIzaSyBAVP2-PNvC07OPHepWpCCb6QzVTRk1cMM', - appId: '1:318284530945:ios:9ac1774ea498265e250700', + appId: '1:318284530945:ios:754fb4ceebd09514250700', messagingSenderId: '318284530945', projectId: 'nowwallpaper', storageBucket: 'nowwallpaper.appspot.com', - iosBundleId: 'com.hello.wallpaper', + iosBundleId: 'com.now.wallpaper', ); } \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 5fb198f..d6181e0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -53,7 +53,11 @@ void main() async { // 沉浸式状态栏 if(Platform.isAndroid) { - SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(statusBarColor: Colors.transparent)); + SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( + statusBarColor: Colors.transparent, + systemNavigationBarColor: Colors.black, + systemNavigationBarIconBrightness: Brightness.light, + )); } } diff --git a/lib/modules/settings/settings_controller.dart b/lib/modules/settings/settings_controller.dart index c2b8dbe..a53b0fe 100644 --- a/lib/modules/settings/settings_controller.dart +++ b/lib/modules/settings/settings_controller.dart @@ -9,6 +9,12 @@ import 'package:hello_wallpaper/routes/app_pages.dart'; import 'package:share_plus/share_plus.dart'; class SettingsController extends GetxController { + final privacyUrlAndroid = 'https://nowwallpaperapp.mystrikingly.com/privacy'; + final termsUrlAndroid = 'https://nowwallpaperapp.mystrikingly.com/terms'; + + final privacyUrlIOS = 'https://nowwallpaper.mystrikingly.com/privacy'; + final termsUrlIOS = 'https://nowwallpaper.mystrikingly.com/terms'; + // final options = ['About', 'Feedback', 'Share', 'Privacy Policy', 'Terms of Service']; final options = ['About', 'Share', 'Privacy Policy', 'Terms of Service']; @@ -25,13 +31,13 @@ class SettingsController extends GetxController { if (index == 2) { Get.toNamed(AppPages.privacyPolicy, arguments: { 'title': options[index], - 'url': 'https://nowwallpaperapp.mystrikingly.com/privacy', + 'url': Platform.isIOS ? privacyUrlIOS : privacyUrlAndroid, }); } if (index == 3) { Get.toNamed(AppPages.termsOfService, arguments: { 'title': options[index], - 'url': 'https://nowwallpaperapp.mystrikingly.com/terms' + 'url': Platform.isIOS ? termsUrlIOS : termsUrlAndroid, }); } } diff --git a/lib/res/values/strings.dart b/lib/res/values/strings.dart index a75335c..6ca20c2 100644 --- a/lib/res/values/strings.dart +++ b/lib/res/values/strings.dart @@ -2,4 +2,6 @@ // Date: 2024/5/7 // Description: 文本 -const appName = 'Hello Wallpaper'; \ No newline at end of file +import 'dart:io'; + +final appName = '${Platform.isAndroid ? 'Hello' : 'Now'} Wallpaper'; \ No newline at end of file