Skip to content

Commit

Permalink
Merge pull request #1699 from MixinNetwork/feature/analytics
Browse files Browse the repository at this point in the history
Disable tracking
  • Loading branch information
over140 authored Dec 22, 2024
2 parents 18c976d + 82d16d2 commit 56726a8
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 26 deletions.
1 change: 0 additions & 1 deletion Mixin/Resources/en.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
"NSFaceIDUsageDescription" = "Mixin uses Face ID to authorize payment";
"NSLocationWhenInUseUsageDescription" = "Turn on location services to send your current location or nearby places in conversation.";
"NSLocalNetworkUsageDescription" = "Mixin uses the local network to transfer or restore your chat history.";
"NSUserTrackingUsageDescription" = "Mixin uses tracking data for personalized analysis to provide you with better services.";
1 change: 0 additions & 1 deletion Mixin/Resources/es.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
"NSFaceIDUsageDescription" = "Mixin usa Face ID para autorizar el pago";
"NSLocationWhenInUseUsageDescription" = "Activa los servicios de ubicación para enviar tu ubicación actual o lugares cercanos en una conversación";
"NSLocalNetworkUsageDescription" = "Mixin uses the local network to transfer or restore your chat history.";
"NSUserTrackingUsageDescription" = "Mixin uses tracking data for personalized analysis to provide you with better services.";
1 change: 0 additions & 1 deletion Mixin/Resources/ja.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
"NSFaceIDUsageDescription" = "Face IDでの支払いを許可";
"NSLocationWhenInUseUsageDescription" = "位置情報へのアクセスは、位置情報の共有に使用されます。";
"NSLocalNetworkUsageDescription" = "Mixin uses the local network to transfer or restore your chat history.";
"NSUserTrackingUsageDescription" = "Mixin uses tracking data for personalized analysis to provide you with better services.";
1 change: 0 additions & 1 deletion Mixin/Resources/ru.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
"NSFaceIDUsageDescription" = "Mixin использует Face ID для авторизации платежа";
"NSLocationWhenInUseUsageDescription" = "Включите службы определения местоположения, чтобы передавать в разговоре ваше текущее местоположение или близлежащие места.";
"NSLocalNetworkUsageDescription" = "Mixin uses the local network to transfer or restore your chat history.";
"NSUserTrackingUsageDescription" = "Mixin uses tracking data for personalized analysis to provide you with better services.";
1 change: 0 additions & 1 deletion Mixin/Resources/zh-Hans.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
"NSFaceIDUsageDescription" = "Mixin 使用面容识别来验证支付";
"NSLocationWhenInUseUsageDescription" = "允许获取位置让您可以在对话中发送当前的位置或附近的地点。";
"NSLocalNetworkUsageDescription" = "Mixin 使用本地网络同步或恢复您的聊天记录";
"NSUserTrackingUsageDescription" = "Mixin 使用跟踪数据进行个性化分析,以向您提供更好的服务。";
1 change: 0 additions & 1 deletion Mixin/Resources/zh-Hant.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
"NSFaceIDUsageDescription" = "Mixin 使用面容識別來驗證支付";
"NSLocationWhenInUseUsageDescription" = "允許獲取位置讓您可以在對話中傳送當前的位置或附近的地點";
"NSLocalNetworkUsageDescription" = "Mixin 使用本地網路同步或恢復您的聊天記錄";
"NSUserTrackingUsageDescription" = "Mixin 使用跟蹤資料進行個性化分析,以向您提供更好的服務。";
2 changes: 0 additions & 2 deletions Mixin/Supporting Files/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@
<string>Mixin uses the photo library to set profile photo, and send photo to your contact in chat.</string>
<key>NSLocalNetworkUsageDescription</key>
<string>Mixin uses the local network to transfer or restore your chat history.</string>
<key>NSUserTrackingUsageDescription</key>
<string>Mixin uses tracking data for personalized analysis to provide you with better services.</string>
<key>NSUserActivityTypes</key>
<array>
<string>INSendMessageIntent</string>
Expand Down
19 changes: 1 addition & 18 deletions Mixin/UserInterface/Controllers/Home/HomeViewController.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import UIKit
import StoreKit
import AppTrackingTransparency
import AdSupport
import FirebaseAnalytics
import AppsFlyerLib
import MixinServices
Expand Down Expand Up @@ -303,23 +301,8 @@ final class HomeViewController: UIViewController {
if let id = FirebaseAnalytics.Analytics.appInstanceID() {
AppsFlyerLib.shared().customData = ["app_instance_id": id]
}
AppsFlyerLib.shared().waitForATTUserAuthorization(timeoutInterval: 60)
AppsFlyerLib.shared().disableAdvertisingIdentifier = true
AppsFlyerLib.shared().start()
ATTrackingManager.requestTrackingAuthorization { (status) in
switch status {
case .notDetermined:
Logger.general.debug(category: "Home", message: "Tracking auth: notDetermined")
case .restricted:
Logger.general.debug(category: "Home", message: "Tracking auth: restricted")
case .denied:
Logger.general.debug(category: "Home", message: "Tracking auth: denied")
case .authorized:
let idfa = ASIdentifierManager.shared().advertisingIdentifier.uuidString
Logger.general.debug(category: "Home", message: "Tracking auth: \(idfa)")
@unknown default:
Logger.general.debug(category: "Home", message: "Tracking auth: \(status)")
}
}
if let observer = appsFlyerStartingObserver {
NotificationCenter.default.removeObserver(observer)
}
Expand Down

0 comments on commit 56726a8

Please sign in to comment.