diff --git a/android/app/build.gradle b/android/app/build.gradle index f03664b..3c288dd 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -38,7 +38,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.popular.wallpaperx" + applicationId = "com.ai.wallpaper.genie" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdk = flutter.minSdkVersion diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml index d317904..bb136a7 100644 --- a/android/app/src/main/res/drawable-v21/launch_background.xml +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -1,12 +1,12 @@ - + + android:gravity="fill" + android:src="@mipmap/launcher_image" /> diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml index 5a967dd..bb136a7 100644 --- a/android/app/src/main/res/drawable/launch_background.xml +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -1,12 +1,12 @@ - + + android:gravity="fill" + android:src="@mipmap/launcher_image" /> diff --git a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png index 59bed6d..40c5102 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png index a894620..989c3a9 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png index 2452004..fc39df0 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/launcher_image.png b/android/app/src/main/res/mipmap-xhdpi/launcher_image.png new file mode 100644 index 0000000..44d80f6 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/launcher_image.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png index 061a13e..17dddb9 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/launcher_image.png b/android/app/src/main/res/mipmap-xxhdpi/launcher_image.png new file mode 100644 index 0000000..0ea9973 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/launcher_image.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png index e6971f2..9ead371 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/launcher_image.png b/android/app/src/main/res/mipmap-xxxhdpi/launcher_image.png new file mode 100644 index 0000000..03bc8cd Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/launcher_image.png differ diff --git a/assets/icon/icon_app.jpeg b/assets/icon/icon_app.jpeg deleted file mode 100644 index f1c2c8a..0000000 Binary files a/assets/icon/icon_app.jpeg and /dev/null differ diff --git a/assets/icon/icon_app.png b/assets/icon/icon_app.png new file mode 100644 index 0000000..30825ed Binary files /dev/null and b/assets/icon/icon_app.png differ diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig index 592ceee..ec97fc6 100644 --- a/ios/Flutter/Debug.xcconfig +++ b/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig index 592ceee..c4855bf 100644 --- a/ios/Flutter/Release.xcconfig +++ b/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Podfile b/ios/Podfile new file mode 100644 index 0000000..14c4e0f --- /dev/null +++ b/ios/Podfile @@ -0,0 +1,62 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '12.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + target.build_configurations.each do |config| + # You can remove unused permissions here + # for more infomation: https://github.com/BaseflowIT/flutter-permission-handler/blob/master/permission_handler/ios/Classes/PermissionHandlerEnums.h + # e.g. when you don't need camera permission, just add 'PERMISSION_CAMERA=0' + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ + '$(inherited)', + + ## dart: PermissionGroup.photos + 'PERMISSION_PHOTOS=1', + + ## dart:PermissionGroup.photosAddOnly + 'PERMISSION_PHOTOS_ADD_ONLY=1', + + ## dart: PermissionGroup.appTrackingTransparency + 'PERMISSION_APP_TRACKING_TRANSPARENCY=1', + ] + + end + end +end diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 60c01c9..95ac62e 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -14,6 +14,8 @@ 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 */; }; + E0394F2D1242D3E25BEE1101 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC49B9B0033C4ED6FF21BA48 /* Pods_RunnerTests.framework */; }; + F27886AB02FF62E29D29151A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 48A90D609A09C0FED35B9E09 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -40,11 +42,14 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 11C559BC8FD797B93B4E8E43 /* 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 = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 2294D20D50E26C2A689F2E85 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 48A90D609A09C0FED35B9E09 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; @@ -55,6 +60,11 @@ 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.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BD222BC43759967F7576B8D6 /* 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 = ""; }; + CC49B9B0033C4ED6FF21BA48 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D206D768E63BA5AB4E121075 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + D8F362FD1A0909B80027D3C0 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + EC927AF1737684F796D3BE45 /* 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 = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -62,6 +72,15 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + F27886AB02FF62E29D29151A /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F44B8F11E5AFA7C9EE872EE4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E0394F2D1242D3E25BEE1101 /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -94,6 +113,8 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 331C8082294A63A400263BE5 /* RunnerTests */, + BF9BDC43F67978E918B0EBA4 /* Pods */, + 9CD53902CA93F44E48070FAB /* Frameworks */, ); sourceTree = ""; }; @@ -121,6 +142,28 @@ path = Runner; sourceTree = ""; }; + 9CD53902CA93F44E48070FAB /* Frameworks */ = { + isa = PBXGroup; + children = ( + 48A90D609A09C0FED35B9E09 /* Pods_Runner.framework */, + CC49B9B0033C4ED6FF21BA48 /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + BF9BDC43F67978E918B0EBA4 /* Pods */ = { + isa = PBXGroup; + children = ( + BD222BC43759967F7576B8D6 /* Pods-Runner.debug.xcconfig */, + 11C559BC8FD797B93B4E8E43 /* Pods-Runner.release.xcconfig */, + EC927AF1737684F796D3BE45 /* Pods-Runner.profile.xcconfig */, + 2294D20D50E26C2A689F2E85 /* Pods-RunnerTests.debug.xcconfig */, + D8F362FD1A0909B80027D3C0 /* Pods-RunnerTests.release.xcconfig */, + D206D768E63BA5AB4E121075 /* Pods-RunnerTests.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -128,8 +171,10 @@ isa = PBXNativeTarget; buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( + 6F818D4F9C669F66C4AB76D9 /* [CP] Check Pods Manifest.lock */, 331C807D294A63A400263BE5 /* Sources */, 331C807F294A63A400263BE5 /* Resources */, + F44B8F11E5AFA7C9EE872EE4 /* Frameworks */, ); buildRules = ( ); @@ -145,12 +190,15 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + F8C92AC4E9B9518371F23743 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 9815AB21B06A82C551A93B25 /* [CP] Embed Pods Frameworks */, + 1E91BE67C9E2718A4BB85BCB /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -222,6 +270,23 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 1E91BE67C9E2718A4BB85BCB /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -238,6 +303,28 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; + 6F818D4F9C669F66C4AB76D9 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + 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; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -253,6 +340,45 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + 9815AB21B06A82C551A93B25 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + F8C92AC4E9B9518371F23743 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + 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; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -361,23 +487,33 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 2; + DEVELOPMENT_TEAM = 34W9G5KLNH; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.popular.wallpaperx; + PRODUCT_BUNDLE_IDENTIFIER = com.ai.wallpaper.genie; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; }; name = Profile; }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 2294D20D50E26C2A689F2E85 /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -395,6 +531,7 @@ }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = D8F362FD1A0909B80027D3C0 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -410,6 +547,7 @@ }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; + baseConfigurationReference = D206D768E63BA5AB4E121075 /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -540,18 +678,27 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 2; + DEVELOPMENT_TEAM = 34W9G5KLNH; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.popular.wallpaperx; + PRODUCT_BUNDLE_IDENTIFIER = com.ai.wallpaper.genie; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; @@ -562,17 +709,26 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 2; + DEVELOPMENT_TEAM = 34W9G5KLNH; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.popular.wallpaperx; + PRODUCT_BUNDLE_IDENTIFIER = com.ai.wallpaper.genie; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata index 1d526a1..21a3cc1 100644 --- a/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png index 8cf7180..83d6b02 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index e6a3380..10f32a9 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index 8316068..8a346d5 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index 4b4f626..b91af67 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index 67cd9b2..1207a60 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index c4526f9..7b36870 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index 88ebd05..d40a3d3 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 8316068..8a346d5 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index 51d4d18..d1ffcd4 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index c8406a6..c9abd03 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png index ac2f5b2..26cc58e 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png index 678c125..1e74d8d 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png index 6978e75..d53ee94 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png index e4b0469..5bffd6b 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index c8406a6..c9abd03 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index c773503..ec35db8 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png index 59bed6d..40c5102 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png index 061a13e..17dddb9 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index 6d5d402..26a1417 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index 315faf4..ba6d6c1 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index 40fc630..6a95935 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json index 0bedcf2..5d7ae40 100644 --- a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -1,23 +1,23 @@ { "images" : [ { + "filename" : "launcher_image.png", "idiom" : "universal", - "filename" : "LaunchImage.png", "scale" : "1x" }, { + "filename" : "launcher_image@2x.png", "idiom" : "universal", - "filename" : "LaunchImage@2x.png", "scale" : "2x" }, { + "filename" : "launcher_image@3x.png", "idiom" : "universal", - "filename" : "LaunchImage@3x.png", "scale" : "3x" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } } diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19ea..0000000 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19ea..0000000 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19ea..0000000 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/launcher_image.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/launcher_image.png new file mode 100644 index 0000000..44d80f6 Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/launcher_image.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/launcher_image@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/launcher_image@2x.png new file mode 100644 index 0000000..0ea9973 Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/launcher_image@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/launcher_image@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/launcher_image@3x.png new file mode 100644 index 0000000..03bc8cd Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/launcher_image@3x.png differ diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard index f2e259c..7142d44 100644 --- a/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -1,8 +1,10 @@ - - + + + - + + @@ -14,24 +16,28 @@ + - + + - - + + + + - + - + diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard index f3c2851..4c2374c 100644 --- a/ios/Runner/Base.lproj/Main.storyboard +++ b/ios/Runner/Base.lproj/Main.storyboard @@ -1,8 +1,10 @@ - - + + + - + + @@ -14,13 +16,14 @@ - + - + + diff --git a/ios/Runner/GoogleService-Info.plist b/ios/Runner/GoogleService-Info.plist new file mode 100644 index 0000000..3e383be --- /dev/null +++ b/ios/Runner/GoogleService-Info.plist @@ -0,0 +1,30 @@ + + + + + API_KEY + AIzaSyCtr6QK7ixiotqBo4BlzoyS1X6ABMWni9E + GCM_SENDER_ID + 154597733455 + PLIST_VERSION + 1 + BUNDLE_ID + com.ai.wallpaper.genie + PROJECT_ID + wallpaper-genie-ios + STORAGE_BUCKET + wallpaper-genie-ios.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:154597733455:ios:d1981e1a0bcc03dab6663a + + \ No newline at end of file diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index b045690..6004b16 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -2,10 +2,12 @@ + CADisableMinimumFrameDurationOnPhone + CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Wallpaperx + Wallpaper Genie CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -13,7 +15,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - wallpaperx + wallpaper_genie CFBundlePackageType APPL CFBundleShortVersionString @@ -24,10 +26,19 @@ $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + NSPhotoLibraryAddUsageDescription - We need access to your photo album so you can save wallpapers from the app to your album - NSPhotoLibraryUsageDescription - We need access to your photo album so you can save wallpapers from the app to your album + We need access to your photo album so you can save wallpapers from the app to your album + NSPhotoLibraryUsageDescription + We need access to your photo album so you can save wallpapers from the app to your album + NSUserTrackingUsageDescription + We need your permission to access the advertising identifier to provide better ad services. + UIApplicationSupportsIndirectInputEvents + UILaunchStoryboardName LaunchScreen UIMainStoryboardFile @@ -45,9 +56,5 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - CADisableMinimumFrameDurationOnPhone - - UIApplicationSupportsIndirectInputEvents - diff --git a/lib/common/components/navigation_bar/base_appbar.dart b/lib/common/components/navigation_bar/base_appbar.dart index 4e85b62..8e511f3 100644 --- a/lib/common/components/navigation_bar/base_appbar.dart +++ b/lib/common/components/navigation_bar/base_appbar.dart @@ -38,8 +38,8 @@ class BaseAppBar extends StatelessWidget implements PreferredSizeWidget { onTap: onBackTap ?? () { Get.back(); - ApplovinManage() - .showAdIfReady(ApplovinManage().adUnitId3); + // ApplovinManage() + // .showAdIfReady(ApplovinManage().adUnitId3); }, child: Padding( padding: const EdgeInsets.all(10).w, diff --git a/lib/common/components/navigation_bar/nested_bottom_bar.dart b/lib/common/components/navigation_bar/nested_bottom_bar.dart index 75e6e65..c0780a4 100644 --- a/lib/common/components/navigation_bar/nested_bottom_bar.dart +++ b/lib/common/components/navigation_bar/nested_bottom_bar.dart @@ -48,7 +48,7 @@ class NestedBottomBar extends StatelessWidget implements PreferredSizeWidget { child: InkWell( onTap: onBackTap ?? () { Get.back(); - ApplovinManage().showAdIfReady(ApplovinManage().adUnitId3); + // ApplovinManage().showAdIfReady(ApplovinManage().adUnitId3); }, child: Icon(Icons.close,color: Colors.white,size: 24.sp), ), diff --git a/lib/common/http/http_util.dart b/lib/common/http/http_util.dart index 653ff74..97ec117 100644 --- a/lib/common/http/http_util.dart +++ b/lib/common/http/http_util.dart @@ -42,6 +42,7 @@ class HttpUtil { LogPrint.d("e: $e"); showError("Server error"); dismiss(dismiss: true); + errorCallback!(e); } } diff --git a/lib/common/http/url.dart b/lib/common/http/url.dart index 378a153..70f0bdb 100644 --- a/lib/common/http/url.dart +++ b/lib/common/http/url.dart @@ -1,7 +1,7 @@ class Url { Url._(); - static const String HOST = 'http://192.168.40.8:8001'; + static const String HOST = 'http://185.14.47.106:8001'; // 获取图片列表,分页 static const String getImages = "$HOST/images"; diff --git a/lib/config/app_tracking_transparency_manager.dart b/lib/config/app_tracking_transparency_manager.dart new file mode 100644 index 0000000..daa71d7 --- /dev/null +++ b/lib/config/app_tracking_transparency_manager.dart @@ -0,0 +1,49 @@ +// Author: fengshengxiong +// Date: 2024/6/26 +// Description: 应用程序跟踪透明度管理器 + +import 'dart:async'; +import 'dart:io'; + +import 'package:app_tracking_transparency/app_tracking_transparency.dart'; + +class AppTrackingTransparencyManager { + AppTrackingTransparencyManager._(); + + static final AppTrackingTransparencyManager _instance = AppTrackingTransparencyManager._(); + + factory AppTrackingTransparencyManager() { + return _instance; + } + + Timer? _timer; + + /// 请求跟踪授权 + Future requestATT() async { + if (Platform.isIOS) { + final TrackingStatus status = await AppTrackingTransparency.trackingAuthorizationStatus; + if (status == TrackingStatus.notDetermined) { + if (_timer != null && _timer!.isActive) { + final TrackingStatus status = await AppTrackingTransparency.requestTrackingAuthorization(); + } else { + _startTimer(); + } + } else { + _stopTimer(); + } + } + } + + /// 开始定时器 + void _startTimer() { + _timer = Timer.periodic(const Duration(seconds: 3), (Timer t) { + requestATT(); + }); + } + + /// 停止定时器 + void _stopTimer() { + _timer?.cancel(); + _timer = null; + } +} diff --git a/lib/firebase/firebase_analytics_manager.dart b/lib/firebase/firebase_analytics_manager.dart new file mode 100644 index 0000000..6e7bcc7 --- /dev/null +++ b/lib/firebase/firebase_analytics_manager.dart @@ -0,0 +1,24 @@ +// Author: fengshengxiong +// Date: 2024/6/26 +// Description: firebase_analytics管理 + +import 'package:firebase_analytics/firebase_analytics.dart'; +import 'package:firebase_crashlytics/firebase_crashlytics.dart'; +import 'package:flutter/foundation.dart'; + +class FirebaseAnalyticsManager { + /// 仅在非调试版本中启用它 + static Future setCrashlyticsCollectionEnabled() async { + await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(!kDebugMode); + } + + /// 埋点 + /// name:事件名 + /// parameters:业务参数 + static void logEvent(String eventName, {Map? parameters}) { + FirebaseAnalytics.instance.logEvent( + name: eventName, + parameters: parameters, + ); + } +} diff --git a/lib/firebase/firebase_options.dart b/lib/firebase/firebase_options.dart new file mode 100644 index 0000000..35c21cb --- /dev/null +++ b/lib/firebase/firebase_options.dart @@ -0,0 +1,69 @@ +// 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: + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for macos - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + case TargetPlatform.windows: + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for windows - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + 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: 'AIzaSyDP6CpkN3HMpCofXlToug-hadYpTLEgE0E', + // appId: '1:318284530945:android:c7dd2abf520a9840250700', + // messagingSenderId: '318284530945', + // projectId: 'nowwallpaper', + // storageBucket: 'nowwallpaper.appspot.com', + // ); + + static const FirebaseOptions ios = FirebaseOptions( + apiKey: 'AIzaSyCtr6QK7ixiotqBo4BlzoyS1X6ABMWni9E', + appId: '1:154597733455:ios:d1981e1a0bcc03dab6663a', + messagingSenderId: '154597733455', + projectId: 'wallpaper-genie-ios', + storageBucket: 'wallpaper-genie-ios.appspot.com', + iosBundleId: 'com.ai.wallpaper.genie', + ); + +} \ No newline at end of file diff --git a/lib/gen/assets.dart b/lib/gen/assets.dart index 5deacd1..721c108 100644 --- a/lib/gen/assets.dart +++ b/lib/gen/assets.dart @@ -2,7 +2,7 @@ class Assets { Assets._(); - static const String iconIconApp = 'assets/icon/icon_app.jpeg'; + static const String iconIconApp = 'assets/icon/icon_app.png'; static const String imagesCatalogSelected = 'assets/images/catalog_selected.png'; static const String imagesCatalogUnchecked = 'assets/images/catalog_unchecked.png'; static const String imagesDiscoverSelected = 'assets/images/discover_selected.png'; diff --git a/lib/generated/assets.dart b/lib/generated/assets.dart new file mode 100644 index 0000000..2591af2 --- /dev/null +++ b/lib/generated/assets.dart @@ -0,0 +1,70 @@ +///This file is automatically generated. DO NOT EDIT, all your changes would be lost. +class Assets { + Assets._(); + + static const String avatar1 = 'assets/avatar/1.png'; + static const String avatar2 = 'assets/avatar/2.png'; + static const String avatar3 = 'assets/avatar/3.png'; + static const String avatar4 = 'assets/avatar/4.png'; + static const String avatar5 = 'assets/avatar/5.png'; + static const String categoryCategory1 = 'assets/category/category1.png'; + static const String categoryCategory2 = 'assets/category/category2.png'; + static const String categoryCategory3 = 'assets/category/category3.png'; + static const String categoryCategory4 = 'assets/category/category4.png'; + static const String categoryCategory5 = 'assets/category/category5.png'; + static const String categoryCategory6 = 'assets/category/category6.png'; + static const String categoryCategory7 = 'assets/category/category7.png'; + static const String categoryCategory8 = 'assets/category/category8.png'; + static const String iconIconApp = 'assets/icon/icon_app.png'; + static const String imagesBackIcon = 'assets/images/back_icon.png'; + static const String imagesCatalogSelected = 'assets/images/catalog_selected.png'; + static const String imagesCatalogUnchecked = 'assets/images/catalog_unchecked.png'; + static const String imagesDiscoverBackground = 'assets/images/discover_background.png'; + static const String imagesDiscoverDown = 'assets/images/discover_down.png'; + static const String imagesDiscoverGroup = 'assets/images/discover_group.png'; + static const String imagesDiscoverSearch = 'assets/images/discover_search.png'; + static const String imagesDiscoverSelected = 'assets/images/discover_selected.png'; + static const String imagesDiscoverUnchecked = 'assets/images/discover_unchecked.png'; + static const String imagesDiscoverUp = 'assets/images/discover_up.png'; + static const String imagesErrorLoading = 'assets/images/error_loading.png'; + static const String imagesFavoriteSelected = 'assets/images/favorite_selected.png'; + static const String imagesFavoriteUnchecked = 'assets/images/favorite_unchecked.png'; + static const String imagesGenieAiBackground1 = 'assets/images/genie_ai_background1.png'; + static const String imagesGenieAiBackground2 = 'assets/images/genie_ai_background2.png'; + static const String imagesHomeBackground = 'assets/images/home_background.png'; + static const String imagesIcBack = 'assets/images/ic_back.png'; + static const String imagesIcCfgScale = 'assets/images/ic_cfg_scale.png'; + static const String imagesIcDownload = 'assets/images/ic_download.png'; + static const String imagesIcFavorite = 'assets/images/ic_favorite.png'; + static const String imagesIcFiltered = 'assets/images/ic_filtered.png'; + static const String imagesIcImgDelBack = 'assets/images/ic_img_del_back.png'; + static const String imagesIcImgDelTip = 'assets/images/ic_img_del_tip.png'; + static const String imagesIcImgInfo = 'assets/images/ic_img_info.png'; + static const String imagesIcPreview = 'assets/images/ic_preview.png'; + static const String imagesIcSampler = 'assets/images/ic_sampler.png'; + static const String imagesIcSeed = 'assets/images/ic_seed.png'; + static const String imagesIcSettingArrow = 'assets/images/ic_setting_arrow.png'; + static const String imagesIcSettings = 'assets/images/ic_settings.png'; + static const String imagesIcSteps = 'assets/images/ic_steps.png'; + static const String imagesIcUnFavorite = 'assets/images/ic_un_favorite.png'; + static const String imagesImgError = 'assets/images/img_error.png'; + static const String imagesImgPlaceholder = 'assets/images/img_placeholder.png'; + static const String imagesNoDataAvailable = 'assets/images/no_data_available.png'; + static const String imagesPlaceholder = 'assets/images/placeholder.jpg'; + static const String imagesPutItAway = 'assets/images/put_it_away.png'; + static const String imagesSearchBottom = 'assets/images/search_bottom.png'; + static const String imagesSearchBottomRight = 'assets/images/search_bottom_right.png'; + static const String imagesSearchIcon = 'assets/images/search_icon.png'; + static const String imagesSearchLongRight = 'assets/images/search_long_right.png'; + static const String imagesSearchTop = 'assets/images/search_top.png'; + static const String imagesSelectedIcon = 'assets/images/selected_icon.png'; + static const String imagesSettingBackground = 'assets/images/setting_background.png'; + static const String imagesSettingSelected = 'assets/images/setting_selected.png'; + static const String imagesSettingUnchecked = 'assets/images/setting_unchecked.png'; + static const String imagesStarsL = 'assets/images/stars_l.png'; + static const String imagesStarsM = 'assets/images/stars_m.png'; + static const String imagesStarsS = 'assets/images/stars_s.png'; + static const String imagesViewMore = 'assets/images/view_more.png'; + static const String jsonLuxWallpaper = 'assets/json/lux_wallpaper.json'; + +} diff --git a/lib/main.dart b/lib/main.dart index f99acd1..d983bd0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,6 +1,9 @@ import 'dart:io'; +import 'dart:ui'; import 'package:bot_toast/bot_toast.dart'; +import 'package:firebase_core/firebase_core.dart'; +import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; @@ -11,6 +14,7 @@ import 'package:wallpaperx/common/components/easy_loading.dart'; import 'package:wallpaperx/common/storage/hive_storage.dart'; import 'package:wallpaperx/common/utils/log_print.dart'; import 'package:wallpaperx/common/utils/shared_util.dart'; +import 'package:wallpaperx/firebase/firebase_options.dart'; import 'package:wallpaperx/res/themes/app_themes.dart'; import 'package:wallpaperx/res/values/strings.dart'; import 'package:wallpaperx/routes/app_pages.dart'; @@ -18,6 +22,27 @@ import 'package:wallpaperx/routes/app_pages.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); + // 初始化Firebase + try { + await Firebase.initializeApp( + options: DefaultFirebaseOptions.currentPlatform, + ); + debugPrint("Firebase initialization OK"); + } catch (e) { + debugPrint("Firebase initialization error: $e"); + } + + // 非异步错误 + FlutterError.onError = (errorDetails) { + FirebaseCrashlytics.instance.recordFlutterError(errorDetails); + }; + + // 异步错误 + PlatformDispatcher.instance.onError = (error, stack) { + FirebaseCrashlytics.instance.recordError(error, stack, fatal: false); + return true; + }; + // 竖屏 SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, @@ -25,7 +50,7 @@ void main() async { ]); // 初始化广告sdk - await ApplovinManage().initApplovin(); + // await ApplovinManage().initApplovin(); // 初始化Hive await initHive(); @@ -71,7 +96,7 @@ class MyApp extends StatelessWidget { theme: lightTheme, themeMode: ThemeMode.dark, getPages: AppPages.routes, - initialRoute: AppPages.splashScreen, + initialRoute: AppPages.home, builder: (context, widget) { widget = easyLoading(context, widget); child = botToastBuilder(context,widget); diff --git a/lib/page/discover/discover_controller.dart b/lib/page/discover/discover_controller.dart index 41ba369..cd28a0f 100644 --- a/lib/page/discover/discover_controller.dart +++ b/lib/page/discover/discover_controller.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:convert'; import 'package:easy_refresh/easy_refresh.dart'; @@ -28,6 +29,8 @@ class DiscoverController extends GetxController { int skip = 0; int limit = 20; + Timer? _timer; + @override void onInit() { super.onInit(); @@ -36,6 +39,12 @@ class DiscoverController extends GetxController { getImages(); } + /// 停止定时器 + void _stopTimer() { + _timer?.cancel(); + _timer = null; + } + @override void onClose() { super.onClose(); @@ -64,7 +73,12 @@ class DiscoverController extends GetxController { } else { viewState = ViewState.empty.obs; } + _stopTimer(); } + },errorCallback: (e) { + _timer ??= Timer.periodic(const Duration(seconds: 2), (Timer t) { + getImages(); + }); }, params: {"limit": limit, "skip": skip, "tags": tags.join(",")}); } diff --git a/lib/page/home/home_controller.dart b/lib/page/home/home_controller.dart index d606a74..19cd2ff 100644 --- a/lib/page/home/home_controller.dart +++ b/lib/page/home/home_controller.dart @@ -3,6 +3,7 @@ import 'package:get/get.dart'; import 'package:wallpaperx/applovin_max/applovin_manage.dart'; import 'package:wallpaperx/common/components/view_state_widget.dart'; import 'package:wallpaperx/common/utils/shared_util.dart'; +import 'package:wallpaperx/config/app_tracking_transparency_manager.dart'; import 'package:wallpaperx/entity/userinfo_model.dart'; import 'package:wallpaperx/gen/assets.dart'; import 'package:wallpaperx/page/discover/discover_view.dart'; @@ -66,6 +67,7 @@ class HomeController extends GetxController with WidgetsBindingObserver { getUserInfo(); WidgetsBinding.instance.addObserver(this); pageController = PageController(initialPage: currentIndex.value); + AppTrackingTransparencyManager().requestATT(); } @override @@ -84,7 +86,7 @@ class HomeController extends GetxController with WidgetsBindingObserver { Future didChangeAppLifecycleState(AppLifecycleState state) async { switch (state) { case AppLifecycleState.resumed: - await ApplovinManage().showAdIfReady(ApplovinManage().adUnitId1); + // await ApplovinManage().showAdIfReady(ApplovinManage().adUnitId1); break; case AppLifecycleState.inactive: case AppLifecycleState.hidden: @@ -106,7 +108,7 @@ class HomeController extends GetxController with WidgetsBindingObserver { /// 点击BottomNavigationBar void onTapNavigationBar(int index) { pageController.jumpToPage(index); - ApplovinManage().showAdIfReady(ApplovinManage().adUnitId1); + // ApplovinManage().showAdIfReady(ApplovinManage().adUnitId1); } /// 获取用户信息 diff --git a/lib/page/settings/settings_controller.dart b/lib/page/settings/settings_controller.dart index a1b2ba4..3a9f4ce 100644 --- a/lib/page/settings/settings_controller.dart +++ b/lib/page/settings/settings_controller.dart @@ -16,11 +16,11 @@ import 'package:wallpaperx/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 privacyUrlAndroid = 'https://wallpapergenie.mystrikingly.com/privacy'; + final termsUrlAndroid = 'https://wallpapergenie.mystrikingly.com/terms'; - final privacyUrlIOS = 'https://nowwallpaper.mystrikingly.com/privacy'; - final termsUrlIOS = 'https://nowwallpaper.mystrikingly.com/terms'; + final privacyUrlIOS = 'https://wallpapergenie.mystrikingly.com/privacy'; + final termsUrlIOS = 'https://wallpapergenie.mystrikingly.com/terms'; final options = [ 'AI preferences', diff --git a/lib/page/splash_screen/splash_screen_controller.dart b/lib/page/splash_screen/splash_screen_controller.dart index 11c8bb7..1ec7da7 100644 --- a/lib/page/splash_screen/splash_screen_controller.dart +++ b/lib/page/splash_screen/splash_screen_controller.dart @@ -11,7 +11,7 @@ class SplashScreenController extends GetxController { @override void onInit() { super.onInit(); - ApplovinManage().initializeInterstitialAds(onGoHomeTap: _openHomePage); + // ApplovinManage().initializeInterstitialAds(onGoHomeTap: _openHomePage); _startTimer(); } diff --git a/lib/page/wallpaper_det/wallpaper_det_controller.dart b/lib/page/wallpaper_det/wallpaper_det_controller.dart index e184230..36bf795 100644 --- a/lib/page/wallpaper_det/wallpaper_det_controller.dart +++ b/lib/page/wallpaper_det/wallpaper_det_controller.dart @@ -100,7 +100,9 @@ class WallpaperDetController extends GetxController { ); } if (canSave) { - final result = await ImageGallerySaver.saveFile(savePath); + final result = await ImageGallerySaver.saveImage(File(filePath).readAsBytesSync()); + LogPrint.d(savePath); + LogPrint.d(result); if (result['isSuccess']) { toast('Saved to album'); } else { @@ -154,7 +156,7 @@ class WallpaperDetController extends GetxController { /// 设置壁纸 void onTapSetWallpaper() async { - await ApplovinManage().showAdIfReady(ApplovinManage().adUnitId2); + // await ApplovinManage().showAdIfReady(ApplovinManage().adUnitId2); BottomSheetDialog.show((location) async { if (ObjUtil.isNotEmptyStr(filePath)) { WallpaperManage.setWallpaper(filePath, location); @@ -191,6 +193,6 @@ class WallpaperDetController extends GetxController { /// 显示广告 void showAd() { Get.back(); - ApplovinManage().showAdIfReady(ApplovinManage().adUnitId3); + // ApplovinManage().showAdIfReady(ApplovinManage().adUnitId3); } } diff --git a/lib/page/wallpaper_det_v2/wallpaper_det_v2_controller.dart b/lib/page/wallpaper_det_v2/wallpaper_det_v2_controller.dart index 745d1e8..e9a543a 100644 --- a/lib/page/wallpaper_det_v2/wallpaper_det_v2_controller.dart +++ b/lib/page/wallpaper_det_v2/wallpaper_det_v2_controller.dart @@ -154,7 +154,7 @@ class WallpaperDetV2Controller extends GetxController { /// 设置壁纸 void onTapSetWallpaper() async { - await ApplovinManage().showAdIfReady(ApplovinManage().adUnitId2); + // await ApplovinManage().showAdIfReady(ApplovinManage().adUnitId2); BottomSheetDialog.show((location) async { if (ObjUtil.isNotEmptyStr(filePath)) { WallpaperManage.setWallpaper(filePath, location); @@ -191,6 +191,6 @@ class WallpaperDetV2Controller extends GetxController { /// 显示广告 void showAd() { Get.back(); - ApplovinManage().showAdIfReady(ApplovinManage().adUnitId3); + // ApplovinManage().showAdIfReady(ApplovinManage().adUnitId3); } } diff --git a/lib/routes/app_pages.dart b/lib/routes/app_pages.dart index ec2c6d0..71784ac 100644 --- a/lib/routes/app_pages.dart +++ b/lib/routes/app_pages.dart @@ -72,11 +72,11 @@ class AppPages { static const feedBack = '/feed_back'; static final routes = [ - GetPage( - name: splashScreen, - page: () => const SplashScreenView(), - binding: SplashScreenBinding(), - ), + // GetPage( + // name: splashScreen, + // page: () => const SplashScreenView(), + // binding: SplashScreenBinding(), + // ), GetPage( name: home, page: () => const HomeView(), diff --git a/pubspec.yaml b/pubspec.yaml index fb5e609..c4e686d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: wallpaperx description: "A new Flutter project." publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 1.0.1+1 +version: 1.0.2+2 environment: sdk: '>=3.4.3 <4.0.0' @@ -99,6 +99,7 @@ dependencies: # 动态边框 # flutter_colors_border: ^0.0.4 flip_card: ^0.7.0 + app_tracking_transparency: ^2.0.5 # Firebase firebase_core: ^2.32.0 @@ -108,7 +109,7 @@ dependencies: flutter_launcher_icons: android: "launcher_icon" ios: true - image_path: "assets/icon/icon_app.jpeg" + image_path: "assets/icon/icon_app.png" min_sdk_android: 21 # android min sdk min:16, default 21 dev_dependencies: