diff --git a/IceCubesApp.xcodeproj/project.pbxproj b/IceCubesApp.xcodeproj/project.pbxproj index 512ce8a8..8dbb7c58 100644 --- a/IceCubesApp.xcodeproj/project.pbxproj +++ b/IceCubesApp.xcodeproj/project.pbxproj @@ -1193,7 +1193,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.10.47; + MARKETING_VERSION = 1.10.48; PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID_PREFIX).IceCubesApp.IceCubesNotifications"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -1228,7 +1228,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.10.47; + MARKETING_VERSION = 1.10.48; PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID_PREFIX).IceCubesApp.IceCubesNotifications"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -1267,7 +1267,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.10.47; + MARKETING_VERSION = 1.10.48; PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID_PREFIX).IceCubesApp.IceCubesAppWidgetsExtension"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -1303,7 +1303,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.10.47; + MARKETING_VERSION = 1.10.48; PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID_PREFIX).IceCubesApp.IceCubesAppWidgetsExtension"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -1336,7 +1336,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.10.47; + MARKETING_VERSION = 1.10.48; PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID_PREFIX).IceCubesApp.IceCubesShareExtension"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -1370,7 +1370,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.10.47; + MARKETING_VERSION = 1.10.48; PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID_PREFIX).IceCubesApp.IceCubesShareExtension"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -1516,10 +1516,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = "AppIconAlternate0 AppIconAlternate6 AppIconAlternate7 AppIconAlternate8 AppIconAlternate10 AppIconAlternate11 AppIconAlternate12 AppIconAlternate13 AppIconAlternate14 AppIconAlternate15 AppIconAlternate16 AppIconAlternate17 AppIconAlternate19 AppIconAlternate18 AppIconAlternate20 AppIconAlternate21 AppIconAlternate22 AppIconAlternate23 AppIconAlternate24 AppIconAlternate25 AppIconAlternate26 AppIconAlternate27 AppIconAlternate28 AppIconAlternate29 AppIconAlternate30 AppIconAlternate31 AppIconAlternate32 AppIconAlternate33 AppIconAlternate34 AppIconAlternate35 AppIconAlternate36 AppIconAlternate37 AppIconAlternate38 AppIconAlternate39 AppIconAlternate40 AppIconAlternate42 AppIconAlternate2 AppIconAlternate41 AppIconAlternate45 AppIconAlternate44 AppIconAlternate1 AppIconAlternate4 AppIconAlternate3 AppIconAlternate5 AppIconAlternate46 AppIconAlternate9 AppIconAlternate49 AppIconAlternate48 AppIconAlternate47 AppIconAlternate43"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; + ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; + ASSETCATALOG_COMPILER_STANDALONE_ICON_BEHAVIOR = all; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO; CODE_SIGN_ENTITLEMENTS = IceCubesApp/App/IceCubesApp.entitlements; CODE_SIGN_IDENTITY = "-"; @@ -1554,7 +1554,7 @@ LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 1.10.47; + MARKETING_VERSION = 1.10.48; PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID_PREFIX).IceCubesApp"; PRODUCT_NAME = "Ice Cubes"; SDKROOT = auto; @@ -1583,10 +1583,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = "AppIconAlternate0 AppIconAlternate6 AppIconAlternate7 AppIconAlternate8 AppIconAlternate10 AppIconAlternate11 AppIconAlternate12 AppIconAlternate13 AppIconAlternate14 AppIconAlternate15 AppIconAlternate16 AppIconAlternate17 AppIconAlternate19 AppIconAlternate18 AppIconAlternate20 AppIconAlternate21 AppIconAlternate22 AppIconAlternate23 AppIconAlternate24 AppIconAlternate25 AppIconAlternate26 AppIconAlternate27 AppIconAlternate28 AppIconAlternate29 AppIconAlternate30 AppIconAlternate31 AppIconAlternate32 AppIconAlternate33 AppIconAlternate34 AppIconAlternate35 AppIconAlternate36 AppIconAlternate37 AppIconAlternate38 AppIconAlternate39 AppIconAlternate40 AppIconAlternate42 AppIconAlternate2 AppIconAlternate41 AppIconAlternate45 AppIconAlternate44 AppIconAlternate1 AppIconAlternate4 AppIconAlternate3 AppIconAlternate5 AppIconAlternate46 AppIconAlternate9 AppIconAlternate49 AppIconAlternate48 AppIconAlternate47 AppIconAlternate43"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; + ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; + ASSETCATALOG_COMPILER_STANDALONE_ICON_BEHAVIOR = all; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO; CODE_SIGN_ENTITLEMENTS = "IceCubesApp/App/IceCubesApp-release.entitlements"; CODE_SIGN_IDENTITY = "-"; @@ -1621,7 +1621,7 @@ LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 1.10.47; + MARKETING_VERSION = 1.10.48; PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID_PREFIX).IceCubesApp"; PRODUCT_NAME = "Ice Cubes"; SDKROOT = auto; @@ -1667,7 +1667,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.10.47; + MARKETING_VERSION = 1.10.48; PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID_PREFIX).IceCubesApp.IceCubesActionExtension"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -1702,7 +1702,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.10.47; + MARKETING_VERSION = 1.10.48; PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID_PREFIX).IceCubesApp.IceCubesActionExtension"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; diff --git a/IceCubesApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/IceCubesApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 4a1d13bf..e42e2b04 100644 --- a/IceCubesApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/IceCubesApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -117,6 +117,15 @@ "version" : "0.3.0" } }, + { + "identity" : "swiftsdk", + "kind" : "remoteSourceControl", + "location" : "https://github.com/TelemetryDeck/SwiftSDK", + "state" : { + "revision" : "13a26cf125b70d695913eb9bea9f9b9c29da5790", + "version" : "2.3.0" + } + }, { "identity" : "swiftsoup", "kind" : "remoteSourceControl", diff --git a/IceCubesApp/App/Main/IceCubesApp.swift b/IceCubesApp/App/Main/IceCubesApp.swift index 70e1aa75..d5da1648 100644 --- a/IceCubesApp/App/Main/IceCubesApp.swift +++ b/IceCubesApp/App/Main/IceCubesApp.swift @@ -87,6 +87,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { try? AVAudioSession.sharedInstance().setCategory(.ambient, options: .mixWithOthers) try? AVAudioSession.sharedInstance().setActive(true) PushNotificationsService.shared.setAccounts(accounts: AppAccountsManager.shared.pushAccounts) + Telemetry.setup() + Telemetry.signal("app.launched") return true } diff --git a/IceCubesApp/App/Tabs/Settings/AccountSettingView.swift b/IceCubesApp/App/Tabs/Settings/AccountSettingView.swift index ecf3d0fc..d93631a5 100644 --- a/IceCubesApp/App/Tabs/Settings/AccountSettingView.swift +++ b/IceCubesApp/App/Tabs/Settings/AccountSettingView.swift @@ -85,11 +85,12 @@ struct AccountSettingsView: View { await sub.deleteSubscription() } appAccountsManager.delete(account: appAccount) + Telemetry.signal("account.removed") dismiss() } } } label: { - Text("account.action.logout") + Label("account.action.logout", systemImage: "trash") .frame(maxWidth: .infinity) } } diff --git a/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift b/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift index ae063e2c..3b8ebf22 100644 --- a/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift +++ b/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift @@ -88,9 +88,7 @@ struct AddAccountView: View { .scrollDismissesKeyboard(.immediately) #endif .toolbar { - if !appAccountsManager.availableAccounts.isEmpty { - CancelToolbarItem() - } + CancelToolbarItem() } .onAppear { isInstanceURLFieldFocused = true @@ -293,6 +291,7 @@ struct AddAccountView: View { let oauthToken = try await client.continueOauthFlow(url: url) let client = Client(server: client.server, oauthToken: oauthToken) let account: Account = try await client.get(endpoint: Accounts.verifyCredentials) + Telemetry.signal("account.added") appAccountsManager.add(account: AppAccount(server: client.server, accountName: "\(account.acct)@\(client.server)", oauthToken: oauthToken)) diff --git a/IceCubesApp/App/Tabs/Settings/SettingsTab.swift b/IceCubesApp/App/Tabs/Settings/SettingsTab.swift index aaa2c20b..497f7518 100644 --- a/IceCubesApp/App/Tabs/Settings/SettingsTab.swift +++ b/IceCubesApp/App/Tabs/Settings/SettingsTab.swift @@ -129,10 +129,10 @@ struct SettingsTabs: View { } } } + addAccountButton if !appAccountsManager.availableAccounts.isEmpty { editAccountButton } - addAccountButton } #if !os(visionOS) .listRowBackground(theme.primaryBackgroundColor) @@ -147,6 +147,7 @@ struct SettingsTabs: View { await timelineCache.clearCache(for: client.id) await sub.deleteSubscription() appAccountsManager.delete(account: account) + Telemetry.signal("account.removed") } } @@ -307,7 +308,7 @@ struct SettingsTabs: View { Button { addAccountSheetPresented.toggle() } label: { - Text("settings.account.add") + Label("settings.account.add", systemImage: "person.badge.plus") } .sheet(isPresented: $addAccountSheetPresented) { AddAccountView() @@ -315,15 +316,17 @@ struct SettingsTabs: View { } private var editAccountButton: some View { - Button(role: isEditingAccount ? .none : .destructive) { + Button(role: .destructive) { withAnimation { isEditingAccount.toggle() } } label: { if isEditingAccount { - Text("action.done") + Label("action.done", systemImage: "person.badge.minus") + .foregroundStyle(.red) } else { - Text("account.action.logout") + Label("account.action.logout", systemImage: "person.badge.minus") + .foregroundStyle(.red) } } } diff --git a/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift b/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift index 0ce19f0f..6cc8a800 100644 --- a/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift +++ b/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift @@ -205,9 +205,11 @@ struct TimelineTab: View { Button { withAnimation { if let index { - pinnedFilters.remove(at: index) + let timeline = pinnedFilters.remove(at: index) + Telemetry.signal("timeline.pin.removed", parameters: ["timeline" : timeline.rawValue]) } else { pinnedFilters.append(timeline) + Telemetry.signal("timeline.pin.added", parameters: ["timeline" : timeline.rawValue]) } } } label: { diff --git a/IceCubesApp/Resources/Localization/Localizable.xcstrings b/IceCubesApp/Resources/Localization/Localizable.xcstrings index 26520ef5..dd38fee4 100644 --- a/IceCubesApp/Resources/Localization/Localizable.xcstrings +++ b/IceCubesApp/Resources/Localization/Localizable.xcstrings @@ -35814,44 +35814,44 @@ "localizations" : { "be" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Налады ..." + "state" : "translated", + "value" : "Налады..." } }, "ca" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Configuració ..." + "state" : "translated", + "value" : "Configuració..." } }, "de" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Einstellungen ..." + "state" : "translated", + "value" : "Einstellungen..." } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Settings ..." + "value" : "Settings..." } }, "en-GB" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Settings ..." + "state" : "translated", + "value" : "Settings..." } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Ajustes ..." + "value" : "Ajustes..." } }, "eu" : { "stringUnit" : { "state" : "translated", - "value" : "Ezarpenak ..." + "value" : "Ezarpenak..." } }, "fr" : { @@ -35862,26 +35862,26 @@ }, "it" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Impostazioni ..." + "state" : "translated", + "value" : "Impostazioni..." } }, "ja" : { "stringUnit" : { - "state" : "needs_review", - "value" : "設定 ..." + "state" : "translated", + "value" : "設定..." } }, "ko" : { "stringUnit" : { - "state" : "needs_review", - "value" : "앱 설정 ..." + "state" : "translated", + "value" : "앱 설정..." } }, "nb" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Innstillinger ..." + "state" : "translated", + "value" : "Innstillinger..." } }, "nl" : { @@ -35892,38 +35892,38 @@ }, "pl" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Ustawienia ..." + "state" : "translated", + "value" : "Ustawienia..." } }, "pt-BR" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Configurações ..." + "state" : "translated", + "value" : "Configurações..." } }, "tr" : { "stringUnit" : { "state" : "translated", - "value" : "Ayarlar ..." + "value" : "Ayarlar..." } }, "uk" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Налаштування ..." + "state" : "translated", + "value" : "Налаштування..." } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "设置 ..." + "value" : "设置..." } }, "zh-Hant" : { "stringUnit" : { - "state" : "needs_review", - "value" : "設定 ..." + "state" : "translated", + "value" : "設定..." } } } diff --git a/PRIVACY.MD b/PRIVACY.MD index 6d2fae3d..93fa1da8 100644 --- a/PRIVACY.MD +++ b/PRIVACY.MD @@ -1,3 +1,5 @@ IceCubesApp does not collect or process any personal information from its users. The app is used to connect to third-party Mastodon servers that may or may not collect personal information and are not covered by this privacy policy. Each third-party Mastodon server comes equipped with its own privacy policy that can be viewed through the app or through that server's website. When you use the OpenAI feature in the composer, please be aware that your input will be sent to the OpenAI server in order to generate a response. Please refer to the [OpenAI Privacy Policy](https://openai.com/policies/privacy-policy) if you want to know more. Nothing is sent to OpenAI if you don't use this feature. You can also completely disable this button in the app settings. + +Ice Cubes use TelemetryDeck to collect anonymized usage data. This helps us understand how our users are using our app and how we can improve it. TelemetryDeck does not collect any personally identifiable information. You can read more about TelemetryDeck’s [privacy policy](https://telemetrydeck.com/privacy) diff --git a/Packages/Env/Package.swift b/Packages/Env/Package.swift index d5844fba..fed1f722 100644 --- a/Packages/Env/Package.swift +++ b/Packages/Env/Package.swift @@ -20,6 +20,7 @@ let package = Package( .package(name: "Models", path: "../Models"), .package(name: "Network", path: "../Network"), .package(url: "https://github.com/evgenyneu/keychain-swift", branch: "master"), + .package(url: "https://github.com/TelemetryDeck/SwiftSDK", from: "2.3.0") ], targets: [ .target( @@ -28,6 +29,7 @@ let package = Package( .product(name: "Models", package: "Models"), .product(name: "Network", package: "Network"), .product(name: "KeychainSwift", package: "keychain-swift"), + .product(name: "TelemetryDeck", package: "SwiftSDK") ], swiftSettings: [ .swiftLanguageMode(.v6), diff --git a/Packages/Env/Sources/Env/Telemetry.swift b/Packages/Env/Sources/Env/Telemetry.swift new file mode 100644 index 00000000..f676d5a2 --- /dev/null +++ b/Packages/Env/Sources/Env/Telemetry.swift @@ -0,0 +1,19 @@ +import TelemetryDeck +import SwiftUI + +@MainActor +public class Telemetry { + static var userId: String? { + CurrentAccount.shared.account?.id + } + + public static func setup() { + let config = TelemetryDeck.Config(appID: "F04175D2-599A-4504-867E-CE870B991EB7") + TelemetryDeck.initialize(config: config) + } + + + public static func signal(_ event: String, parameters: [String: String] = [:]) { + TelemetryDeck.signal(event, parameters: parameters, customUserID: userId) + } +} diff --git a/Packages/Timeline/Sources/Timeline/View/TimelineViewModel.swift b/Packages/Timeline/Sources/Timeline/View/TimelineViewModel.swift index b2f94a11..019bac29 100644 --- a/Packages/Timeline/Sources/Timeline/View/TimelineViewModel.swift +++ b/Packages/Timeline/Sources/Timeline/View/TimelineViewModel.swift @@ -9,7 +9,7 @@ import SwiftUI @Observable class TimelineViewModel { var scrollToIndex: Int? var statusesState: StatusesState = .loading - var timeline: TimelineFilter = .federated { + var timeline: TimelineFilter = .home { willSet { if timeline == .home, newValue != .resume { saveMarker() @@ -21,6 +21,9 @@ import SwiftUI await handleLatestOrResume(oldValue) if oldValue != timeline { + Telemetry.signal("timeline.filter.updated", + parameters: ["timeline": timeline.rawValue]) + await reset() pendingStatusesObserver.pendingStatuses = [] tag = nil