diff --git a/README.md b/README.md index f9fb0f3..db70f19 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ make windows-release 1. xcode修改配置, macOS -> signing Certificate -> 选择 sign to Run Locally; 2. 使用automaticall - 启动过程中页面卡在启动页 FFISingboxService - singbox native libs path: "libcore.dylib" + 是ffi_singbox_service.dart找不到路径导致的卡住 ### 🪟 Windows diff --git a/assets/images/lost-image.png b/assets/images/lost-image.png new file mode 100644 index 0000000..903bf53 Binary files /dev/null and b/assets/images/lost-image.png differ diff --git a/assets/images/lost-share-image.png b/assets/images/lost-share-image.png new file mode 100644 index 0000000..5ebf88a Binary files /dev/null and b/assets/images/lost-share-image.png differ diff --git a/lib/app/modules/hi_anti_lost/controllers/hi_anti_lost_controller.dart b/lib/app/modules/hi_anti_lost/controllers/hi_anti_lost_controller.dart index e52a1a7..f1c46f2 100644 --- a/lib/app/modules/hi_anti_lost/controllers/hi_anti_lost_controller.dart +++ b/lib/app/modules/hi_anti_lost/controllers/hi_anti_lost_controller.dart @@ -3,6 +3,7 @@ import 'dart:typed_data'; import 'dart:ui' as ui; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; +import 'package:flutter/services.dart'; import 'package:get/get.dart'; import 'package:gal/gal.dart'; import 'package:kaer_with_panels/app/utils/kr_common_util.dart'; @@ -10,10 +11,9 @@ import 'package:kaer_with_panels/app/widgets/dialogs/hi_dialog.dart'; import 'package:url_launcher/url_launcher.dart'; class HIAntiLostController extends GetxController { - final GlobalKey repaintKey = GlobalKey(); Future saveImage() async { - KRCommonUtil.kr_showLoading(message: "正在保存..."); + // KRCommonUtil.kr_showLoading(message: "正在保存..."); try { // Check permission final hasAccess = await Gal.hasAccess(); @@ -21,43 +21,23 @@ class HIAntiLostController extends GetxController { await Gal.requestAccess(); } - // Capture image - RenderRepaintBoundary? boundary = repaintKey.currentContext - ?.findRenderObject() as RenderRepaintBoundary?; + // Load image from assets + final ByteData data = + await rootBundle.load('assets/images/lost-share-image.png'); + final Uint8List pngBytes = data.buffer.asUint8List(); - if (boundary == null) { - throw Exception("Cannot find boundary"); + await Gal.putImageBytes(pngBytes); + + String message = "已保存至系统相册"; + if (Platform.isMacOS) { + message = "已保存至系统【照片】应用"; + } else if (Platform.isWindows) { + message = "已保存至系统【图片】文件夹"; } - // Check if the boundary needs layout (sometimes Offstage needs a frame) - if (boundary.debugNeedsPaint) { - await Future.delayed(const Duration(milliseconds: 20)); - boundary = repaintKey.currentContext?.findRenderObject() - as RenderRepaintBoundary?; - } - - ui.Image image = await boundary!.toImage(pixelRatio: 3.0); - ByteData? byteData = - await image.toByteData(format: ui.ImageByteFormat.png); - - if (byteData != null) { - final Uint8List pngBytes = byteData.buffer.asUint8List(); - await Gal.putImageBytes(pngBytes); - // KRCommonUtil.kr_showToast("保存成功"); - - String message = "已保存至系统相册"; - if (Platform.isMacOS) { - message = "已保存至系统【照片】应用"; - } else if (Platform.isWindows) { - message = "已保存至系统【图片】文件夹"; - } - - HIDialog.show( - message: message, - ); - } else { - KRCommonUtil.kr_showToast("生成图片失败"); - } + HIDialog.show( + message: message, + ); } catch (e) { debugPrint("Save image error: $e"); if (e is GalException) { @@ -66,7 +46,7 @@ class HIAntiLostController extends GetxController { KRCommonUtil.kr_showToast("保存失败"); } } finally { - KRCommonUtil.kr_hideLoading(); + //KRCommonUtil.kr_hideLoading(); } } diff --git a/lib/app/modules/hi_anti_lost/views/hi_anti_lost_view.dart b/lib/app/modules/hi_anti_lost/views/hi_anti_lost_view.dart index 07f30fc..e294db4 100644 --- a/lib/app/modules/hi_anti_lost/views/hi_anti_lost_view.dart +++ b/lib/app/modules/hi_anti_lost/views/hi_anti_lost_view.dart @@ -2,10 +2,8 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:kaer_with_panels/app/widgets/hi_base_scaffold.dart'; -import 'package:qr_flutter/qr_flutter.dart'; import 'package:kaer_with_panels/app/widgets/kr_local_image.dart'; import 'package:kaer_with_panels/app/modules/hi_anti_lost/controllers/hi_anti_lost_controller.dart'; -import 'package:kaer_with_panels/app/modules/hi_anti_lost/widgets/hi_anti_lost_share_card.dart'; class HIAntiLostView extends GetView { const HIAntiLostView({super.key}); @@ -18,70 +16,19 @@ class HIAntiLostView extends GetView { children: [ Column( children: [ - Container( - width: double.infinity, - margin: EdgeInsets.symmetric(horizontal: 40.w), - padding: EdgeInsets.symmetric(vertical: 16.w, horizontal: 0.w), - decoration: BoxDecoration( - color: Colors.black, - borderRadius: BorderRadius.circular(25.r), - border: Border.all( - color: Theme.of(context).primaryColor, width: 4), - ), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - '保存二维码,防止失联', - style: TextStyle( - color: Theme.of(context).primaryColor, - fontSize: 24.sp, - fontWeight: FontWeight.bold, - ), - ), - SizedBox(height: 25.w), - Text( - '建议保存Hi快VPN防丢二维码到相册\n永久保障您的互联网自由', - textAlign: TextAlign.center, - style: TextStyle( - color: Theme.of(context).primaryColor, - fontSize: 14.sp, - height: 1.5, - ), - ), - SizedBox(height: 10.w), - // QR Code - LayoutBuilder(builder: (context, constraints) { - // Use a reasonable size for the QR code - return Container( - width: 124.w, - height: 124.w, - child: QrImageView( - data: - 'https://github.com/HiFastVPN/HiFastVPN', // Replace with real URL - version: QrVersions.auto, - backgroundColor: Colors.transparent, - eyeStyle: QrEyeStyle( - eyeShape: QrEyeShape.square, - color: Theme.of(context).primaryColor, - ), - dataModuleStyle: QrDataModuleStyle( - dataModuleShape: QrDataModuleShape.square, - color: Theme.of(context).primaryColor, - ), - embeddedImage: const AssetImage( - 'assets/images/lost-poster-logo-white.png'), - embeddedImageStyle: QrEmbeddedImageStyle( - size: Size(36.w, 36.w), - ), - ), - ); - }), - ], - ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + KrLocalImage( + imageName: 'lost-image', + imageType: ImageType.png, + width: 298.w, + height: 385.w, + ), + ], ), - SizedBox(height: 10.w), + SizedBox(height: 30.w), // Save Button GestureDetector( @@ -129,14 +76,6 @@ class HIAntiLostView extends GetView { ), ), - // 3. Invisible Share Card for Generation - Positioned( - left: 10000, - child: RepaintBoundary( - key: controller.repaintKey, - child: const HIAntiLostShareCard(), - ), - ), ], ), ); diff --git a/lib/app/modules/hi_anti_lost/widgets/hi_anti_lost_share_card.dart b/lib/app/modules/hi_anti_lost/widgets/hi_anti_lost_share_card.dart deleted file mode 100644 index 2e6edcb..0000000 --- a/lib/app/modules/hi_anti_lost/widgets/hi_anti_lost_share_card.dart +++ /dev/null @@ -1,59 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:qr_flutter/qr_flutter.dart'; -import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart'; - -class HIAntiLostShareCard extends StatelessWidget { - const HIAntiLostShareCard({super.key}); - - @override - Widget build(BuildContext context) { - // Fixed dimensions for the generated image - final double cardWidth = 375.0; - final double cardHeight = 812.0; - - return Container( - width: cardWidth, - height: cardHeight, - decoration: const BoxDecoration( - image: DecorationImage( - image: AssetImage('assets/images/lost-poster-bg.png'), - fit: BoxFit.cover, - ), - ), - child: Stack( - children: [ - Positioned( - top: 32, - right: 30, - child: SizedBox( - width: 108, - height: 108, - child: QrImageView( - data: - 'https://github.com/HiFastVPN/HiFastVPN', // Replace with actual URL - version: QrVersions.auto, - size: 108, - padding: EdgeInsets.zero, - backgroundColor: Colors.transparent, - eyeStyle: const QrEyeStyle( - eyeShape: QrEyeShape.square, - color: Colors.white, - ), - dataModuleStyle: const QrDataModuleStyle( - dataModuleShape: QrDataModuleShape.square, - color: Colors.white, - ), - embeddedImage: const AssetImage( - 'assets/images/lost-poster-logo-white.png'), - embeddedImageStyle: const QrEmbeddedImageStyle( - size: Size(42, 42), - ), - ), - ), - ), - ], - ), - ); - } -} diff --git a/macos/Podfile b/macos/Podfile index 28b3114..4994c6e 100755 --- a/macos/Podfile +++ b/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.15' +platform :osx, '11.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 653b41a..5690f39 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -11,6 +11,9 @@ PODS: - FlutterMacOS - SAMKeychain - FlutterMacOS (1.0.0) + - gal (1.0.0): + - Flutter + - FlutterMacOS - in_app_purchase_storekit (0.0.1): - Flutter - FlutterMacOS @@ -39,6 +42,7 @@ DEPENDENCIES: - flutter_inappwebview_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_inappwebview_macos/macos`) - flutter_udid (from `Flutter/ephemeral/.symlinks/plugins/flutter_udid/macos`) - FlutterMacOS (from `Flutter/ephemeral`) + - gal (from `Flutter/ephemeral/.symlinks/plugins/gal/darwin`) - in_app_purchase_storekit (from `Flutter/ephemeral/.symlinks/plugins/in_app_purchase_storekit/darwin`) - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`) - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) @@ -65,6 +69,8 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/flutter_udid/macos FlutterMacOS: :path: Flutter/ephemeral + gal: + :path: Flutter/ephemeral/.symlinks/plugins/gal/darwin in_app_purchase_storekit: :path: Flutter/ephemeral/.symlinks/plugins/in_app_purchase_storekit/darwin package_info_plus: @@ -88,6 +94,7 @@ SPEC CHECKSUMS: flutter_inappwebview_macos: bdf207b8f4ebd58e86ae06cd96b147de99a67c9b flutter_udid: 2e7b3da4b5fdfba86a396b97898f5fe8f4ec1a52 FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 + gal: 6a522c75909f1244732d4596d11d6a2f86ff37a5 in_app_purchase_storekit: a1ce04056e23eecc666b086040239da7619cd783 OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 package_info_plus: 12f1c5c2cfe8727ca46cbd0b26677728972d9a5b @@ -100,6 +107,6 @@ SPEC CHECKSUMS: url_launcher_macos: c82c93949963e55b228a30115bd219499a6fe404 window_manager: 3a1844359a6295ab1e47659b1a777e36773cd6e8 -PODFILE CHECKSUM: 04e3af9980f29522a03273385f61d561da92c2fb +PODFILE CHECKSUM: 3100e00928a3ab9aaf1f0d7f435c5ff0d92c057c COCOAPODS: 1.15.2 diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index eece735..5109d28 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -261,6 +261,7 @@ 33CC10E52044A3C60003C045 /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 0920; LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; @@ -478,6 +479,8 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; + "DEVELOPMENT_TEAM[sdk=macosx*]" = ""; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.hiddify.hiddify.RunnerTests; @@ -493,6 +496,8 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; + "DEVELOPMENT_TEAM[sdk=macosx*]" = ""; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.hiddify.hiddify.RunnerTests; @@ -508,6 +513,8 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; + "DEVELOPMENT_TEAM[sdk=macosx*]" = ""; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.hiddify.hiddify.RunnerTests; @@ -545,9 +552,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -555,7 +564,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -572,10 +581,10 @@ CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=macosx*]" = NJRRF427XB; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = NJRRF427XB; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = HiFastVPN; @@ -583,10 +592,9 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 11.0; PRODUCT_BUNDLE_IDENTIFIER = com.taw.hifastvpn.mac; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "HiFastVPN-Mac-Pord"; SWIFT_VERSION = 5.0; }; name = Profile; @@ -595,6 +603,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Manual; + DEAD_CODE_STRIPPING = YES; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Profile; @@ -627,9 +636,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -643,7 +654,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -680,9 +691,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -690,7 +703,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -707,10 +720,10 @@ CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=macosx*]" = NJRRF427XB; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = NJRRF427XB; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = HiFastVPN; @@ -718,10 +731,9 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 11.0; PRODUCT_BUNDLE_IDENTIFIER = com.taw.hifastvpn.mac; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "HiFastVPN-Mac-Pord"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; }; @@ -735,11 +747,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; + CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=macosx*]" = NJRRF427XB; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = NJRRF427XB; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = HiFastVPN; @@ -747,10 +759,9 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 11.0; PRODUCT_BUNDLE_IDENTIFIER = com.taw.hifastvpn.mac; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "HiFastVPN-Mac-Pord"; SWIFT_VERSION = 5.0; }; name = Release; @@ -759,6 +770,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Manual; + DEAD_CODE_STRIPPING = YES; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -767,6 +779,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; + DEAD_CODE_STRIPPING = YES; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements index 4dc9bb8..24db5ca 100755 --- a/macos/Runner/DebugProfile.entitlements +++ b/macos/Runner/DebugProfile.entitlements @@ -3,14 +3,26 @@ com.apple.security.app-sandbox - + com.apple.security.application-groups $(TeamIdentifierPrefix) + com.apple.security.assets.pictures.read-write + + com.apple.security.personal-information.photos-library + + com.apple.security.cs.allow-dyld-environment-variables + + com.apple.security.cs.allow-jit + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.disable-library-validation + com.apple.security.network.client com.apple.security.network.server - ß + diff --git a/macos/Runner/Info.plist b/macos/Runner/Info.plist index 36d7668..354c059 100755 --- a/macos/Runner/Info.plist +++ b/macos/Runner/Info.plist @@ -63,6 +63,10 @@ HiFastVPN needs permission to send notifications about VPN connection status. NSSystemAdministrationUsageDescription HiFastVPN needs administrator privileges to configure system proxy settings. + NSPhotoLibraryAddUsageDescription + 我们需要您的同意才能将图片保存到相册 + NSPhotoLibraryUsageDescription + 我们需要您的同意才能访问相册 NSHumanReadableCopyright diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements index 9da9a23..64b0785 100755 --- a/macos/Runner/Release.entitlements +++ b/macos/Runner/Release.entitlements @@ -2,28 +2,23 @@ - com.apple.security.app-sandbox - - - - com.apple.security.network.client - com.apple.security.network.server + com.apple.security.assets.pictures.read-write - - - com.apple.security.cs.allow-unsigned-executable-memory - - com.apple.security.cs.disable-library-validation + com.apple.security.personal-information.photos-library com.apple.security.cs.allow-dyld-environment-variables com.apple.security.cs.allow-jit - - - com.apple.security.files.user-selected.read-write + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.disable-library-validation + + com.apple.security.network.client + + com.apple.security.network.server