瀏覽代碼

[new]调整asa

zk 3 月之前
父節點
當前提交
349b87e30d
共有 3 個文件被更改,包括 2 次插入7 次删除
  1. 0 3
      lib/main.dart
  2. 2 0
      lib/module/splash/splash_controller.dart
  3. 0 4
      lib/sdk/asa/asa_helper.dart

+ 0 - 3
lib/main.dart

@@ -12,7 +12,6 @@ import 'package:location/resource/colors.gen.dart';
 import 'package:location/resource/string.gen.dart';
 import 'package:location/resource/string_source.dart';
 import 'package:location/router/app_pages.dart';
-import 'package:location/sdk/asa/asa_helper.dart';
 import 'package:location/sdk/bugly/bugly_helper.dart';
 import 'package:location/sdk/gravity/gravity_helper.dart';
 import 'package:location/sdk/map/map_helper.dart';
@@ -96,8 +95,6 @@ class AppInitTask implements EnsurePolicyGrant {
     await MapHelper.init();
     //一键登录
     QuickLoginHelper.init();
-    //苹果搜索广告归因插件
-    AsaHelper.init();
   }
 }
 

+ 2 - 0
lib/module/splash/splash_controller.dart

@@ -98,6 +98,8 @@ class SplashController extends BaseController {
   _agreePrivacy() async {
     await UmengHelper.setPolicyGrantResult(true);
     await PrivacyCompliance.setPrivacyPolicy(true);
+    await AsaHelper.requestAttributionDetails();
+
     AsaHelper.reportEvent(AsaEvent.active);
     AsaHelper.reportEvent(AsaEvent.register);
   }

+ 0 - 4
lib/sdk/asa/asa_helper.dart

@@ -19,10 +19,6 @@ class AsaHelper {
     return FlutterAsaAttribution.instance.attributionToken();
   }
 
-  static void init() {
-    requestAttributionDetails();
-  }
-
   static Future<Map<String, dynamic>?> requestAttributionDetails() async {
     if (attributionMap != null) {
       return attributionMap;