From 6bda1aa1347c6085d6892bcf71c25be0f848eeac Mon Sep 17 00:00:00 2001 From: Weller <1812208341@qq.com> Date: Mon, 11 Jan 2021 20:22:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0iOS=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/utils/mob_push_util.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/utils/mob_push_util.dart b/lib/utils/mob_push_util.dart index c2ddf02..0a937eb 100644 --- a/lib/utils/mob_push_util.dart +++ b/lib/utils/mob_push_util.dart @@ -102,7 +102,8 @@ class MobPushUtil { //设置远程推送环境,向用户授权(仅 iOS) MobpushPlugin.setCustomNotification(); // 开发环境 false, 线上环境 true - MobpushPlugin.setAPNsForProduction(true); + const bool inProduction = const bool.fromEnvironment("dart.vm.product"); + MobpushPlugin.setAPNsForProduction(inProduction); } //上传隐私协议许可 MobpushPlugin.updatePrivacyPermissionStatus(true);