Эх сурвалжийг харах

feat: 接入 Adjust 组件

陈文艺 1 сар өмнө
parent
commit
ce03ea70d7

+ 19 - 0
Lanu/AppDelegate.swift

@@ -17,6 +17,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
         
         setupLogger()
         setupFirebase()
+        setupAdjust()
         LNNetworkMonitor.startMonitoring()
         
         _ = LNProfileManager.shared
@@ -97,4 +98,22 @@ extension AppDelegate {
         fileLogger.maximumFileSize = 5 * 1024 * 1024 // 5M 最大限制
         DDLog.add(fileLogger)
     }
+    
+    private func setupAdjust() {
+        let token = ""
+        let env = if LNAppConfig.shared.curEnv == .test {
+            "sandbox"
+        } else {
+            "production"
+        }
+        let config = ADJConfig(appToken: token, environment: env)
+        config?.logLevel = if LNAppConfig.shared.curEnv == .test {
+            .verbose
+        } else {
+            .suppress
+        }
+        config?.enableCostDataInAttribution()
+//        config?.delegate = self
+        Adjust.initSdk(config)
+    }
 }

+ 2 - 1
Lanu/Lanu-Bridging-Header.h

@@ -4,6 +4,7 @@
 
 #import <SDWebImage/SDWebImage.h>
 
-#import "TIMPush/TIMPush.h"
+#import <TIMPush/TIMPush.h>
+#import <AdjustSdk/AdjustSdk.h>
 
 @import ImSDK_Plus;

+ 2 - 0
Podfile

@@ -13,6 +13,8 @@ target 'Gami' do
   pod 'TIMPush'
   
   pod 'DoraemonKit', :configurations => ['Debug']
+  
+  pod 'Adjust'
 
 end
 

+ 11 - 1
Podfile.lock

@@ -1,4 +1,9 @@
 PODS:
+  - Adjust (5.4.5):
+    - Adjust/Adjust (= 5.4.5)
+  - Adjust/Adjust (5.4.5):
+    - AdjustSignature (= 3.47.0)
+  - AdjustSignature (3.47.0)
   - DoraemonKit (3.1.7):
     - DoraemonKit/Core (= 3.1.7)
   - DoraemonKit/Core (3.1.7):
@@ -29,6 +34,7 @@ PODS:
   - TXIMSDK_Plus_iOS_XCFramework (8.7.7201)
 
 DEPENDENCIES:
+  - Adjust
   - DoraemonKit
   - TIMCommon (from `./ThirdParty/TUIKit/TIMCommon`)
   - TIMPush
@@ -36,6 +42,8 @@ DEPENDENCIES:
 
 SPEC REPOS:
   https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git:
+    - Adjust
+    - AdjustSignature
     - DoraemonKit
     - FMDB
     - GCDWebServer
@@ -49,6 +57,8 @@ EXTERNAL SOURCES:
     :path: "./ThirdParty/TUIKit/TUIChat"
 
 SPEC CHECKSUMS:
+  Adjust: 010c8b2b582add6ba200469c82c4d8c9e5ddb198
+  AdjustSignature: d634fc6b66295c38807f3b4e50978c1f72355950
   DoraemonKit: 0b45c9dc6ab34bd426a2782ee1bf7ab13492a60b
   FMDB: 728731dd336af3936ce00f91d9d8495f5718a0e6
   GCDWebServer: 2c156a56c8226e2d5c0c3f208a3621ccffbe3ce4
@@ -57,6 +67,6 @@ SPEC CHECKSUMS:
   TUIChat: 696bca6e2a6cfd2bc22f624425b425b68bd9506c
   TXIMSDK_Plus_iOS_XCFramework: 3b435eae84c639f35ae8dc9c8b92c399a8b0a67f
 
-PODFILE CHECKSUM: e9bc1dfb5b6d55f23b3b68b79739f5a8b74c1f05
+PODFILE CHECKSUM: c6bd747c5d8c0cbf628cc37255e1258181995d84
 
 COCOAPODS: 1.16.2